KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_create_array_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9
11
13
14DIALOG_CREATE_ARRAY_BASE::DIALOG_CREATE_ARRAY_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( wxSize( -1,-1 ), wxDefaultSize );
17
18 wxBoxSizer* bMainSizer;
19 bMainSizer = new wxBoxSizer( wxVERTICAL );
20
21 wxBoxSizer* bSizer7;
22 bSizer7 = new wxBoxSizer( wxHORIZONTAL );
23
24 m_gridTypeNotebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
25 m_gridPanel = new wxPanel( m_gridTypeNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
26 wxBoxSizer* bSizerGridArray;
27 bSizerGridArray = new wxBoxSizer( wxHORIZONTAL );
28
29 wxBoxSizer* bSizerGridLeft;
30 bSizerGridLeft = new wxBoxSizer( wxVERTICAL );
31
32 wxStaticBoxSizer* sbSizerGridSize;
33 sbSizerGridSize = new wxStaticBoxSizer( new wxStaticBox( m_gridPanel, wxID_ANY, _("Grid Array Size") ), wxVERTICAL );
34
35 wxFlexGridSizer* fgSizerGridSize;
36 fgSizerGridSize = new wxFlexGridSizer( 0, 2, 5, 5 );
37 fgSizerGridSize->AddGrowableCol( 1 );
38 fgSizerGridSize->SetFlexibleDirection( wxBOTH );
39 fgSizerGridSize->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
40
41 m_labelNx = new wxStaticText( sbSizerGridSize->GetStaticBox(), wxID_ANY, _("Horizontal count:"), wxDefaultPosition, wxDefaultSize, 0 );
42 m_labelNx->Wrap( -1 );
43 m_labelNx->SetToolTip( _("Number of columns") );
44
45 fgSizerGridSize->Add( m_labelNx, 0, wxALIGN_CENTER_VERTICAL, 5 );
46
47 m_entryNx = new TEXT_CTRL_EVAL( sbSizerGridSize->GetStaticBox(), wxID_ANY, _("5"), wxDefaultPosition, wxDefaultSize, 0 );
48 m_entryNx->SetMinSize( wxSize( 60,-1 ) );
49
50 fgSizerGridSize->Add( m_entryNx, 0, wxEXPAND, 5 );
51
52 m_labelNy = new wxStaticText( sbSizerGridSize->GetStaticBox(), wxID_ANY, _("Vertical count:"), wxDefaultPosition, wxDefaultSize, 0 );
53 m_labelNy->Wrap( -1 );
54 m_labelNy->SetToolTip( _("Number of rows") );
55
56 fgSizerGridSize->Add( m_labelNy, 0, wxALIGN_CENTER_VERTICAL, 5 );
57
58 m_entryNy = new TEXT_CTRL_EVAL( sbSizerGridSize->GetStaticBox(), wxID_ANY, _("5"), wxDefaultPosition, wxDefaultSize, 0 );
59 m_entryNy->SetToolTip( _("Number of rows") );
60 m_entryNy->SetMinSize( wxSize( 60,-1 ) );
61
62 fgSizerGridSize->Add( m_entryNy, 0, wxEXPAND, 5 );
63
64
65 sbSizerGridSize->Add( fgSizerGridSize, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
66
67
68 bSizerGridLeft->Add( sbSizerGridSize, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 10 );
69
70 wxStaticBoxSizer* sbSizerItemsSpacing;
71 sbSizerItemsSpacing = new wxStaticBoxSizer( new wxStaticBox( m_gridPanel, wxID_ANY, _("Items Spacing") ), wxVERTICAL );
72
73 wxFlexGridSizer* fgSizerItemSpacing;
74 fgSizerItemSpacing = new wxFlexGridSizer( 0, 3, 5, 5 );
75 fgSizerItemSpacing->AddGrowableCol( 1 );
76 fgSizerItemSpacing->SetFlexibleDirection( wxBOTH );
77 fgSizerItemSpacing->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
78
79 m_labelDx = new wxStaticText( sbSizerItemsSpacing->GetStaticBox(), wxID_ANY, _("Horizontal spacing:"), wxDefaultPosition, wxDefaultSize, 0 );
80 m_labelDx->Wrap( -1 );
81 m_labelDx->SetToolTip( _("Distance between columns") );
82
83 fgSizerItemSpacing->Add( m_labelDx, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
84
85 m_entryDx = new wxTextCtrl( sbSizerItemsSpacing->GetStaticBox(), wxID_ANY, _("5"), wxDefaultPosition, wxDefaultSize, 0 );
86 fgSizerItemSpacing->Add( m_entryDx, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
87
88 m_unitLabelDx = new wxStaticText( sbSizerItemsSpacing->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
89 m_unitLabelDx->Wrap( -1 );
90 fgSizerItemSpacing->Add( m_unitLabelDx, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
91
92 m_labelDy = new wxStaticText( sbSizerItemsSpacing->GetStaticBox(), wxID_ANY, _("Vertical spacing:"), wxDefaultPosition, wxDefaultSize, 0 );
93 m_labelDy->Wrap( -1 );
94 m_labelDy->SetToolTip( _("Distance between rows") );
95
96 fgSizerItemSpacing->Add( m_labelDy, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
97
98 m_entryDy = new wxTextCtrl( sbSizerItemsSpacing->GetStaticBox(), wxID_ANY, _("5"), wxDefaultPosition, wxDefaultSize, 0 );
99 fgSizerItemSpacing->Add( m_entryDy, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
100
101 m_unitLabelDy = new wxStaticText( sbSizerItemsSpacing->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
102 m_unitLabelDy->Wrap( -1 );
103 fgSizerItemSpacing->Add( m_unitLabelDy, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
104
105
106 fgSizerItemSpacing->Add( 0, 5, 1, wxEXPAND, 5 );
107
108
109 fgSizerItemSpacing->Add( 0, 0, 1, wxEXPAND, 5 );
110
111
112 fgSizerItemSpacing->Add( 0, 0, 1, wxEXPAND, 5 );
113
114 m_labelOffsetX = new wxStaticText( sbSizerItemsSpacing->GetStaticBox(), wxID_ANY, _("Horizontal offset:"), wxDefaultPosition, wxDefaultSize, 0 );
115 m_labelOffsetX->Wrap( -1 );
116 m_labelOffsetX->SetToolTip( _("Offset added to the next row position.") );
117
118 fgSizerItemSpacing->Add( m_labelOffsetX, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
119
120 m_entryOffsetX = new wxTextCtrl( sbSizerItemsSpacing->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
121 fgSizerItemSpacing->Add( m_entryOffsetX, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
122
123 m_unitLabelOffsetX = new wxStaticText( sbSizerItemsSpacing->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
124 m_unitLabelOffsetX->Wrap( -1 );
125 fgSizerItemSpacing->Add( m_unitLabelOffsetX, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
126
127 m_labelOffsetY = new wxStaticText( sbSizerItemsSpacing->GetStaticBox(), wxID_ANY, _("Vertical offset:"), wxDefaultPosition, wxDefaultSize, 0 );
128 m_labelOffsetY->Wrap( -1 );
129 m_labelOffsetY->SetToolTip( _("Offset added to the next column position") );
130
131 fgSizerItemSpacing->Add( m_labelOffsetY, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
132
133 m_entryOffsetY = new wxTextCtrl( sbSizerItemsSpacing->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
134 fgSizerItemSpacing->Add( m_entryOffsetY, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
135
136 m_unitLabelOffsetY = new wxStaticText( sbSizerItemsSpacing->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
137 m_unitLabelOffsetY->Wrap( -1 );
138 fgSizerItemSpacing->Add( m_unitLabelOffsetY, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
139
140
141 sbSizerItemsSpacing->Add( fgSizerItemSpacing, 1, wxEXPAND|wxBOTTOM, 5 );
142
143
144 bSizerGridLeft->Add( sbSizerItemsSpacing, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 );
145
146 wxStaticBoxSizer* sbSizerStagger;
147 sbSizerStagger = new wxStaticBoxSizer( new wxStaticBox( m_gridPanel, wxID_ANY, _("Stagger Settings") ), wxVERTICAL );
148
149 wxBoxSizer* bSizerStaggerset;
150 bSizerStaggerset = new wxBoxSizer( wxHORIZONTAL );
151
152 m_labelStagger = new wxStaticText( sbSizerStagger->GetStaticBox(), wxID_ANY, _("Stagger:"), wxDefaultPosition, wxDefaultSize, 0 );
153 m_labelStagger->Wrap( -1 );
154 m_labelStagger->SetToolTip( _("Value -1, 0 or 1 disable this option.") );
155
156 bSizerStaggerset->Add( m_labelStagger, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
157
158 m_entryStagger = new TEXT_CTRL_EVAL( sbSizerStagger->GetStaticBox(), wxID_ANY, _("1"), wxDefaultPosition, wxDefaultSize, 0 );
159 bSizerStaggerset->Add( m_entryStagger, 1, wxRIGHT|wxLEFT|wxEXPAND, 5 );
160
161
162 sbSizerStagger->Add( bSizerStaggerset, 1, wxEXPAND, 5 );
163
164 m_staggerRows = new wxRadioButton( sbSizerStagger->GetStaticBox(), wxID_ANY, _("Rows"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
165 sbSizerStagger->Add( m_staggerRows, 0, wxALL, 5 );
166
167 m_staggerCols = new wxRadioButton( sbSizerStagger->GetStaticBox(), wxID_ANY, _("Columns"), wxDefaultPosition, wxDefaultSize, 0 );
168 m_staggerCols->SetValue( true );
169 sbSizerStagger->Add( m_staggerCols, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
170
171
172 bSizerGridLeft->Add( sbSizerStagger, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 );
173
174 wxStaticBoxSizer* sbGridPosition;
175 sbGridPosition = new wxStaticBoxSizer( new wxStaticBox( m_gridPanel, wxID_ANY, _("Grid Position") ), wxVERTICAL );
176
177 m_rbItemsRemainInPlace = new wxRadioButton( sbGridPosition->GetStaticBox(), wxID_ANY, _("Source items remain in place"), wxDefaultPosition, wxDefaultSize, 0 );
178 sbGridPosition->Add( m_rbItemsRemainInPlace, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
179
180 m_rbCentreOnSource = new wxRadioButton( sbGridPosition->GetStaticBox(), wxID_ANY, _("Centre on source items"), wxDefaultPosition, wxDefaultSize, 0 );
181 sbGridPosition->Add( m_rbCentreOnSource, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
182
183
184 bSizerGridLeft->Add( sbGridPosition, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 10 );
185
186
187 bSizerGridArray->Add( bSizerGridLeft, 1, wxEXPAND, 5 );
188
189 m_gridPadNumberingPanel = new wxPanel( m_gridPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
191
192 wxBoxSizer* bSizer15;
193 bSizer15 = new wxBoxSizer( wxVERTICAL );
194
195 m_gridPadNumberingSizer = new wxBoxSizer( wxVERTICAL );
196
197 wxString m_radioBoxGridNumberingAxisChoices[] = { _("Horizontal, then vertical"), _("Vertical, then horizontal") };
198 int m_radioBoxGridNumberingAxisNChoices = sizeof( m_radioBoxGridNumberingAxisChoices ) / sizeof( wxString );
199 m_radioBoxGridNumberingAxis = new wxRadioBox( m_gridPadNumberingPanel, wxID_ANY, _("Numbering Direction"), wxDefaultPosition, wxDefaultSize, m_radioBoxGridNumberingAxisNChoices, m_radioBoxGridNumberingAxisChoices, 1, wxRA_SPECIFY_COLS );
200 m_radioBoxGridNumberingAxis->SetSelection( 0 );
201 m_gridPadNumberingSizer->Add( m_radioBoxGridNumberingAxis, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
202
203 m_checkBoxGridReverseNumbering = new wxCheckBox( m_gridPadNumberingPanel, wxID_ANY, _("Reverse numbering on alternate rows/columns"), wxDefaultPosition, wxDefaultSize, 0 );
205
206 wxString m_rbGridStartNumberingOptChoices[] = { _("Use first free number"), _("From start value") };
207 int m_rbGridStartNumberingOptNChoices = sizeof( m_rbGridStartNumberingOptChoices ) / sizeof( wxString );
208 m_rbGridStartNumberingOpt = new wxRadioBox( m_gridPadNumberingPanel, wxID_ANY, _("Initial Pad Number"), wxDefaultPosition, wxDefaultSize, m_rbGridStartNumberingOptNChoices, m_rbGridStartNumberingOptChoices, 1, wxRA_SPECIFY_COLS );
209 m_rbGridStartNumberingOpt->SetSelection( 1 );
210 m_gridPadNumberingSizer->Add( m_rbGridStartNumberingOpt, 0, wxALL|wxEXPAND, 5 );
211
212 wxString m_radioBoxGridNumberingSchemeChoices[] = { _("Continuous (1, 2, 3...)"), _("Coordinate (A1, A2, ... B1, ...)") };
213 int m_radioBoxGridNumberingSchemeNChoices = sizeof( m_radioBoxGridNumberingSchemeChoices ) / sizeof( wxString );
214 m_radioBoxGridNumberingScheme = new wxRadioBox( m_gridPadNumberingPanel, wxID_ANY, _("Pad Numbering Scheme"), wxDefaultPosition, wxDefaultSize, m_radioBoxGridNumberingSchemeNChoices, m_radioBoxGridNumberingSchemeChoices, 1, wxRA_SPECIFY_COLS );
215 m_radioBoxGridNumberingScheme->SetSelection( 1 );
216 m_gridPadNumberingSizer->Add( m_radioBoxGridNumberingScheme, 0, wxALL|wxEXPAND, 5 );
217
218 m_labelPriAxisNumbering = new wxStaticText( m_gridPadNumberingPanel, wxID_ANY, _("Primary axis numbering:"), wxDefaultPosition, wxDefaultSize, 0 );
219 m_labelPriAxisNumbering->Wrap( -1 );
220 m_gridPadNumberingSizer->Add( m_labelPriAxisNumbering, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
221
222 wxArrayString m_choicePriAxisNumberingChoices;
223 m_choicePriAxisNumbering = new wxChoice( m_gridPadNumberingPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choicePriAxisNumberingChoices, 0 );
224 m_choicePriAxisNumbering->SetSelection( 0 );
225 m_gridPadNumberingSizer->Add( m_choicePriAxisNumbering, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
226
227 m_labelSecAxisNumbering = new wxStaticText( m_gridPadNumberingPanel, wxID_ANY, _("Secondary axis numbering:"), wxDefaultPosition, wxDefaultSize, 0 );
228 m_labelSecAxisNumbering->Wrap( -1 );
229 m_labelSecAxisNumbering->Enable( false );
230
231 m_gridPadNumberingSizer->Add( m_labelSecAxisNumbering, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
232
233 wxArrayString m_choiceSecAxisNumberingChoices;
234 m_choiceSecAxisNumbering = new wxChoice( m_gridPadNumberingPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceSecAxisNumberingChoices, 0 );
235 m_choiceSecAxisNumbering->SetSelection( 0 );
236 m_choiceSecAxisNumbering->Enable( false );
237
238 m_gridPadNumberingSizer->Add( m_choiceSecAxisNumbering, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
239
240 wxFlexGridSizer* fgSizer1;
241 fgSizer1 = new wxFlexGridSizer( 2, 3, 0, 0 );
242 fgSizer1->AddGrowableCol( 0 );
243 fgSizer1->SetFlexibleDirection( wxBOTH );
244 fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
245
246 m_labelGridNumberingOffset = new wxStaticText( m_gridPadNumberingPanel, wxID_ANY, _("Pad numbering start:"), wxDefaultPosition, wxDefaultSize, 0 );
247 m_labelGridNumberingOffset->Wrap( -1 );
248 fgSizer1->Add( m_labelGridNumberingOffset, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
249
250 m_entryGridPriNumberingOffset = new wxTextCtrl( m_gridPadNumberingPanel, wxID_ANY, _("1"), wxDefaultPosition, wxDefaultSize, 0 );
251 m_entryGridPriNumberingOffset->SetMinSize( wxSize( 72,-1 ) );
252
253 fgSizer1->Add( m_entryGridPriNumberingOffset, 0, wxALL, 5 );
254
255 m_entryGridSecNumberingOffset = new wxTextCtrl( m_gridPadNumberingPanel, wxID_ANY, _("1"), wxDefaultPosition, wxDefaultSize, 0 );
256 m_entryGridSecNumberingOffset->SetMinSize( wxSize( 72,-1 ) );
257
258 fgSizer1->Add( m_entryGridSecNumberingOffset, 0, wxALL, 5 );
259
260 m_labelGridNumberingStep = new wxStaticText( m_gridPadNumberingPanel, wxID_ANY, _("Pad numbering increment:"), wxDefaultPosition, wxDefaultSize, 0 );
261 m_labelGridNumberingStep->Wrap( -1 );
262 fgSizer1->Add( m_labelGridNumberingStep, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
263
264 m_entryGridPriNumberingStep = new wxTextCtrl( m_gridPadNumberingPanel, wxID_ANY, _("1"), wxDefaultPosition, wxDefaultSize, 0 );
265 m_entryGridPriNumberingStep->SetMinSize( wxSize( 72,-1 ) );
266
267 fgSizer1->Add( m_entryGridPriNumberingStep, 0, wxALL, 5 );
268
269 m_entryGridSecNumberingStep = new wxTextCtrl( m_gridPadNumberingPanel, wxID_ANY, _("1"), wxDefaultPosition, wxDefaultSize, 0 );
270 m_entryGridSecNumberingStep->SetMinSize( wxSize( 72,-1 ) );
271
272 fgSizer1->Add( m_entryGridSecNumberingStep, 0, wxALL, 5 );
273
274
275 m_gridPadNumberingSizer->Add( fgSizer1, 0, wxEXPAND, 5 );
276
277
278 bSizer15->Add( m_gridPadNumberingSizer, 1, wxEXPAND|wxLEFT, 10 );
279
280
281 m_gridPadNumberingPanel->SetSizer( bSizer15 );
282 m_gridPadNumberingPanel->Layout();
283 bSizer15->Fit( m_gridPadNumberingPanel );
284 bSizerGridArray->Add( m_gridPadNumberingPanel, 1, wxEXPAND, 5 );
285
286
287 m_gridPanel->SetSizer( bSizerGridArray );
288 m_gridPanel->Layout();
289 bSizerGridArray->Fit( m_gridPanel );
290 m_gridTypeNotebook->AddPage( m_gridPanel, _("Grid Array"), false );
291 m_circularPanel = new wxPanel( m_gridTypeNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
292 wxBoxSizer* bSizer4;
293 bSizer4 = new wxBoxSizer( wxHORIZONTAL );
294
295 wxBoxSizer* bSizerCircLeft;
296 bSizerCircLeft = new wxBoxSizer( wxVERTICAL );
297
298 wxStaticBoxSizer* sbSizerInfo;
299 sbSizerInfo = new wxStaticBoxSizer( new wxStaticBox( m_circularPanel, wxID_ANY, _("Center position") ), wxVERTICAL );
300
301 wxFlexGridSizer* fgSizerArrayPrms;
302 fgSizerArrayPrms = new wxFlexGridSizer( 0, 3, 5, 5 );
303 fgSizerArrayPrms->AddGrowableCol( 1 );
304 fgSizerArrayPrms->SetFlexibleDirection( wxBOTH );
305 fgSizerArrayPrms->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
306
307 m_labelCentreX = new wxStaticText( sbSizerInfo->GetStaticBox(), wxID_ANY, _("Center pos X:"), wxDefaultPosition, wxDefaultSize, 0 );
308 m_labelCentreX->Wrap( -1 );
309 fgSizerArrayPrms->Add( m_labelCentreX, 0, wxALIGN_CENTER_VERTICAL, 5 );
310
311 m_entryCentreX = new wxTextCtrl( sbSizerInfo->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
312 fgSizerArrayPrms->Add( m_entryCentreX, 0, wxEXPAND|wxTOP, 5 );
313
314 m_unitLabelCentreX = new wxStaticText( sbSizerInfo->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
315 m_unitLabelCentreX->Wrap( -1 );
316 fgSizerArrayPrms->Add( m_unitLabelCentreX, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
317
318 m_labelCentreY = new wxStaticText( sbSizerInfo->GetStaticBox(), wxID_ANY, _("Center pos Y:"), wxDefaultPosition, wxDefaultSize, 0 );
319 m_labelCentreY->Wrap( -1 );
320 fgSizerArrayPrms->Add( m_labelCentreY, 0, wxALIGN_CENTER_VERTICAL, 5 );
321
322 m_entryCentreY = new wxTextCtrl( sbSizerInfo->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
323 fgSizerArrayPrms->Add( m_entryCentreY, 0, wxEXPAND, 5 );
324
325 m_unitLabelCentreY = new wxStaticText( sbSizerInfo->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
326 m_unitLabelCentreY->Wrap( -1 );
327 fgSizerArrayPrms->Add( m_unitLabelCentreY, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
328
329
330 fgSizerArrayPrms->Add( 0, 0, 1, wxEXPAND, 5 );
331
332
333 sbSizerInfo->Add( fgSizerArrayPrms, 0, wxEXPAND|wxLEFT, 25 );
334
335 wxBoxSizer* bSizer12;
336 bSizer12 = new wxBoxSizer( wxHORIZONTAL );
337
338 m_btnSelectCenterPoint = new wxButton( sbSizerInfo->GetStaticBox(), wxID_ANY, _("Select Point..."), wxDefaultPosition, wxDefaultSize, 0 );
339 bSizer12->Add( m_btnSelectCenterPoint, 1, wxALL, 5 );
340
341 m_btnSelectCenterItem = new wxButton( sbSizerInfo->GetStaticBox(), wxID_ANY, _("Select Item..."), wxDefaultPosition, wxDefaultSize, 0 );
342 bSizer12->Add( m_btnSelectCenterItem, 1, wxALL, 5 );
343
344
345 sbSizerInfo->Add( bSizer12, 1, wxEXPAND, 5 );
346
347
348 bSizerCircLeft->Add( sbSizerInfo, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 );
349
350 wxStaticBoxSizer* sbSizerDupPrms;
351 sbSizerDupPrms = new wxStaticBoxSizer( new wxStaticBox( m_circularPanel, wxID_ANY, _("Duplication Settings") ), wxVERTICAL );
352
353 m_checkBoxFullCircle = new wxCheckBox( sbSizerDupPrms->GetStaticBox(), wxID_ANY, _("Full circle"), wxDefaultPosition, wxDefaultSize, 0 );
354 m_checkBoxFullCircle->SetValue(true);
355 sbSizerDupPrms->Add( m_checkBoxFullCircle, 0, wxALL, 5 );
356
357 wxFlexGridSizer* fgSizerDupPrms;
358 fgSizerDupPrms = new wxFlexGridSizer( 0, 3, 5, 5 );
359 fgSizerDupPrms->AddGrowableCol( 1 );
360 fgSizerDupPrms->SetFlexibleDirection( wxBOTH );
361 fgSizerDupPrms->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
362
363 m_labelCircAngle = new wxStaticText( sbSizerDupPrms->GetStaticBox(), wxID_ANY, _("Angle between items:"), wxDefaultPosition, wxDefaultSize, 0 );
364 m_labelCircAngle->Wrap( -1 );
365 fgSizerDupPrms->Add( m_labelCircAngle, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
366
367 m_entryCircAngle = new wxTextCtrl( sbSizerDupPrms->GetStaticBox(), wxID_ANY, _("90"), wxDefaultPosition, wxDefaultSize, 0 );
368 m_entryCircAngle->SetToolTip( _("Positive angles represent an anti-clockwise rotation. An angle of 0 will produce a full circle divided evenly into \"Count\" portions.") );
369
370 fgSizerDupPrms->Add( m_entryCircAngle, 0, wxEXPAND, 5 );
371
372 m_unitLabelCircAngle = new wxStaticText( sbSizerDupPrms->GetStaticBox(), wxID_ANY, _("deg"), wxDefaultPosition, wxDefaultSize, 0 );
373 m_unitLabelCircAngle->Wrap( -1 );
374 fgSizerDupPrms->Add( m_unitLabelCircAngle, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
375
376 m_labelCircCount = new wxStaticText( sbSizerDupPrms->GetStaticBox(), wxID_ANY, _("Item count:"), wxDefaultPosition, wxDefaultSize, 0 );
377 m_labelCircCount->Wrap( -1 );
378 fgSizerDupPrms->Add( m_labelCircCount, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
379
380 m_entryCircCount = new TEXT_CTRL_EVAL( sbSizerDupPrms->GetStaticBox(), wxID_ANY, _("4"), wxDefaultPosition, wxDefaultSize, 0 );
381 m_entryCircCount->SetToolTip( _("How many items in the array.") );
382
383 fgSizerDupPrms->Add( m_entryCircCount, 0, wxEXPAND, 5 );
384
385
386 sbSizerDupPrms->Add( fgSizerDupPrms, 0, wxBOTTOM|wxEXPAND, 5 );
387
388 m_entryRotateItemsCb = new wxCheckBox( sbSizerDupPrms->GetStaticBox(), wxID_ANY, _("Rotate items"), wxDefaultPosition, wxDefaultSize, 0 );
389 m_entryRotateItemsCb->SetValue(true);
390 m_entryRotateItemsCb->SetToolTip( _("Rotate the item as well as move it - multi-selections will be rotated together") );
391
392 sbSizerDupPrms->Add( m_entryRotateItemsCb, 0, wxALL, 5 );
393
394
395 bSizerCircLeft->Add( sbSizerDupPrms, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 );
396
397
398 bSizer4->Add( bSizerCircLeft, 1, wxEXPAND, 5 );
399
400 m_circularPadNumberingPanel = new wxPanel( m_circularPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
402
403 wxBoxSizer* bSizer13;
404 bSizer13 = new wxBoxSizer( wxHORIZONTAL );
405
406
407 bSizer13->Add( 10, 0, 0, wxEXPAND, 5 );
408
409 m_circPadNumberingSizer = new wxStaticBoxSizer( new wxStaticBox( m_circularPadNumberingPanel, wxID_ANY, _("Numbering Options") ), wxVERTICAL );
410
411 wxString m_rbCircStartNumberingOptChoices[] = { _("Use first free number"), _("From start value") };
412 int m_rbCircStartNumberingOptNChoices = sizeof( m_rbCircStartNumberingOptChoices ) / sizeof( wxString );
413 m_rbCircStartNumberingOpt = new wxRadioBox( m_circPadNumberingSizer->GetStaticBox(), wxID_ANY, _("Initial Pad Number:"), wxDefaultPosition, wxDefaultSize, m_rbCircStartNumberingOptNChoices, m_rbCircStartNumberingOptChoices, 1, wxRA_SPECIFY_COLS );
414 m_rbCircStartNumberingOpt->SetSelection( 0 );
415 m_circPadNumberingSizer->Add( m_rbCircStartNumberingOpt, 0, wxALL|wxEXPAND, 5 );
416
417 m_labelCircNumbering = new wxStaticText( m_circPadNumberingSizer->GetStaticBox(), wxID_ANY, _("Pad Numbering:"), wxDefaultPosition, wxDefaultSize, 0 );
418 m_labelCircNumbering->Wrap( -1 );
420
421 wxArrayString m_choiceCircNumberingChoices;
422 m_choiceCircNumbering = new wxChoice( m_circPadNumberingSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceCircNumberingChoices, 0 );
423 m_choiceCircNumbering->SetSelection( 0 );
424 m_circPadNumberingSizer->Add( m_choiceCircNumbering, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
425
426 wxFlexGridSizer* fgSizer2;
427 fgSizer2 = new wxFlexGridSizer( 0, 2, 0, 0 );
428 fgSizer2->AddGrowableCol( 0 );
429 fgSizer2->SetFlexibleDirection( wxBOTH );
430 fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
431
432 m_labelCircNumStart = new wxStaticText( m_circPadNumberingSizer->GetStaticBox(), wxID_ANY, _("Pad numbering start:"), wxDefaultPosition, wxDefaultSize, 0 );
433 m_labelCircNumStart->Wrap( -1 );
434 fgSizer2->Add( m_labelCircNumStart, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
435
436 m_entryCircNumberingStart = new wxTextCtrl( m_circPadNumberingSizer->GetStaticBox(), wxID_ANY, _("1"), wxDefaultPosition, wxDefaultSize, 0 );
437 fgSizer2->Add( m_entryCircNumberingStart, 1, wxALL, 5 );
438
439 m_labelCircNumStep = new wxStaticText( m_circPadNumberingSizer->GetStaticBox(), wxID_ANY, _("Pad numbering increment:"), wxDefaultPosition, wxDefaultSize, 0 );
440 m_labelCircNumStep->Wrap( -1 );
441 fgSizer2->Add( m_labelCircNumStep, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
442
443 m_entryCircNumberingStep = new wxTextCtrl( m_circPadNumberingSizer->GetStaticBox(), wxID_ANY, _("1"), wxDefaultPosition, wxDefaultSize, 0 );
444 fgSizer2->Add( m_entryCircNumberingStep, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
445
446
447 m_circPadNumberingSizer->Add( fgSizer2, 0, wxEXPAND, 5 );
448
449
450 bSizer13->Add( m_circPadNumberingSizer, 1, wxEXPAND, 5 );
451
452
453 m_circularPadNumberingPanel->SetSizer( bSizer13 );
455 bSizer13->Fit( m_circularPadNumberingPanel );
456 bSizer4->Add( m_circularPadNumberingPanel, 0, wxEXPAND | wxALL, 5 );
457
458
459 m_circularPanel->SetSizer( bSizer4 );
460 m_circularPanel->Layout();
461 bSizer4->Fit( m_circularPanel );
462 m_gridTypeNotebook->AddPage( m_circularPanel, _("Circular Array"), true );
463
464 bSizer7->Add( m_gridTypeNotebook, 1, wxALL|wxEXPAND, 10 );
465
466 m_footprintReannotatePanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
467 wxBoxSizer* bSizer8;
468 bSizer8 = new wxBoxSizer( wxVERTICAL );
469
470 wxStaticBoxSizer* sbSizerFootprintAnnotation;
471 sbSizerFootprintAnnotation = new wxStaticBoxSizer( new wxStaticBox( m_footprintReannotatePanel, wxID_ANY, _("Footprint Annotation") ), wxVERTICAL );
472
473 m_radioBtnKeepRefs = new wxRadioButton( sbSizerFootprintAnnotation->GetStaticBox(), wxID_ANY, _("Keep existing reference designators"), wxDefaultPosition, wxDefaultSize, 0 );
474 sbSizerFootprintAnnotation->Add( m_radioBtnKeepRefs, 0, wxALL, 5 );
475
476 m_radioBtnUniqueRefs = new wxRadioButton( sbSizerFootprintAnnotation->GetStaticBox(), wxID_ANY, _("Assign unique reference designators"), wxDefaultPosition, wxDefaultSize, 0 );
477 m_radioBtnUniqueRefs->SetValue( true );
478 m_radioBtnUniqueRefs->SetToolTip( _("This can conflict with reference designators in the schematic that have not yet been synchronized with the board.") );
479
480 sbSizerFootprintAnnotation->Add( m_radioBtnUniqueRefs, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
481
482
483 bSizer8->Add( sbSizerFootprintAnnotation, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
484
485
486 m_footprintReannotatePanel->SetSizer( bSizer8 );
488 bSizer8->Fit( m_footprintReannotatePanel );
489 bSizer7->Add( m_footprintReannotatePanel, 1, wxEXPAND | wxALL, 5 );
490
491
492 bMainSizer->Add( bSizer7, 1, wxEXPAND, 5 );
493
494 m_stdButtons = new wxStdDialogButtonSizer();
495 m_stdButtonsOK = new wxButton( this, wxID_OK );
496 m_stdButtons->AddButton( m_stdButtonsOK );
497 m_stdButtonsCancel = new wxButton( this, wxID_CANCEL );
498 m_stdButtons->AddButton( m_stdButtonsCancel );
499 m_stdButtons->Realize();
500
501 bMainSizer->Add( m_stdButtons, 0, wxALL|wxEXPAND, 5 );
502
503
504 this->SetSizer( bMainSizer );
505 this->Layout();
506 bMainSizer->Fit( this );
507
508 // Connect Events
509 this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_CREATE_ARRAY_BASE::OnClose ) );
510 m_entryNx->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this );
511 m_entryNy->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this );
512 m_entryDx->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this );
513 m_entryDy->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this );
514 m_entryOffsetX->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this );
515 m_entryOffsetY->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this );
516 m_entryStagger->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this );
517 m_rbGridStartNumberingOpt->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this );
518 m_radioBoxGridNumberingScheme->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this );
519 m_entryCentreX->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this );
520 m_entryCentreY->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this );
521 m_btnSelectCenterPoint->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnSelectCenterButton ), NULL, this );
522 m_btnSelectCenterItem->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnSelectCenterButton ), NULL, this );
523 m_checkBoxFullCircle->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this );
524 m_entryCircAngle->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this );
525 m_entryCircCount->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this );
526 m_rbCircStartNumberingOpt->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this );
527}
528
530{
531 // Disconnect Events
532 this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_CREATE_ARRAY_BASE::OnClose ) );
533 m_entryNx->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this );
534 m_entryNy->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this );
535 m_entryDx->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this );
536 m_entryDy->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this );
537 m_entryOffsetX->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this );
538 m_entryOffsetY->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this );
539 m_entryStagger->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this );
540 m_rbGridStartNumberingOpt->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this );
541 m_radioBoxGridNumberingScheme->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this );
542 m_entryCentreX->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this );
543 m_entryCentreY->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this );
544 m_btnSelectCenterPoint->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnSelectCenterButton ), NULL, this );
545 m_btnSelectCenterItem->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnSelectCenterButton ), NULL, this );
546 m_checkBoxFullCircle->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this );
547 m_entryCircAngle->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this );
548 m_entryCircCount->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this );
549 m_rbCircStartNumberingOpt->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_CREATE_ARRAY_BASE::OnParameterChanged ), NULL, this );
550
551}
virtual void OnClose(wxCloseEvent &event)
wxStaticBoxSizer * m_circPadNumberingSizer
virtual void OnParameterChanged(wxCommandEvent &event)
virtual void OnSelectCenterButton(wxCommandEvent &event)
DIALOG_CREATE_ARRAY_BASE(wxWindow *parent, wxWindowID id=wxID_DIALOG_CREATE_ARRAY, const wxString &title=_("Create Array"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxStdDialogButtonSizer * m_stdButtons
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:88
wxTextCtrl wrapper to handle math expression evaluation.
#define _(s)