KiCad PCB EDA Suite
PANEL_SETUP_TEXT_AND_GRAPHICS_BASE Class Reference

Class PANEL_SETUP_TEXT_AND_GRAPHICS_BASE. More...

#include <panel_setup_text_and_graphics_base.h>

Inheritance diagram for PANEL_SETUP_TEXT_AND_GRAPHICS_BASE:
PANEL_SETUP_TEXT_AND_GRAPHICS

Public Member Functions

 PANEL_SETUP_TEXT_AND_GRAPHICS_BASE (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
 
 ~PANEL_SETUP_TEXT_AND_GRAPHICS_BASE ()
 

Protected Attributes

wxBoxSizer * m_gridSizer
 
wxStaticText * m_staticTextDefProp
 
WX_GRIDm_grid
 
wxStaticText * m_staticTextDefPropDim
 
wxStaticLine * m_staticline1
 
wxStaticText * m_lblDimensionUnits
 
wxChoice * m_dimensionUnits
 
wxStaticText * m_lblTextPositionMode
 
wxChoice * m_dimensionTextPositionMode
 
wxStaticText * m_lblDimensionUnitsFormat
 
wxChoice * m_dimensionUnitsFormat
 
wxCheckBox * m_dimensionTextKeepAligned
 
wxStaticText * m_lblDimensionPrecision
 
wxChoice * m_dimensionPrecision
 
wxStaticText * m_lblArrowLength
 
wxTextCtrl * m_dimensionArrowLength
 
wxStaticText * m_arrowLengthUnits
 
wxCheckBox * m_dimensionSuppressZeroes
 
wxStaticText * m_lblExtensionOffset
 
wxTextCtrl * m_dimensionExtensionOffset
 
wxStaticText * m_dimensionExtensionOffsetUnits
 

Detailed Description

Constructor & Destructor Documentation

◆ PANEL_SETUP_TEXT_AND_GRAPHICS_BASE()

PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::PANEL_SETUP_TEXT_AND_GRAPHICS_BASE ( wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxSize( -1,-1 ),
long  style = wxTAB_TRAVERSAL,
const wxString &  name = wxEmptyString 
)

Definition at line 14 of file panel_setup_text_and_graphics_base.cpp.

14 : wxPanel( parent, id, pos, size, style, name )
15{
16 wxBoxSizer* mainSizer;
17 mainSizer = new wxBoxSizer( wxVERTICAL );
18
19 m_gridSizer = new wxBoxSizer( wxVERTICAL );
20
21 m_staticTextDefProp = new wxStaticText( this, wxID_ANY, _("Default properties for new graphic items:"), wxDefaultPosition, wxDefaultSize, 0 );
22 m_staticTextDefProp->Wrap( -1 );
23 m_gridSizer->Add( m_staticTextDefProp, 0, wxTOP|wxRIGHT|wxLEFT, 8 );
24
25
26 m_gridSizer->Add( 0, 3, 0, wxEXPAND, 5 );
27
28 m_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
29
30 // Grid
31 m_grid->CreateGrid( 6, 6 );
32 m_grid->EnableEditing( true );
33 m_grid->EnableGridLines( true );
34 m_grid->EnableDragGridSize( false );
35 m_grid->SetMargins( 0, 0 );
36
37 // Columns
38 m_grid->SetColSize( 0, 140 );
39 m_grid->SetColSize( 1, 140 );
40 m_grid->SetColSize( 2, 140 );
41 m_grid->SetColSize( 3, 140 );
42 m_grid->SetColSize( 4, 80 );
43 m_grid->SetColSize( 5, 120 );
44 m_grid->EnableDragColMove( false );
45 m_grid->EnableDragColSize( true );
46 m_grid->SetColLabelValue( 0, _("Line Thickness") );
47 m_grid->SetColLabelValue( 1, _("Text Width") );
48 m_grid->SetColLabelValue( 2, _("Text Height") );
49 m_grid->SetColLabelValue( 3, _("Text Thickness") );
50 m_grid->SetColLabelValue( 4, _("Italic") );
51 m_grid->SetColLabelValue( 5, _("Keep Upright") );
52 m_grid->SetColLabelSize( wxGRID_AUTOSIZE );
53 m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
54
55 // Rows
56 m_grid->EnableDragRowSize( false );
57 m_grid->SetRowLabelValue( 0, _("Silk Layers") );
58 m_grid->SetRowLabelValue( 1, _("Copper Layers") );
59 m_grid->SetRowLabelValue( 2, _("Edge Cuts") );
60 m_grid->SetRowLabelValue( 3, _("Courtyards") );
61 m_grid->SetRowLabelValue( 4, _("Fab Layers") );
62 m_grid->SetRowLabelValue( 5, _("Other Layers") );
63 m_grid->SetRowLabelSize( 132 );
64 m_grid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
65
66 // Label Appearance
67
68 // Cell Defaults
69 m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
70 m_gridSizer->Add( m_grid, 0, wxBOTTOM, 15 );
71
72
73 m_gridSizer->Add( 0, 0, 0, wxEXPAND|wxTOP, 5 );
74
75 m_staticTextDefPropDim = new wxStaticText( this, wxID_ANY, _("Default properties for new dimension objects:"), wxDefaultPosition, wxDefaultSize, 0 );
76 m_staticTextDefPropDim->Wrap( -1 );
77 m_gridSizer->Add( m_staticTextDefPropDim, 0, wxTOP|wxRIGHT|wxLEFT, 8 );
78
79 m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
80 m_gridSizer->Add( m_staticline1, 0, wxEXPAND|wxBOTTOM, 8 );
81
82 wxGridBagSizer* gbSizer1;
83 gbSizer1 = new wxGridBagSizer( 0, 5 );
84 gbSizer1->SetFlexibleDirection( wxVERTICAL );
85 gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_NONE );
86
87 m_lblDimensionUnits = new wxStaticText( this, wxID_ANY, _("Units:"), wxDefaultPosition, wxDefaultSize, 0 );
88 m_lblDimensionUnits->Wrap( -1 );
89 gbSizer1->Add( m_lblDimensionUnits, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
90
91 wxString m_dimensionUnitsChoices[] = { _("Inches"), _("Mils"), _("Millimeters"), _("Automatic") };
92 int m_dimensionUnitsNChoices = sizeof( m_dimensionUnitsChoices ) / sizeof( wxString );
93 m_dimensionUnits = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_dimensionUnitsNChoices, m_dimensionUnitsChoices, 0 );
94 m_dimensionUnits->SetSelection( 0 );
95 m_dimensionUnits->SetToolTip( _("Default units for dimensions (\"automatic\" to follow the chosen UI units)") );
96
97 gbSizer1->Add( m_dimensionUnits, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
98
99
100 gbSizer1->Add( 0, 0, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
101
102 m_lblTextPositionMode = new wxStaticText( this, wxID_ANY, _("Text position:"), wxDefaultPosition, wxDefaultSize, 0 );
103 m_lblTextPositionMode->Wrap( -1 );
104 gbSizer1->Add( m_lblTextPositionMode, wxGBPosition( 0, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
105
106 wxString m_dimensionTextPositionModeChoices[] = { _("Outside"), _("Inline") };
107 int m_dimensionTextPositionModeNChoices = sizeof( m_dimensionTextPositionModeChoices ) / sizeof( wxString );
108 m_dimensionTextPositionMode = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_dimensionTextPositionModeNChoices, m_dimensionTextPositionModeChoices, 0 );
109 m_dimensionTextPositionMode->SetSelection( 0 );
110 m_dimensionTextPositionMode->SetToolTip( _("Where to position the dimension text relative to the dimension line") );
111
112 gbSizer1->Add( m_dimensionTextPositionMode, wxGBPosition( 0, 4 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
113
114 m_lblDimensionUnitsFormat = new wxStaticText( this, wxID_ANY, _("Units format:"), wxDefaultPosition, wxDefaultSize, 0 );
115 m_lblDimensionUnitsFormat->Wrap( -1 );
116 gbSizer1->Add( m_lblDimensionUnitsFormat, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
117
118 wxString m_dimensionUnitsFormatChoices[] = { _("1234"), _("1234 mm"), _("1234 (mm)") };
119 int m_dimensionUnitsFormatNChoices = sizeof( m_dimensionUnitsFormatChoices ) / sizeof( wxString );
120 m_dimensionUnitsFormat = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_dimensionUnitsFormatNChoices, m_dimensionUnitsFormatChoices, 0 );
121 m_dimensionUnitsFormat->SetSelection( 1 );
122 gbSizer1->Add( m_dimensionUnitsFormat, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
123
124 m_dimensionTextKeepAligned = new wxCheckBox( this, wxID_ANY, _("Keep text aligned"), wxDefaultPosition, wxDefaultSize, 0 );
125 m_dimensionTextKeepAligned->SetToolTip( _("When checked, dimension text will be kept aligned with dimension lines") );
126
127 gbSizer1->Add( m_dimensionTextKeepAligned, wxGBPosition( 1, 3 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM, 5 );
128
129 m_lblDimensionPrecision = new wxStaticText( this, wxID_ANY, _("Precision:"), wxDefaultPosition, wxDefaultSize, 0 );
130 m_lblDimensionPrecision->Wrap( -1 );
131 gbSizer1->Add( m_lblDimensionPrecision, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
132
133 wxString m_dimensionPrecisionChoices[] = { _("0"), _("0.0"), _("0.00"), _("0.000"), _("0.0000"), _("0.00000") };
134 int m_dimensionPrecisionNChoices = sizeof( m_dimensionPrecisionChoices ) / sizeof( wxString );
135 m_dimensionPrecision = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_dimensionPrecisionNChoices, m_dimensionPrecisionChoices, 0 );
136 m_dimensionPrecision->SetSelection( 4 );
137 m_dimensionPrecision->SetToolTip( _("How many digits of precision to show") );
138
139 gbSizer1->Add( m_dimensionPrecision, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
140
141 m_lblArrowLength = new wxStaticText( this, wxID_ANY, _("Arrow length:"), wxDefaultPosition, wxDefaultSize, 0 );
142 m_lblArrowLength->Wrap( -1 );
143 gbSizer1->Add( m_lblArrowLength, wxGBPosition( 2, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
144
145 m_dimensionArrowLength = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
146 gbSizer1->Add( m_dimensionArrowLength, wxGBPosition( 2, 4 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
147
148 m_arrowLengthUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
149 m_arrowLengthUnits->Wrap( -1 );
150 gbSizer1->Add( m_arrowLengthUnits, wxGBPosition( 2, 5 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
151
152 m_dimensionSuppressZeroes = new wxCheckBox( this, wxID_ANY, _("Suppress trailing zeroes"), wxDefaultPosition, wxDefaultSize, 0 );
153 m_dimensionSuppressZeroes->SetToolTip( _("When checked, \"1.2300\" will be rendered as \"1.23\" even if precision is set to show more digits") );
154
155 gbSizer1->Add( m_dimensionSuppressZeroes, wxGBPosition( 3, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
156
157 m_lblExtensionOffset = new wxStaticText( this, wxID_ANY, _("Extension line offset:"), wxDefaultPosition, wxDefaultSize, 0 );
158 m_lblExtensionOffset->Wrap( -1 );
159 gbSizer1->Add( m_lblExtensionOffset, wxGBPosition( 3, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
160
161 m_dimensionExtensionOffset = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
162 gbSizer1->Add( m_dimensionExtensionOffset, wxGBPosition( 3, 4 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
163
164 m_dimensionExtensionOffsetUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
166 gbSizer1->Add( m_dimensionExtensionOffsetUnits, wxGBPosition( 3, 5 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
167
168
169 m_gridSizer->Add( gbSizer1, 1, wxEXPAND|wxTOP, 5 );
170
171
172 mainSizer->Add( m_gridSizer, 0, wxLEFT, 5 );
173
174
175 this->SetSizer( mainSizer );
176 this->Layout();
177 mainSizer->Fit( this );
178}
const char * name
Definition: DXF_plotter.cpp:56
void SetColLabelSize(int aHeight)
Hide wxGrid's SetColLabelSize() method with one which makes sure the size is tall enough for the syst...
Definition: wx_grid.cpp:144
#define _(s)

References _, m_arrowLengthUnits, m_dimensionArrowLength, m_dimensionExtensionOffset, m_dimensionExtensionOffsetUnits, m_dimensionPrecision, m_dimensionSuppressZeroes, m_dimensionTextKeepAligned, m_dimensionTextPositionMode, m_dimensionUnits, m_dimensionUnitsFormat, m_grid, m_gridSizer, m_lblArrowLength, m_lblDimensionPrecision, m_lblDimensionUnits, m_lblDimensionUnitsFormat, m_lblExtensionOffset, m_lblTextPositionMode, m_staticline1, m_staticTextDefProp, m_staticTextDefPropDim, and WX_GRID::SetColLabelSize().

◆ ~PANEL_SETUP_TEXT_AND_GRAPHICS_BASE()

PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::~PANEL_SETUP_TEXT_AND_GRAPHICS_BASE ( )

Definition at line 180 of file panel_setup_text_and_graphics_base.cpp.

181{
182}

Member Data Documentation

◆ m_arrowLengthUnits

wxStaticText* PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::m_arrowLengthUnits
protected

◆ m_dimensionArrowLength

wxTextCtrl* PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::m_dimensionArrowLength
protected

◆ m_dimensionExtensionOffset

wxTextCtrl* PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::m_dimensionExtensionOffset
protected

◆ m_dimensionExtensionOffsetUnits

wxStaticText* PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::m_dimensionExtensionOffsetUnits
protected

◆ m_dimensionPrecision

wxChoice* PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::m_dimensionPrecision
protected

◆ m_dimensionSuppressZeroes

wxCheckBox* PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::m_dimensionSuppressZeroes
protected

◆ m_dimensionTextKeepAligned

wxCheckBox* PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::m_dimensionTextKeepAligned
protected

◆ m_dimensionTextPositionMode

wxChoice* PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::m_dimensionTextPositionMode
protected

◆ m_dimensionUnits

wxChoice* PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::m_dimensionUnits
protected

◆ m_dimensionUnitsFormat

wxChoice* PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::m_dimensionUnitsFormat
protected

◆ m_grid

◆ m_gridSizer

wxBoxSizer* PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::m_gridSizer
protected

◆ m_lblArrowLength

wxStaticText* PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::m_lblArrowLength
protected

◆ m_lblDimensionPrecision

wxStaticText* PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::m_lblDimensionPrecision
protected

◆ m_lblDimensionUnits

wxStaticText* PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::m_lblDimensionUnits
protected

◆ m_lblDimensionUnitsFormat

wxStaticText* PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::m_lblDimensionUnitsFormat
protected

◆ m_lblExtensionOffset

wxStaticText* PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::m_lblExtensionOffset
protected

◆ m_lblTextPositionMode

wxStaticText* PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::m_lblTextPositionMode
protected

◆ m_staticline1

wxStaticLine* PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::m_staticline1
protected

◆ m_staticTextDefProp

wxStaticText* PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::m_staticTextDefProp
protected

◆ m_staticTextDefPropDim

wxStaticText* PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::m_staticTextDefPropDim
protected

The documentation for this class was generated from the following files: