KiCad PCB EDA Suite
dialog_pad_primitives_properties_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
10#include "widgets/wx_grid.h"
11
13
15
16DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE::DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
17{
18 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
19
20 wxBoxSizer* bSizermain;
21 bSizermain = new wxBoxSizer( wxVERTICAL );
22
23 wxFlexGridSizer* fgSizerShapeProperties;
24 fgSizerShapeProperties = new wxFlexGridSizer( 0, 7, 5, 0 );
25 fgSizerShapeProperties->AddGrowableCol( 2 );
26 fgSizerShapeProperties->AddGrowableCol( 4 );
27 fgSizerShapeProperties->SetFlexibleDirection( wxBOTH );
28 fgSizerShapeProperties->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
29
30 m_staticTextPosStart = new wxStaticText( this, wxID_ANY, _("Start point"), wxDefaultPosition, wxDefaultSize, 0 );
31 m_staticTextPosStart->Wrap( -1 );
32 fgSizerShapeProperties->Add( m_staticTextPosStart, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
33
34 m_startXLabel = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
35 m_startXLabel->Wrap( -1 );
36 fgSizerShapeProperties->Add( m_startXLabel, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 );
37
38 m_startXCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
39 fgSizerShapeProperties->Add( m_startXCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
40
41 m_startXUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
42 m_startXUnits->Wrap( -1 );
43 fgSizerShapeProperties->Add( m_startXUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 10 );
44
45 m_startYLabel = new wxStaticText( this, wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 );
46 m_startYLabel->Wrap( -1 );
47 fgSizerShapeProperties->Add( m_startYLabel, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
48
49 m_startYCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
50 fgSizerShapeProperties->Add( m_startYCtrl, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
51
52 m_startYUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
53 m_startYUnits->Wrap( -1 );
54 fgSizerShapeProperties->Add( m_startYUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
55
56 m_staticTextPosCtrl1 = new wxStaticText( this, wxID_ANY, _("Control point 1"), wxDefaultPosition, wxDefaultSize, 0 );
57 m_staticTextPosCtrl1->Wrap( -1 );
58 fgSizerShapeProperties->Add( m_staticTextPosCtrl1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
59
60 m_ctrl1XLabel = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
61 m_ctrl1XLabel->Wrap( -1 );
62 fgSizerShapeProperties->Add( m_ctrl1XLabel, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 );
63
64 m_ctrl1XCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
65 fgSizerShapeProperties->Add( m_ctrl1XCtrl, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
66
67 m_ctrl1XUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
68 m_ctrl1XUnits->Wrap( -1 );
69 fgSizerShapeProperties->Add( m_ctrl1XUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
70
71 m_ctrl1YLabel = new wxStaticText( this, wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 );
72 m_ctrl1YLabel->Wrap( -1 );
73 fgSizerShapeProperties->Add( m_ctrl1YLabel, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 );
74
75 m_ctrl1YCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
76 fgSizerShapeProperties->Add( m_ctrl1YCtrl, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
77
78 m_ctrl1YUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
79 m_ctrl1YUnits->Wrap( -1 );
80 fgSizerShapeProperties->Add( m_ctrl1YUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
81
82 m_staticTextPosCtrl2 = new wxStaticText( this, wxID_ANY, _("Control point 2"), wxDefaultPosition, wxDefaultSize, 0 );
83 m_staticTextPosCtrl2->Wrap( -1 );
84 fgSizerShapeProperties->Add( m_staticTextPosCtrl2, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
85
86 m_ctrl2XLabel = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
87 m_ctrl2XLabel->Wrap( -1 );
88 fgSizerShapeProperties->Add( m_ctrl2XLabel, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 );
89
90 m_ctrl2XCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
91 fgSizerShapeProperties->Add( m_ctrl2XCtrl, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
92
93 m_ctrl2XUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
94 m_ctrl2XUnits->Wrap( -1 );
95 fgSizerShapeProperties->Add( m_ctrl2XUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
96
97 m_ctrl2YLabel = new wxStaticText( this, wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 );
98 m_ctrl2YLabel->Wrap( -1 );
99 fgSizerShapeProperties->Add( m_ctrl2YLabel, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 );
100
101 m_ctrl2YCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
102 fgSizerShapeProperties->Add( m_ctrl2YCtrl, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
103
104 m_ctrl2YUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
105 m_ctrl2YUnits->Wrap( -1 );
106 fgSizerShapeProperties->Add( m_ctrl2YUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
107
108 m_staticTextPosEnd = new wxStaticText( this, wxID_ANY, _("End point"), wxDefaultPosition, wxDefaultSize, 0 );
109 m_staticTextPosEnd->Wrap( -1 );
110 fgSizerShapeProperties->Add( m_staticTextPosEnd, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
111
112 m_endXLabel = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
113 m_endXLabel->Wrap( -1 );
114 fgSizerShapeProperties->Add( m_endXLabel, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
115
116 m_endXCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
117 fgSizerShapeProperties->Add( m_endXCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
118
119 m_endXUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
120 m_endXUnits->Wrap( -1 );
121 fgSizerShapeProperties->Add( m_endXUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
122
123 m_endYLabel = new wxStaticText( this, wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 );
124 m_endYLabel->Wrap( -1 );
125 fgSizerShapeProperties->Add( m_endYLabel, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 );
126
127 m_endYCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
128 fgSizerShapeProperties->Add( m_endYCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
129
130 m_endYUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
131 m_endYUnits->Wrap( -1 );
132 fgSizerShapeProperties->Add( m_endYUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
133
134 m_radiusLabel = new wxStaticText( this, wxID_ANY, _("Radius:"), wxDefaultPosition, wxDefaultSize, 0 );
135 m_radiusLabel->Wrap( -1 );
136 fgSizerShapeProperties->Add( m_radiusLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
137
138
139 fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 );
140
141 m_radiusCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
142 fgSizerShapeProperties->Add( m_radiusCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
143
144 m_radiusUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
145 m_radiusUnits->Wrap( -1 );
146 fgSizerShapeProperties->Add( m_radiusUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
147
148
149 fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 );
150
151
152 fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 );
153
154
155 fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 );
156
157 m_thicknessLabel = new wxStaticText( this, wxID_ANY, _("Line width:"), wxDefaultPosition, wxDefaultSize, 0 );
158 m_thicknessLabel->Wrap( -1 );
159 fgSizerShapeProperties->Add( m_thicknessLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
160
161
162 fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 );
163
164 m_thicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
165 fgSizerShapeProperties->Add( m_thicknessCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
166
167 m_thicknessUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
168 m_thicknessUnits->Wrap( -1 );
169 fgSizerShapeProperties->Add( m_thicknessUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
170
171
172 fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 );
173
174 m_filledCtrl = new wxCheckBox( this, wxID_ANY, _("Filled shape"), wxDefaultPosition, wxDefaultSize, 0 );
175 fgSizerShapeProperties->Add( m_filledCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
176
177
178 bSizermain->Add( fgSizerShapeProperties, 1, wxEXPAND|wxALL, 10 );
179
180 m_sdbSizer = new wxStdDialogButtonSizer();
181 m_sdbSizerOK = new wxButton( this, wxID_OK );
182 m_sdbSizer->AddButton( m_sdbSizerOK );
183 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
184 m_sdbSizer->AddButton( m_sdbSizerCancel );
185 m_sdbSizer->Realize();
186
187 bSizermain->Add( m_sdbSizer, 0, wxBOTTOM|wxEXPAND|wxTOP, 5 );
188
189
190 this->SetSizer( bSizermain );
191 this->Layout();
192 bSizermain->Fit( this );
193
194 this->Centre( wxBOTH );
195}
196
198{
199}
200
201DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE::DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
202{
203 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
204
205 wxBoxSizer* bSizermain;
206 bSizermain = new wxBoxSizer( wxVERTICAL );
207
208 wxFlexGridSizer* fgSizerShapeProperties1;
209 fgSizerShapeProperties1 = new wxFlexGridSizer( 0, 7, 3, 0 );
210 fgSizerShapeProperties1->AddGrowableCol( 2 );
211 fgSizerShapeProperties1->AddGrowableCol( 4 );
212 fgSizerShapeProperties1->SetFlexibleDirection( wxBOTH );
213 fgSizerShapeProperties1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
214
215 m_staticTextMove = new wxStaticText( this, wxID_ANY, _("Move vector"), wxDefaultPosition, wxDefaultSize, 0 );
216 m_staticTextMove->Wrap( -1 );
217 fgSizerShapeProperties1->Add( m_staticTextMove, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
218
219 m_xLabel = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
220 m_xLabel->Wrap( -1 );
221 fgSizerShapeProperties1->Add( m_xLabel, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 );
222
223 m_xCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
224 fgSizerShapeProperties1->Add( m_xCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
225
226 m_xUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
227 m_xUnits->Wrap( -1 );
228 fgSizerShapeProperties1->Add( m_xUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 10 );
229
230 m_yLabel = new wxStaticText( this, wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 );
231 m_yLabel->Wrap( -1 );
232 fgSizerShapeProperties1->Add( m_yLabel, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
233
234 m_yCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
235 fgSizerShapeProperties1->Add( m_yCtrl, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
236
237 m_yUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
238 m_yUnits->Wrap( -1 );
239 fgSizerShapeProperties1->Add( m_yUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
240
241 m_rotationLabel = new wxStaticText( this, wxID_ANY, _("Rotation:"), wxDefaultPosition, wxDefaultSize, 0 );
242 m_rotationLabel->Wrap( -1 );
243 fgSizerShapeProperties1->Add( m_rotationLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
244
245
246 fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 );
247
248 m_rotationCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
249 fgSizerShapeProperties1->Add( m_rotationCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
250
251 m_rotationUnits = new wxStaticText( this, wxID_ANY, _("deg"), wxDefaultPosition, wxDefaultSize, 0 );
252 m_rotationUnits->Wrap( -1 );
253 fgSizerShapeProperties1->Add( m_rotationUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
254
255
256 fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 );
257
258
259 fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 );
260
261
262 fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 );
263
264 m_scaleLabel = new wxStaticText( this, wxID_ANY, _("Scaling factor:"), wxDefaultPosition, wxDefaultSize, 0 );
265 m_scaleLabel->Wrap( -1 );
266 fgSizerShapeProperties1->Add( m_scaleLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
267
268
269 fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 );
270
271 m_scaleCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, _("1"), wxDefaultPosition, wxDefaultSize, 0 );
272 fgSizerShapeProperties1->Add( m_scaleCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
273
274
275 fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 );
276
277
278 fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 );
279
280
281 fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 );
282
283
284 fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 );
285
286 m_staticTextDupCnt = new wxStaticText( this, wxID_ANY, _("Duplicate:"), wxDefaultPosition, wxDefaultSize, 0 );
287 m_staticTextDupCnt->Wrap( -1 );
288 fgSizerShapeProperties1->Add( m_staticTextDupCnt, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
289
290
291 fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 );
292
293 m_spinCtrlDuplicateCount = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 100, 1 );
294 fgSizerShapeProperties1->Add( m_spinCtrlDuplicateCount, 0, wxALL|wxEXPAND, 5 );
295
296
297 fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 );
298
299
300 bSizermain->Add( fgSizerShapeProperties1, 1, wxALL|wxEXPAND, 10 );
301
302 m_sdbSizer = new wxStdDialogButtonSizer();
303 m_sdbSizerOK = new wxButton( this, wxID_OK );
304 m_sdbSizer->AddButton( m_sdbSizerOK );
305 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
306 m_sdbSizer->AddButton( m_sdbSizerCancel );
307 m_sdbSizer->Realize();
308
309 bSizermain->Add( m_sdbSizer, 0, wxBOTTOM|wxEXPAND|wxTOP, 5 );
310
311
312 this->SetSizer( bSizermain );
313 this->Layout();
314 bSizermain->Fit( this );
315
316 this->Centre( wxBOTH );
317}
318
320{
321}
322
323DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
324{
325 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
326
327 wxBoxSizer* bSizerMain;
328 bSizerMain = new wxBoxSizer( wxVERTICAL );
329
330 wxBoxSizer* bSizerUpper;
331 bSizerUpper = new wxBoxSizer( wxHORIZONTAL );
332
333 wxBoxSizer* bLeftSizer;
334 bLeftSizer = new wxBoxSizer( wxVERTICAL );
335
336 m_gridCornersList = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE );
337
338 // Grid
339 m_gridCornersList->CreateGrid( 1, 2 );
340 m_gridCornersList->EnableEditing( true );
341 m_gridCornersList->EnableGridLines( true );
342 m_gridCornersList->EnableDragGridSize( false );
343 m_gridCornersList->SetMargins( 0, 0 );
344
345 // Columns
346 m_gridCornersList->SetColSize( 0, 124 );
347 m_gridCornersList->SetColSize( 1, 124 );
348 m_gridCornersList->EnableDragColMove( false );
349 m_gridCornersList->EnableDragColSize( true );
350 m_gridCornersList->SetColLabelValue( 0, _("Pos X") );
351 m_gridCornersList->SetColLabelValue( 1, _("Pos Y") );
353 m_gridCornersList->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
354
355 // Rows
356 m_gridCornersList->AutoSizeRows();
357 m_gridCornersList->EnableDragRowSize( false );
358 m_gridCornersList->SetRowLabelSize( 80 );
359 m_gridCornersList->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
360
361 // Label Appearance
362
363 // Cell Defaults
364 m_gridCornersList->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
365 bLeftSizer->Add( m_gridCornersList, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
366
367 wxBoxSizer* bSizerRightButts;
368 bSizerRightButts = new wxBoxSizer( wxHORIZONTAL );
369
370 m_addButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
371 m_addButton->SetMinSize( wxSize( 30,30 ) );
372
373 bSizerRightButts->Add( m_addButton, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
374
375
376 bSizerRightButts->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
377
378 m_deleteButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
379 m_deleteButton->SetMinSize( wxSize( 30,30 ) );
380
381 bSizerRightButts->Add( m_deleteButton, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
382
383
384 bLeftSizer->Add( bSizerRightButts, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
385
386 wxFlexGridSizer* fgSizerThickness;
387 fgSizerThickness = new wxFlexGridSizer( 0, 4, 0, 0 );
388 fgSizerThickness->AddGrowableCol( 1 );
389 fgSizerThickness->SetFlexibleDirection( wxBOTH );
390 fgSizerThickness->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
391
392 m_thicknessLabel = new wxStaticText( this, wxID_ANY, _("Line width:"), wxDefaultPosition, wxDefaultSize, 0 );
393 m_thicknessLabel->Wrap( -1 );
394 fgSizerThickness->Add( m_thicknessLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
395
396 m_thicknessCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
397 fgSizerThickness->Add( m_thicknessCtrl, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
398
399 m_thicknessUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
400 m_thicknessUnits->Wrap( -1 );
401 fgSizerThickness->Add( m_thicknessUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
402
403 m_filledCtrl = new wxCheckBox( this, wxID_ANY, _("Filled shape"), wxDefaultPosition, wxDefaultSize, 0 );
404 fgSizerThickness->Add( m_filledCtrl, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 20 );
405
406
407 bLeftSizer->Add( fgSizerThickness, 0, wxALL|wxEXPAND, 10 );
408
409
410 bSizerUpper->Add( bLeftSizer, 1, wxEXPAND|wxRIGHT, 5 );
411
412 wxBoxSizer* bRightSizer;
413 bRightSizer = new wxBoxSizer( wxVERTICAL );
414
415 m_panelPoly = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
416 m_panelPoly->SetBackgroundColour( wxColour( 0, 0, 0 ) );
417 m_panelPoly->SetMinSize( wxSize( 290,290 ) );
418
419 bRightSizer->Add( m_panelPoly, 1, wxEXPAND|wxTOP|wxRIGHT, 10 );
420
421 wxBoxSizer* m_warningSizer;
422 m_warningSizer = new wxBoxSizer( wxHORIZONTAL );
423
424 m_warningIcon = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
425 m_warningIcon->SetMinSize( wxSize( 50,50 ) );
426
427 m_warningSizer->Add( m_warningIcon, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
428
429 m_warningText = new wxStaticText( this, wxID_ANY, _("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 );
430 m_warningText->Wrap( -1 );
431 m_warningSizer->Add( m_warningText, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
432
433
434 m_warningSizer->Add( 5, 88, 0, 0, 5 );
435
436
437 bRightSizer->Add( m_warningSizer, 0, wxEXPAND|wxRIGHT, 10 );
438
439
440 bSizerUpper->Add( bRightSizer, 1, wxEXPAND|wxLEFT, 5 );
441
442
443 bSizerMain->Add( bSizerUpper, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
444
445 wxBoxSizer* bSizer24;
446 bSizer24 = new wxBoxSizer( wxHORIZONTAL );
447
448 m_statusLine1 = new wxStaticText( this, wxID_ANY, _("Coordinates are relative to anchor pad, rotated 0.0 deg."), wxDefaultPosition, wxDefaultSize, 0 );
449 m_statusLine1->Wrap( -1 );
450 bSizer24->Add( m_statusLine1, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 10 );
451
452 m_sdbSizer = new wxStdDialogButtonSizer();
453 m_sdbSizerOK = new wxButton( this, wxID_OK );
454 m_sdbSizer->AddButton( m_sdbSizerOK );
455 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
456 m_sdbSizer->AddButton( m_sdbSizerCancel );
457 m_sdbSizer->Realize();
458
459 bSizer24->Add( m_sdbSizer, 0, wxBOTTOM|wxEXPAND|wxTOP, 5 );
460
461
462 bSizerMain->Add( bSizer24, 0, wxEXPAND, 5 );
463
464
465 this->SetSizer( bSizerMain );
466 this->Layout();
467 bSizerMain->Fit( this );
468
469 this->Centre( wxBOTH );
470
471 // Connect Events
472 m_gridCornersList->Connect( wxEVT_GRID_RANGE_SELECT, wxGridRangeSelectEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onGridSelect ), NULL, this );
473 m_gridCornersList->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onCellSelect ), NULL, this );
474 m_addButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::OnButtonAdd ), NULL, this );
475 m_deleteButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::OnButtonDelete ), NULL, this );
476 m_panelPoly->Connect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onPaintPolyPanel ), NULL, this );
477 m_panelPoly->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onPolyPanelResize ), NULL, this );
478}
479
481{
482 // Disconnect Events
483 m_gridCornersList->Disconnect( wxEVT_GRID_RANGE_SELECT, wxGridRangeSelectEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onGridSelect ), NULL, this );
484 m_gridCornersList->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onCellSelect ), NULL, this );
485 m_addButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::OnButtonAdd ), NULL, this );
486 m_deleteButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::OnButtonDelete ), NULL, this );
487 m_panelPoly->Disconnect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onPaintPolyPanel ), NULL, this );
488 m_panelPoly->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onPolyPanelResize ), NULL, this );
489
490}
DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=wxEmptyString, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Pad Custom Shape Geometry Transform"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE)
virtual void onGridSelect(wxGridRangeSelectEvent &event)
DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Basic Shape Polygon"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:83
A bitmap button widget that behaves like a standard dialog button except with an icon.
wxTextCtrl wrapper to handle math expression evaluation.
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)