KiCad PCB EDA Suite
dialog_modedit_options_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Apr 20 2018)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
9 
11 
13 
14 DIALOG_MODEDIT_OPTIONS_BASE::DIALOG_MODEDIT_OPTIONS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
15 {
16  this->SetSizeHints( wxDefaultSize, wxDefaultSize );
17 
18  wxBoxSizer* bSizerMain;
19  bSizerMain = new wxBoxSizer( wxVERTICAL );
20 
21  wxFlexGridSizer* fgSizer3;
22  fgSizer3 = new wxFlexGridSizer( 0, 2, 0, 0 );
23  fgSizer3->AddGrowableCol( 0 );
24  fgSizer3->SetFlexibleDirection( wxBOTH );
25  fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
26 
27  wxStaticBoxSizer* sbSizerNewGraphicItems;
28  sbSizerNewGraphicItems = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Default Values for New Graphic Items") ), wxVERTICAL );
29 
30  wxFlexGridSizer* fgSizer1;
31  fgSizer1 = new wxFlexGridSizer( 0, 3, 5, 5 );
32  fgSizer1->AddGrowableCol( 1 );
33  fgSizer1->SetFlexibleDirection( wxBOTH );
34  fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
35 
36  m_EdgeModEWidthTitle = new wxStaticText( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, _("&Graphic line width:"), wxDefaultPosition, wxDefaultSize, 0 );
37  m_EdgeModEWidthTitle->Wrap( -1 );
38  fgSizer1->Add( m_EdgeModEWidthTitle, 0, wxALIGN_CENTER_VERTICAL, 5 );
39 
40  m_OptModuleGrLineWidth = new TEXT_CTRL_EVAL( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
41  fgSizer1->Add( m_OptModuleGrLineWidth, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
42 
43  m_staticTextGrLineUnit = new wxStaticText( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
44  m_staticTextGrLineUnit->Wrap( -1 );
45  fgSizer1->Add( m_staticTextGrLineUnit, 0, wxALIGN_CENTER_VERTICAL, 5 );
46 
47  m_TextModWidthTitle = new wxStaticText( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, _("&Text line width:"), wxDefaultPosition, wxDefaultSize, 0 );
48  m_TextModWidthTitle->Wrap( -1 );
49  fgSizer1->Add( m_TextModWidthTitle, 0, wxALIGN_CENTER_VERTICAL, 5 );
50 
51  m_OptModuleTextWidth = new TEXT_CTRL_EVAL( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
52  fgSizer1->Add( m_OptModuleTextWidth, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
53 
54  m_staticTextTextWidthUnit = new wxStaticText( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
55  m_staticTextTextWidthUnit->Wrap( -1 );
56  fgSizer1->Add( m_staticTextTextWidthUnit, 0, wxALIGN_CENTER_VERTICAL, 5 );
57 
58  m_TextModSizeVTitle = new wxStaticText( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, _("Text &height:"), wxDefaultPosition, wxDefaultSize, 0 );
59  m_TextModSizeVTitle->Wrap( -1 );
60  fgSizer1->Add( m_TextModSizeVTitle, 0, wxALIGN_CENTER_VERTICAL, 5 );
61 
62  m_OptModuleTextVSize = new TEXT_CTRL_EVAL( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
63  fgSizer1->Add( m_OptModuleTextVSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
64 
65  m_staticTextTextVSizeUnit = new wxStaticText( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
66  m_staticTextTextVSizeUnit->Wrap( -1 );
67  fgSizer1->Add( m_staticTextTextVSizeUnit, 0, wxALIGN_CENTER_VERTICAL, 5 );
68 
69  m_TextModSizeHTitle = new wxStaticText( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, _("Text &width:"), wxDefaultPosition, wxDefaultSize, 0 );
70  m_TextModSizeHTitle->Wrap( -1 );
71  fgSizer1->Add( m_TextModSizeHTitle, 0, wxALIGN_CENTER_VERTICAL, 5 );
72 
73  m_OptModuleTextHSize = new TEXT_CTRL_EVAL( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
74  fgSizer1->Add( m_OptModuleTextHSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
75 
76  m_staticTextTextHSizeUnit = new wxStaticText( sbSizerNewGraphicItems->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
77  m_staticTextTextHSizeUnit->Wrap( -1 );
78  fgSizer1->Add( m_staticTextTextHSizeUnit, 0, wxALIGN_CENTER_VERTICAL, 5 );
79 
80 
81  sbSizerNewGraphicItems->Add( fgSizer1, 0, wxEXPAND, 20 );
82 
83 
84  fgSizer3->Add( sbSizerNewGraphicItems, 0, wxALL|wxEXPAND, 5 );
85 
86  wxBoxSizer* bSizerDisplayOptions;
87  bSizerDisplayOptions = new wxBoxSizer( wxVERTICAL );
88 
89  wxString m_PolarDisplayChoices[] = { _("Cartesian coordinates"), _("Polar coordinates") };
90  int m_PolarDisplayNChoices = sizeof( m_PolarDisplayChoices ) / sizeof( wxString );
91  m_PolarDisplay = new wxRadioBox( this, wxID_POLAR_CTRL, _("Coordinates"), wxDefaultPosition, wxDefaultSize, m_PolarDisplayNChoices, m_PolarDisplayChoices, 1, wxRA_SPECIFY_COLS );
92  m_PolarDisplay->SetSelection( 0 );
93  m_PolarDisplay->SetToolTip( _("Set display of relative (dx/dy) coordinates to Cartesian (rectangular) or polar (angle/distance).") );
94 
95  bSizerDisplayOptions->Add( m_PolarDisplay, 1, wxALL|wxEXPAND, 5 );
96 
97  wxString m_UnitsSelectionChoices[] = { _("Inches"), _("Millimeters") };
98  int m_UnitsSelectionNChoices = sizeof( m_UnitsSelectionChoices ) / sizeof( wxString );
99  m_UnitsSelection = new wxRadioBox( this, wxID_UNITS, _("Units"), wxDefaultPosition, wxDefaultSize, m_UnitsSelectionNChoices, m_UnitsSelectionChoices, 1, wxRA_SPECIFY_COLS );
100  m_UnitsSelection->SetSelection( 0 );
101  m_UnitsSelection->SetToolTip( _("Set units used to display dimensions and positions.") );
102 
103  bSizerDisplayOptions->Add( m_UnitsSelection, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
104 
105 
106  fgSizer3->Add( bSizerDisplayOptions, 0, wxEXPAND, 5 );
107 
108  wxStaticBoxSizer* sbSizerNewFootprints;
109  sbSizerNewFootprints = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Default Values for New Footprints") ), wxVERTICAL );
110 
111  wxFlexGridSizer* fgSizer2;
112  fgSizer2 = new wxFlexGridSizer( 0, 4, 5, 5 );
113  fgSizer2->AddGrowableCol( 1 );
114  fgSizer2->SetFlexibleDirection( wxBOTH );
115  fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
116 
117  m_staticTextRef = new wxStaticText( sbSizerNewFootprints->GetStaticBox(), wxID_ANY, _("&Reference:"), wxDefaultPosition, wxDefaultSize, 0 );
118  m_staticTextRef->Wrap( -1 );
119  fgSizer2->Add( m_staticTextRef, 0, wxALIGN_CENTER_VERTICAL, 5 );
120 
121  m_textCtrlRefText = new wxTextCtrl( sbSizerNewFootprints->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
122  m_textCtrlRefText->SetToolTip( _("Default text for reference\nLeave blank to use the footprint name") );
123 
124  fgSizer2->Add( m_textCtrlRefText, 0, wxALIGN_CENTER_VERTICAL, 5 );
125 
126  wxString m_choiceLayerReferenceChoices[] = { _("SilkScreen"), _("Fab. Layer") };
127  int m_choiceLayerReferenceNChoices = sizeof( m_choiceLayerReferenceChoices ) / sizeof( wxString );
128  m_choiceLayerReference = new wxChoice( sbSizerNewFootprints->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceLayerReferenceNChoices, m_choiceLayerReferenceChoices, 0 );
129  m_choiceLayerReference->SetSelection( 0 );
130  fgSizer2->Add( m_choiceLayerReference, 0, wxALIGN_CENTER_VERTICAL, 5 );
131 
132  wxString m_choiceVisibleReferenceChoices[] = { _("Visible"), _("Invisible") };
133  int m_choiceVisibleReferenceNChoices = sizeof( m_choiceVisibleReferenceChoices ) / sizeof( wxString );
134  m_choiceVisibleReference = new wxChoice( sbSizerNewFootprints->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceVisibleReferenceNChoices, m_choiceVisibleReferenceChoices, 0 );
135  m_choiceVisibleReference->SetSelection( 0 );
136  fgSizer2->Add( m_choiceVisibleReference, 0, wxALIGN_CENTER_VERTICAL, 5 );
137 
138  m_staticTextValue = new wxStaticText( sbSizerNewFootprints->GetStaticBox(), wxID_ANY, _("V&alue:"), wxDefaultPosition, wxDefaultSize, 0 );
139  m_staticTextValue->Wrap( -1 );
140  fgSizer2->Add( m_staticTextValue, 0, wxALIGN_CENTER_VERTICAL, 5 );
141 
142  m_textCtrlValueText = new wxTextCtrl( sbSizerNewFootprints->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
143  m_textCtrlValueText->SetToolTip( _("Default text for value\nLeave blank to use the footprint name") );
144 
145  fgSizer2->Add( m_textCtrlValueText, 0, wxALIGN_CENTER_VERTICAL, 5 );
146 
147  wxString m_choiceLayerValueChoices[] = { _("SilkScreen"), _("Fab. Layer") };
148  int m_choiceLayerValueNChoices = sizeof( m_choiceLayerValueChoices ) / sizeof( wxString );
149  m_choiceLayerValue = new wxChoice( sbSizerNewFootprints->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceLayerValueNChoices, m_choiceLayerValueChoices, 0 );
150  m_choiceLayerValue->SetSelection( 1 );
151  fgSizer2->Add( m_choiceLayerValue, 0, wxALIGN_CENTER_VERTICAL, 5 );
152 
153  wxString m_choiceVisibleValueChoices[] = { _("Visible"), _("Invisible") };
154  int m_choiceVisibleValueNChoices = sizeof( m_choiceVisibleValueChoices ) / sizeof( wxString );
155  m_choiceVisibleValue = new wxChoice( sbSizerNewFootprints->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceVisibleValueNChoices, m_choiceVisibleValueChoices, 0 );
156  m_choiceVisibleValue->SetSelection( 0 );
157  fgSizer2->Add( m_choiceVisibleValue, 0, wxALIGN_CENTER_VERTICAL, 5 );
158 
159 
160  sbSizerNewFootprints->Add( fgSizer2, 0, wxEXPAND, 20 );
161 
162  m_staticTextInfo = new wxStaticText( sbSizerNewFootprints->GetStaticBox(), wxID_ANY, _("Leave reference and/or value blank to use footprint name."), wxDefaultPosition, wxDefaultSize, 0 );
163  m_staticTextInfo->Wrap( -1 );
164  sbSizerNewFootprints->Add( m_staticTextInfo, 0, wxTOP, 5 );
165 
166 
167  fgSizer3->Add( sbSizerNewFootprints, 0, wxALL|wxEXPAND, 5 );
168 
169  wxStaticBoxSizer* sbSizerEditOptions;
170  sbSizerEditOptions = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Editing Options") ), wxVERTICAL );
171 
172  m_MagneticPads = new wxCheckBox( sbSizerEditOptions->GetStaticBox(), wxID_ANY, _("Magnetic pads"), wxDefaultPosition, wxDefaultSize, 0 );
173  sbSizerEditOptions->Add( m_MagneticPads, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
174 
175 
176  sbSizerEditOptions->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
177 
178  m_Segments_45_Only_Ctrl = new wxCheckBox( sbSizerEditOptions->GetStaticBox(), wxID_SEGMENTS45, _("L&imit graphic lines to 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 );
179  m_Segments_45_Only_Ctrl->SetToolTip( _("Force line segment directions to H, V or 45 degrees when drawing on technical layers.") );
180 
181  sbSizerEditOptions->Add( m_Segments_45_Only_Ctrl, 0, wxALL, 5 );
182 
183  m_dragSelects = new wxCheckBox( sbSizerEditOptions->GetStaticBox(), wxID_ANY, _("Prefer selection to dragging"), wxDefaultPosition, wxDefaultSize, 0 );
184  m_dragSelects->SetToolTip( _("When enabled and nothing is selected, drag gesture will draw a selection box, even if there are items under the cursor that could be immediately dragged.") );
185 
186  sbSizerEditOptions->Add( m_dragSelects, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
187 
188 
189  fgSizer3->Add( sbSizerEditOptions, 0, wxALL|wxEXPAND, 5 );
190 
191 
192  bSizerMain->Add( fgSizer3, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
193 
194  wxBoxSizer* bSizerColumns;
195  bSizerColumns = new wxBoxSizer( wxHORIZONTAL );
196 
197 
198  bSizerMain->Add( bSizerColumns, 1, wxEXPAND, 5 );
199 
200  m_sdbSizer1 = new wxStdDialogButtonSizer();
201  m_sdbSizer1OK = new wxButton( this, wxID_OK );
202  m_sdbSizer1->AddButton( m_sdbSizer1OK );
203  m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
204  m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
205  m_sdbSizer1->Realize();
206 
207  bSizerMain->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
208 
209 
210  this->SetSizer( bSizerMain );
211  this->Layout();
212  bSizerMain->Fit( this );
213 
214  // Connect Events
215  m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODEDIT_OPTIONS_BASE::OnCancelClick ), NULL, this );
216  m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODEDIT_OPTIONS_BASE::OnOkClick ), NULL, this );
217 }
218 
220 {
221  // Disconnect Events
222  m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODEDIT_OPTIONS_BASE::OnCancelClick ), NULL, this );
223  m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODEDIT_OPTIONS_BASE::OnOkClick ), NULL, this );
224 
225 }
DIALOG_MODEDIT_OPTIONS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Footprint Editor Options"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:70
#define wxID_SEGMENTS45
virtual void OnCancelClick(wxCommandEvent &event)
#define wxID_POLAR_CTRL
virtual void OnOkClick(wxCommandEvent &event)
wxTextCtrl wrapper to handle math expression evaluation.
wxStdDialogButtonSizer * m_sdbSizer1
#define wxID_UNITS