KiCad PCB EDA Suite
dialog_pad_properties_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Apr 19 2018)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
9 #include "widgets/wx_grid.h"
10 
12 
14 
15 DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_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 )
16 {
17  this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
18 
19  wxBoxSizer* m_MainSizer;
20  m_MainSizer = new wxBoxSizer( wxVERTICAL );
21 
22  wxBoxSizer* bSizerUpper;
23  bSizerUpper = new wxBoxSizer( wxHORIZONTAL );
24 
25  m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
26  m_notebook->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
27 
28  m_panelGeneral = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
29  wxBoxSizer* bGeneralSizer;
30  bGeneralSizer = new wxBoxSizer( wxHORIZONTAL );
31 
32  wxBoxSizer* m_LeftBoxSizer;
33  m_LeftBoxSizer = new wxBoxSizer( wxVERTICAL );
34 
35  wxFlexGridSizer* fgSizerShapeType;
36  fgSizerShapeType = new wxFlexGridSizer( 0, 3, 2, 0 );
37  fgSizerShapeType->AddGrowableCol( 1 );
38  fgSizerShapeType->SetFlexibleDirection( wxBOTH );
39  fgSizerShapeType->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
40 
41  m_PadNumText = new wxStaticText( m_panelGeneral, wxID_ANY, _("Pad number:"), wxDefaultPosition, wxDefaultSize, 0 );
42  m_PadNumText->Wrap( -1 );
43  fgSizerShapeType->Add( m_PadNumText, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 3 );
44 
45  m_PadNumCtrl = new wxTextCtrl( m_panelGeneral, wxID_PADNUMCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
46  fgSizerShapeType->Add( m_PadNumCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 3 );
47 
48 
49  fgSizerShapeType->Add( 0, 0, 1, wxEXPAND, 5 );
50 
51  m_PadNameText = new wxStaticText( m_panelGeneral, wxID_ANY, _("Net name:"), wxDefaultPosition, wxDefaultSize, 0 );
52  m_PadNameText->Wrap( -1 );
53  fgSizerShapeType->Add( m_PadNameText, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 3 );
54 
55  m_PadNetSelector = new NET_SELECTOR( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
56  fgSizerShapeType->Add( m_PadNetSelector, 0, wxTOP|wxLEFT|wxEXPAND, 3 );
57 
58 
59  fgSizerShapeType->Add( 0, 0, 1, wxEXPAND, 5 );
60 
61  m_staticText44 = new wxStaticText( m_panelGeneral, wxID_ANY, _("Pad type:"), wxDefaultPosition, wxDefaultSize, 0 );
62  m_staticText44->Wrap( -1 );
63  fgSizerShapeType->Add( m_staticText44, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 3 );
64 
65  wxString m_PadTypeChoices[] = { _("Through-hole"), _("SMD"), _("Connector"), _("NPTH, Mechanical"), _("Aperture") };
66  int m_PadTypeNChoices = sizeof( m_PadTypeChoices ) / sizeof( wxString );
67  m_PadType = new wxChoice( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_PadTypeNChoices, m_PadTypeChoices, 0 );
68  m_PadType->SetSelection( 0 );
69  fgSizerShapeType->Add( m_PadType, 0, wxEXPAND|wxALL, 3 );
70 
71 
72  fgSizerShapeType->Add( 0, 0, 1, wxEXPAND, 5 );
73 
74  m_staticText45 = new wxStaticText( m_panelGeneral, wxID_ANY, _("Shape:"), wxDefaultPosition, wxDefaultSize, 0 );
75  m_staticText45->Wrap( -1 );
76  fgSizerShapeType->Add( m_staticText45, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 3 );
77 
78  wxString m_PadShapeChoices[] = { _("Circular"), _("Oval"), _("Rectangular"), _("Trapezoidal"), _("Rounded Rectangle"), _("Custom (Circ. Anchor)"), _("Custom (Rect. Anchor)") };
79  int m_PadShapeNChoices = sizeof( m_PadShapeChoices ) / sizeof( wxString );
80  m_PadShape = new wxChoice( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_PadShapeNChoices, m_PadShapeChoices, 0 );
81  m_PadShape->SetSelection( 0 );
82  fgSizerShapeType->Add( m_PadShape, 0, wxEXPAND|wxALL, 3 );
83 
84 
85  fgSizerShapeType->Add( 0, 0, 1, wxEXPAND, 5 );
86 
87  m_posXLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Position X:"), wxDefaultPosition, wxDefaultSize, 0 );
88  m_posXLabel->Wrap( -1 );
89  fgSizerShapeType->Add( m_posXLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 3 );
90 
91  m_posXCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
92  fgSizerShapeType->Add( m_posXCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 3 );
93 
94  m_posXUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
95  m_posXUnits->Wrap( -1 );
96  fgSizerShapeType->Add( m_posXUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 3 );
97 
98  m_posYLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Position Y:"), wxDefaultPosition, wxDefaultSize, 0 );
99  m_posYLabel->Wrap( -1 );
100  fgSizerShapeType->Add( m_posYLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 3 );
101 
102  m_posYCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
103  fgSizerShapeType->Add( m_posYCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 3 );
104 
105  m_posYUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
106  m_posYUnits->Wrap( -1 );
107  fgSizerShapeType->Add( m_posYUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 3 );
108 
109  m_sizeXLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Size X:"), wxDefaultPosition, wxDefaultSize, 0 );
110  m_sizeXLabel->Wrap( -1 );
111  fgSizerShapeType->Add( m_sizeXLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 3 );
112 
113  m_sizeXCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
114  fgSizerShapeType->Add( m_sizeXCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 3 );
115 
116  m_sizeXUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
117  m_sizeXUnits->Wrap( -1 );
118  fgSizerShapeType->Add( m_sizeXUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 3 );
119 
120  m_sizeYLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Size Y:"), wxDefaultPosition, wxDefaultSize, 0 );
121  m_sizeYLabel->Wrap( -1 );
122  fgSizerShapeType->Add( m_sizeYLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 3 );
123 
124  m_sizeYCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
125  fgSizerShapeType->Add( m_sizeYCtrl, 0, wxEXPAND|wxALL, 3 );
126 
127  m_sizeYUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
128  m_sizeYUnits->Wrap( -1 );
129  fgSizerShapeType->Add( m_sizeYUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 3 );
130 
131  m_PadOrientText = new wxStaticText( m_panelGeneral, wxID_ANY, _("Orientation:"), wxDefaultPosition, wxDefaultSize, 0 );
132  m_PadOrientText->Wrap( -1 );
133  fgSizerShapeType->Add( m_PadOrientText, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 3 );
134 
135  m_orientation = new wxComboBox( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
136  m_orientation->Append( _("0") );
137  m_orientation->Append( _("90") );
138  m_orientation->Append( _("-90") );
139  m_orientation->Append( _("180") );
140  fgSizerShapeType->Add( m_orientation, 0, wxALL|wxEXPAND, 5 );
141 
142  m_staticText491 = new wxStaticText( m_panelGeneral, wxID_ANY, _("deg"), wxDefaultPosition, wxDefaultSize, 0 );
143  m_staticText491->Wrap( -1 );
144  fgSizerShapeType->Add( m_staticText491, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 3 );
145 
146  m_offsetXLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Shape offset X:"), wxDefaultPosition, wxDefaultSize, 0 );
147  m_offsetXLabel->Wrap( -1 );
148  fgSizerShapeType->Add( m_offsetXLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 3 );
149 
150  m_offsetXCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
151  fgSizerShapeType->Add( m_offsetXCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 3 );
152 
153  m_offsetXUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
154  m_offsetXUnits->Wrap( -1 );
155  fgSizerShapeType->Add( m_offsetXUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 3 );
156 
157  m_offsetYLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Shape offset Y:"), wxDefaultPosition, wxDefaultSize, 0 );
158  m_offsetYLabel->Wrap( -1 );
159  fgSizerShapeType->Add( m_offsetYLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 3 );
160 
161  m_offsetYCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
162  fgSizerShapeType->Add( m_offsetYCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 3 );
163 
164  m_offsetYUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
165  m_offsetYUnits->Wrap( -1 );
166  fgSizerShapeType->Add( m_offsetYUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 3 );
167 
168  m_padToDieLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Pad to die length:"), wxDefaultPosition, wxDefaultSize, 0 );
169  m_padToDieLabel->Wrap( -1 );
170  m_padToDieLabel->SetToolTip( _("Wire length from pad to die on chip ( used to calculate actual track length)") );
171 
172  fgSizerShapeType->Add( m_padToDieLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 3 );
173 
174  m_padToDieCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
175  fgSizerShapeType->Add( m_padToDieCtrl, 0, wxEXPAND|wxALL, 3 );
176 
177  m_padToDieUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
178  m_padToDieUnits->Wrap( -1 );
179  fgSizerShapeType->Add( m_padToDieUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 3 );
180 
181  m_trapDeltaLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Trapezoid delta:"), wxDefaultPosition, wxDefaultSize, 0 );
182  m_trapDeltaLabel->Wrap( -1 );
183  fgSizerShapeType->Add( m_trapDeltaLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 3 );
184 
185  m_trapDeltaCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
186  fgSizerShapeType->Add( m_trapDeltaCtrl, 0, wxEXPAND|wxALL, 3 );
187 
188  m_trapDeltaUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
189  m_trapDeltaUnits->Wrap( -1 );
190  fgSizerShapeType->Add( m_trapDeltaUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 3 );
191 
192  m_trapAxisLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Trapezoid axis:"), wxDefaultPosition, wxDefaultSize, 0 );
193  m_trapAxisLabel->Wrap( -1 );
194  fgSizerShapeType->Add( m_trapAxisLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 3 );
195 
196  wxString m_trapAxisCtrlChoices[] = { _("Horizontal"), _("Vertical") };
197  int m_trapAxisCtrlNChoices = sizeof( m_trapAxisCtrlChoices ) / sizeof( wxString );
198  m_trapAxisCtrl = new wxChoice( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_trapAxisCtrlNChoices, m_trapAxisCtrlChoices, 0 );
199  m_trapAxisCtrl->SetSelection( 0 );
200  fgSizerShapeType->Add( m_trapAxisCtrl, 0, wxEXPAND|wxALL, 3 );
201 
202 
203  fgSizerShapeType->Add( 0, 0, 1, wxEXPAND|wxTOP, 15 );
204 
205  m_staticTextCornerSizeRatio = new wxStaticText( m_panelGeneral, wxID_ANY, _("Corner size:"), wxDefaultPosition, wxDefaultSize, 0 );
206  m_staticTextCornerSizeRatio->Wrap( -1 );
207  m_staticTextCornerSizeRatio->SetToolTip( _("Corner radius in percent of the pad width.\nThe width is the smaller value between size X and size Y.\nThe max value is 50 percent.") );
208 
209  fgSizerShapeType->Add( m_staticTextCornerSizeRatio, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 );
210 
211  m_tcCornerSizeRatio = new TEXT_CTRL_EVAL( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
212  fgSizerShapeType->Add( m_tcCornerSizeRatio, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 3 );
213 
214  m_staticTextCornerSizeRatioUnit = new wxStaticText( m_panelGeneral, wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
216  fgSizerShapeType->Add( m_staticTextCornerSizeRatioUnit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 );
217 
218  m_cornerRadiusLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Corner radius:"), wxDefaultPosition, wxDefaultSize, 0 );
219  m_cornerRadiusLabel->Wrap( -1 );
220  m_cornerRadiusLabel->SetToolTip( _("Corner radius.\nCan be no more than half pad width.\nThe width is the smaller value between size X and size Y.\nNote: IPC norm gives a max value = 0.25mm.") );
221 
222  fgSizerShapeType->Add( m_cornerRadiusLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 3 );
223 
224  m_tcCornerRadius = new TEXT_CTRL_EVAL( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
225  m_tcCornerRadius->SetToolTip( _("Corner radius.\nCan be no more than half pad width.\nThe width is the smaller value between size X and size Y\nNote: IPC norm gives a max value = 0.25mm") );
226 
227  fgSizerShapeType->Add( m_tcCornerRadius, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
228 
229  m_cornerRadiusUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
230  m_cornerRadiusUnits->Wrap( -1 );
231  fgSizerShapeType->Add( m_cornerRadiusUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 );
232 
233 
234  m_LeftBoxSizer->Add( fgSizerShapeType, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
235 
236 
237  bGeneralSizer->Add( m_LeftBoxSizer, 0, wxALL|wxEXPAND, 5 );
238 
239  wxBoxSizer* bSizer10;
240  bSizer10 = new wxBoxSizer( wxVERTICAL );
241 
242  wxFlexGridSizer* fgSizerGeometry;
243  fgSizerGeometry = new wxFlexGridSizer( 14, 3, 0, 0 );
244  fgSizerGeometry->AddGrowableCol( 1 );
245  fgSizerGeometry->SetFlexibleDirection( wxBOTH );
246  fgSizerGeometry->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
247 
248  m_holeShapeLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Hole shape:"), wxDefaultPosition, wxDefaultSize, 0 );
249  m_holeShapeLabel->Wrap( -1 );
250  fgSizerGeometry->Add( m_holeShapeLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 );
251 
252  wxString m_holeShapeCtrlChoices[] = { _("Circular"), _("Oval") };
253  int m_holeShapeCtrlNChoices = sizeof( m_holeShapeCtrlChoices ) / sizeof( wxString );
254  m_holeShapeCtrl = new wxChoice( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_holeShapeCtrlNChoices, m_holeShapeCtrlChoices, 0 );
255  m_holeShapeCtrl->SetSelection( 0 );
256  fgSizerGeometry->Add( m_holeShapeCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxTOP, 5 );
257 
258  m_staticText51 = new wxStaticText( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
259  m_staticText51->Wrap( -1 );
260  fgSizerGeometry->Add( m_staticText51, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );
261 
262  m_holeXLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Hole size X:"), wxDefaultPosition, wxDefaultSize, 0 );
263  m_holeXLabel->Wrap( -1 );
264  fgSizerGeometry->Add( m_holeXLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 );
265 
266  m_holeXCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
267  fgSizerGeometry->Add( m_holeXCtrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
268 
269  m_holeXUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
270  m_holeXUnits->Wrap( -1 );
271  fgSizerGeometry->Add( m_holeXUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
272 
273  m_holeYLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Hole size Y:"), wxDefaultPosition, wxDefaultSize, 0 );
274  m_holeYLabel->Wrap( -1 );
275  fgSizerGeometry->Add( m_holeYLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 5 );
276 
277  m_holeYCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
278  fgSizerGeometry->Add( m_holeYCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 );
279 
280  m_holeYUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
281  m_holeYUnits->Wrap( -1 );
282  fgSizerGeometry->Add( m_holeYUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
283 
284 
285  bSizer10->Add( fgSizerGeometry, 0, wxEXPAND, 5 );
286 
287  wxStaticBoxSizer* m_LayersSizer;
288  m_LayersSizer = new wxStaticBoxSizer( new wxStaticBox( m_panelGeneral, wxID_ANY, wxEmptyString ), wxVERTICAL );
289 
290  m_FlippedWarningSizer = new wxBoxSizer( wxHORIZONTAL );
291 
292  m_FlippedWarningIcon = new wxStaticBitmap( m_LayersSizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 );
293  m_FlippedWarningIcon->SetMinSize( wxSize( 48,48 ) );
294 
295  m_FlippedWarningSizer->Add( m_FlippedWarningIcon, 0, wxALIGN_TOP|wxBOTTOM|wxTOP, 4 );
296 
297  m_staticText86 = new wxStaticText( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Parent footprint on board is flipped.\nLayers will be reversed."), wxDefaultPosition, wxDefaultSize, 0 );
298  m_staticText86->Wrap( 150 );
299  m_FlippedWarningSizer->Add( m_staticText86, 1, wxALIGN_TOP|wxBOTTOM|wxLEFT|wxRIGHT, 8 );
300 
301 
302  m_LayersSizer->Add( m_FlippedWarningSizer, 1, wxEXPAND, 5 );
303 
304  wxBoxSizer* bSizer11;
305  bSizer11 = new wxBoxSizer( wxHORIZONTAL );
306 
307  m_staticText511 = new wxStaticText( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Copper:"), wxDefaultPosition, wxDefaultSize, 0 );
308  m_staticText511->Wrap( -1 );
309  bSizer11->Add( m_staticText511, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxTOP, 4 );
310 
311  wxString m_rbCopperLayersSelChoices[] = { _("Front layer"), _("Back layer"), _("All copper layers"), _("None") };
312  int m_rbCopperLayersSelNChoices = sizeof( m_rbCopperLayersSelChoices ) / sizeof( wxString );
313  m_rbCopperLayersSel = new wxChoice( m_LayersSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_rbCopperLayersSelNChoices, m_rbCopperLayersSelChoices, 0 );
314  m_rbCopperLayersSel->SetSelection( 0 );
315  bSizer11->Add( m_rbCopperLayersSel, 1, wxALL|wxEXPAND|wxTOP, 4 );
316 
317 
318  m_LayersSizer->Add( bSizer11, 0, wxEXPAND, 5 );
319 
320  m_techLayersLabel = new wxStaticText( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Technical layers:"), wxDefaultPosition, wxDefaultSize, 0 );
321  m_techLayersLabel->Wrap( -1 );
322  m_techLayersLabel->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
323 
324  m_LayersSizer->Add( m_techLayersLabel, 0, wxALL, 5 );
325 
326  m_PadLayerAdhCmp = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Front adhesive"), wxDefaultPosition, wxDefaultSize, 0 );
327  m_LayersSizer->Add( m_PadLayerAdhCmp, 0, wxLEFT|wxRIGHT, 4 );
328 
329  m_PadLayerAdhCu = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Back adhesive"), wxDefaultPosition, wxDefaultSize, 0 );
330  m_LayersSizer->Add( m_PadLayerAdhCu, 0, wxTOP|wxRIGHT|wxLEFT, 4 );
331 
332  m_PadLayerPateCmp = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Front solder paste"), wxDefaultPosition, wxDefaultSize, 0 );
333  m_LayersSizer->Add( m_PadLayerPateCmp, 0, wxTOP|wxRIGHT|wxLEFT, 4 );
334 
335  m_PadLayerPateCu = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Back solder paste"), wxDefaultPosition, wxDefaultSize, 0 );
336  m_LayersSizer->Add( m_PadLayerPateCu, 0, wxTOP|wxRIGHT|wxLEFT, 4 );
337 
338  m_PadLayerSilkCmp = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Front silk screen"), wxDefaultPosition, wxDefaultSize, 0 );
339  m_LayersSizer->Add( m_PadLayerSilkCmp, 0, wxTOP|wxRIGHT|wxLEFT, 4 );
340 
341  m_PadLayerSilkCu = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Back silk screen"), wxDefaultPosition, wxDefaultSize, 0 );
342  m_LayersSizer->Add( m_PadLayerSilkCu, 0, wxTOP|wxRIGHT|wxLEFT, 4 );
343 
344  m_PadLayerMaskCmp = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Front solder mask"), wxDefaultPosition, wxDefaultSize, 0 );
345  m_LayersSizer->Add( m_PadLayerMaskCmp, 0, wxTOP|wxRIGHT|wxLEFT, 4 );
346 
347  m_PadLayerMaskCu = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Back solder mask"), wxDefaultPosition, wxDefaultSize, 0 );
348  m_LayersSizer->Add( m_PadLayerMaskCu, 0, wxTOP|wxRIGHT|wxLEFT, 4 );
349 
350  m_PadLayerDraft = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Drafting notes"), wxDefaultPosition, wxDefaultSize, 0 );
351  m_LayersSizer->Add( m_PadLayerDraft, 0, wxTOP|wxRIGHT|wxLEFT, 4 );
352 
353  m_PadLayerECO1 = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("E.C.O.1"), wxDefaultPosition, wxDefaultSize, 0 );
354  m_LayersSizer->Add( m_PadLayerECO1, 0, wxTOP|wxRIGHT|wxLEFT, 4 );
355 
356  m_PadLayerECO2 = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("E.C.O.2"), wxDefaultPosition, wxDefaultSize, 0 );
357  m_LayersSizer->Add( m_PadLayerECO2, 0, wxALL, 4 );
358 
359 
360  bSizer10->Add( m_LayersSizer, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
361 
362 
363  bGeneralSizer->Add( bSizer10, 0, wxALL|wxEXPAND, 5 );
364 
365 
366  m_panelGeneral->SetSizer( bGeneralSizer );
367  m_panelGeneral->Layout();
368  bGeneralSizer->Fit( m_panelGeneral );
369  m_notebook->AddPage( m_panelGeneral, _("General"), true );
370  m_localSettingsPanel = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
371  wxBoxSizer* bSizerPanelClearance;
372  bSizerPanelClearance = new wxBoxSizer( wxVERTICAL );
373 
374  wxBoxSizer* bSizerClearance;
375  bSizerClearance = new wxBoxSizer( wxVERTICAL );
376 
377  wxStaticBoxSizer* sbClearancesSizer;
378  sbClearancesSizer = new wxStaticBoxSizer( new wxStaticBox( m_localSettingsPanel, wxID_ANY, _("Clearances") ), wxVERTICAL );
379 
380  wxStaticText* m_staticTextHint;
381  m_staticTextHint = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Set values to 0 to use parent footprint or netclass values."), wxDefaultPosition, wxDefaultSize, 0 );
382  m_staticTextHint->Wrap( -1 );
383  m_staticTextHint->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
384 
385  sbClearancesSizer->Add( m_staticTextHint, 0, wxRIGHT, 10 );
386 
387  m_staticTextInfoPosValue = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Positive clearance means area bigger than the pad (usual for mask clearance)."), wxDefaultPosition, wxDefaultSize, 0 );
388  m_staticTextInfoPosValue->Wrap( -1 );
389  m_staticTextInfoPosValue->SetFont( wxFont( 12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
390 
391  sbClearancesSizer->Add( m_staticTextInfoPosValue, 0, wxTOP|wxRIGHT, 10 );
392 
393  m_staticTextInfoNegVal = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Negative clearance means area smaller than the pad (usual for paste clearance)."), wxDefaultPosition, wxDefaultSize, 0 );
394  m_staticTextInfoNegVal->Wrap( -1 );
395  m_staticTextInfoNegVal->SetFont( wxFont( 12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
396 
397  sbClearancesSizer->Add( m_staticTextInfoNegVal, 0, wxBOTTOM|wxRIGHT, 10 );
398 
399  wxFlexGridSizer* fgClearancesGridSizer;
400  fgClearancesGridSizer = new wxFlexGridSizer( 4, 3, 0, 0 );
401  fgClearancesGridSizer->AddGrowableCol( 1 );
402  fgClearancesGridSizer->SetFlexibleDirection( wxBOTH );
403  fgClearancesGridSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
404 
405  m_clearanceLabel = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Pad clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
406  m_clearanceLabel->Wrap( -1 );
407  m_clearanceLabel->SetToolTip( _("This is the local net clearance for this pad.\nIf 0, the footprint local value or the Netclass value is used.") );
408 
409  fgClearancesGridSizer->Add( m_clearanceLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
410 
411  m_clearanceCtrl = new wxTextCtrl( sbClearancesSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
412  fgClearancesGridSizer->Add( m_clearanceCtrl, 0, wxEXPAND|wxTOP|wxLEFT, 5 );
413 
414  m_clearanceUnits = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
415  m_clearanceUnits->Wrap( -1 );
416  fgClearancesGridSizer->Add( m_clearanceUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
417 
418  m_maskClearanceLabel = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Solder mask clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
419  m_maskClearanceLabel->Wrap( -1 );
420  m_maskClearanceLabel->SetToolTip( _("This is the local clearance between this pad and the solder mask.\nIf 0, the footprint local value or the global value is used.") );
421 
422  fgClearancesGridSizer->Add( m_maskClearanceLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 5 );
423 
424  m_maskClearanceCtrl = new wxTextCtrl( sbClearancesSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
425  fgClearancesGridSizer->Add( m_maskClearanceCtrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
426 
427  m_maskClearanceUnits = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
428  m_maskClearanceUnits->Wrap( -1 );
429  fgClearancesGridSizer->Add( m_maskClearanceUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );
430 
431  m_pasteClearanceLabel = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Solder paste clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
432  m_pasteClearanceLabel->Wrap( -1 );
433  m_pasteClearanceLabel->SetToolTip( _("This is the local clearance between this pad and the solder paste.\nIf 0, the footprint value or the global value is used.\nThe final clearance value is the sum of this value and the clearance value ratio.\nA negative value means a smaller mask size than pad size.") );
434 
435  fgClearancesGridSizer->Add( m_pasteClearanceLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 5 );
436 
437  m_pasteClearanceCtrl = new wxTextCtrl( sbClearancesSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
438  fgClearancesGridSizer->Add( m_pasteClearanceCtrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
439 
440  m_pasteClearanceUnits = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
441  m_pasteClearanceUnits->Wrap( -1 );
442  fgClearancesGridSizer->Add( m_pasteClearanceUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );
443 
444  m_staticTextRatio = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Solder paste ratio clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
445  m_staticTextRatio->Wrap( -1 );
446  m_staticTextRatio->SetToolTip( _("This is the local clearance ratio in percent between this pad and the solder paste.\nA value of 10 means the clearance value is 10 percent of the pad size.\nIf 0, the footprint value or the global value is used.\nThe final clearance value is the sum of this value and the clearance value.\nA negative value means a smaller mask size than pad size.") );
447 
448  fgClearancesGridSizer->Add( m_staticTextRatio, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
449 
450  m_SolderPasteMarginRatioCtrl = new TEXT_CTRL_EVAL( sbClearancesSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
451  fgClearancesGridSizer->Add( m_SolderPasteMarginRatioCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 );
452 
453  m_SolderPasteRatioMarginUnits = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
454  m_SolderPasteRatioMarginUnits->Wrap( -1 );
455  fgClearancesGridSizer->Add( m_SolderPasteRatioMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
456 
457 
458  sbClearancesSizer->Add( fgClearancesGridSizer, 0, wxEXPAND, 5 );
459 
460  m_nonCopperWarningBook = new wxSimplebook( sbClearancesSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
461  wxPanel* notePanel;
462  notePanel = new wxPanel( m_nonCopperWarningBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
463  wxBoxSizer* bNoteSizer;
464  bNoteSizer = new wxBoxSizer( wxVERTICAL );
465 
466  m_nonCopperNote = new wxStaticText( notePanel, wxID_ANY, _("Note: solder mask and paste values are used only for pads on copper layers."), wxDefaultPosition, wxDefaultSize, 0 );
467  m_nonCopperNote->Wrap( -1 );
468  m_nonCopperNote->SetFont( wxFont( 12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
469 
470  bNoteSizer->Add( m_nonCopperNote, 0, wxTOP|wxRIGHT, 15 );
471 
472 
473  notePanel->SetSizer( bNoteSizer );
474  notePanel->Layout();
475  bNoteSizer->Fit( notePanel );
476  m_nonCopperWarningBook->AddPage( notePanel, _("a page"), false );
477  wxPanel* warningPanel;
478  warningPanel = new wxPanel( m_nonCopperWarningBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
479  wxBoxSizer* bWarningSizer;
480  bWarningSizer = new wxBoxSizer( wxHORIZONTAL );
481 
482  bWarningSizer->SetMinSize( wxSize( -1,50 ) );
483  m_nonCopperWarningIcon = new wxStaticBitmap( warningPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 );
484  m_nonCopperWarningIcon->SetMinSize( wxSize( 48,48 ) );
485 
486  bWarningSizer->Add( m_nonCopperWarningIcon, 0, wxALL, 5 );
487 
488  m_nonCopperWarningText = new wxStaticText( warningPanel, wxID_ANY, _("Note: solder mask and paste values are used only for pads on copper layers."), wxDefaultPosition, wxDefaultSize, 0 );
489  m_nonCopperWarningText->Wrap( -1 );
490  m_nonCopperWarningText->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
491 
492  bWarningSizer->Add( m_nonCopperWarningText, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
493 
494 
495  warningPanel->SetSizer( bWarningSizer );
496  warningPanel->Layout();
497  bWarningSizer->Fit( warningPanel );
498  m_nonCopperWarningBook->AddPage( warningPanel, _("a page"), false );
499 
500  sbClearancesSizer->Add( m_nonCopperWarningBook, 1, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 );
501 
502 
503  bSizerClearance->Add( sbClearancesSizer, 0, wxALL|wxEXPAND, 5 );
504 
505  m_sbSizerZonesSettings = new wxStaticBoxSizer( new wxStaticBox( m_localSettingsPanel, wxID_ANY, _("Connection to Copper Zones") ), wxVERTICAL );
506 
507  wxFlexGridSizer* fgSizerCopperZonesOpts;
508  fgSizerCopperZonesOpts = new wxFlexGridSizer( 0, 3, 0, 0 );
509  fgSizerCopperZonesOpts->AddGrowableCol( 1 );
510  fgSizerCopperZonesOpts->SetFlexibleDirection( wxBOTH );
511  fgSizerCopperZonesOpts->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
512 
513  m_staticText40 = new wxStaticText( m_sbSizerZonesSettings->GetStaticBox(), wxID_ANY, _("Pad connection:"), wxDefaultPosition, wxDefaultSize, 0 );
514  m_staticText40->Wrap( -1 );
515  fgSizerCopperZonesOpts->Add( m_staticText40, 0, wxALIGN_CENTER_VERTICAL, 5 );
516 
517  wxString m_ZoneConnectionChoiceChoices[] = { _("From parent footprint"), _("Solid"), _("Thermal relief"), _("None") };
518  int m_ZoneConnectionChoiceNChoices = sizeof( m_ZoneConnectionChoiceChoices ) / sizeof( wxString );
519  m_ZoneConnectionChoice = new wxChoice( m_sbSizerZonesSettings->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ZoneConnectionChoiceNChoices, m_ZoneConnectionChoiceChoices, 0 );
520  m_ZoneConnectionChoice->SetSelection( 0 );
521  fgSizerCopperZonesOpts->Add( m_ZoneConnectionChoice, 0, wxEXPAND|wxLEFT, 5 );
522 
523 
524  fgSizerCopperZonesOpts->Add( 0, 0, 1, wxEXPAND, 5 );
525 
526  m_spokeWidthLabel = new wxStaticText( m_sbSizerZonesSettings->GetStaticBox(), wxID_ANY, _("Thermal relief spoke width:"), wxDefaultPosition, wxDefaultSize, 0 );
527  m_spokeWidthLabel->Wrap( -1 );
528  fgSizerCopperZonesOpts->Add( m_spokeWidthLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 5 );
529 
530  m_spokeWidthCtrl = new wxTextCtrl( m_sbSizerZonesSettings->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
531  fgSizerCopperZonesOpts->Add( m_spokeWidthCtrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
532 
533  m_spokeWidthUnits = new wxStaticText( m_sbSizerZonesSettings->GetStaticBox(), wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
534  m_spokeWidthUnits->Wrap( -1 );
535  fgSizerCopperZonesOpts->Add( m_spokeWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );
536 
537  m_thermalGapLabel = new wxStaticText( m_sbSizerZonesSettings->GetStaticBox(), wxID_ANY, _("Thermal relief gap:"), wxDefaultPosition, wxDefaultSize, 0 );
538  m_thermalGapLabel->Wrap( -1 );
539  fgSizerCopperZonesOpts->Add( m_thermalGapLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
540 
541  m_thermalGapCtrl = new wxTextCtrl( m_sbSizerZonesSettings->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
542  fgSizerCopperZonesOpts->Add( m_thermalGapCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 );
543 
544  m_thermalGapUnits = new wxStaticText( m_sbSizerZonesSettings->GetStaticBox(), wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 );
545  m_thermalGapUnits->Wrap( -1 );
546  fgSizerCopperZonesOpts->Add( m_thermalGapUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
547 
548 
549  m_sbSizerZonesSettings->Add( fgSizerCopperZonesOpts, 0, wxEXPAND, 5 );
550 
551 
552  bSizerClearance->Add( m_sbSizerZonesSettings, 0, wxALL|wxEXPAND, 5 );
553 
554  m_sbSizerCustomShapedZonesSettings = new wxStaticBoxSizer( new wxStaticBox( m_localSettingsPanel, wxID_ANY, _("Connection to Copper Zones") ), wxVERTICAL );
555 
556  wxFlexGridSizer* fgSizerCustomShapedCopperZonesOpts;
557  fgSizerCustomShapedCopperZonesOpts = new wxFlexGridSizer( 0, 2, 0, 0 );
558  fgSizerCustomShapedCopperZonesOpts->AddGrowableCol( 1 );
559  fgSizerCustomShapedCopperZonesOpts->SetFlexibleDirection( wxBOTH );
560  fgSizerCustomShapedCopperZonesOpts->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
561 
562  m_staticTextCsZconnTitle = new wxStaticText( m_sbSizerCustomShapedZonesSettings->GetStaticBox(), wxID_ANY, _("Pad connection:"), wxDefaultPosition, wxDefaultSize, 0 );
563  m_staticTextCsZconnTitle->Wrap( -1 );
564  fgSizerCustomShapedCopperZonesOpts->Add( m_staticTextCsZconnTitle, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
565 
566  wxString m_ZoneConnectionCustomChoices[] = { _("None"), _("Solid") };
567  int m_ZoneConnectionCustomNChoices = sizeof( m_ZoneConnectionCustomChoices ) / sizeof( wxString );
568  m_ZoneConnectionCustom = new wxChoice( m_sbSizerCustomShapedZonesSettings->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ZoneConnectionCustomNChoices, m_ZoneConnectionCustomChoices, 0 );
569  m_ZoneConnectionCustom->SetSelection( 0 );
570  fgSizerCustomShapedCopperZonesOpts->Add( m_ZoneConnectionCustom, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
571 
572  m_staticTextcps = new wxStaticText( m_sbSizerCustomShapedZonesSettings->GetStaticBox(), wxID_ANY, _("Custom pad shape in zone:"), wxDefaultPosition, wxDefaultSize, 0 );
573  m_staticTextcps->Wrap( -1 );
574  fgSizerCustomShapedCopperZonesOpts->Add( m_staticTextcps, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
575 
576  wxString m_ZoneCustomPadShapeChoices[] = { _("Use pad shape"), _("Use pad convex hull") };
577  int m_ZoneCustomPadShapeNChoices = sizeof( m_ZoneCustomPadShapeChoices ) / sizeof( wxString );
578  m_ZoneCustomPadShape = new wxChoice( m_sbSizerCustomShapedZonesSettings->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ZoneCustomPadShapeNChoices, m_ZoneCustomPadShapeChoices, 0 );
579  m_ZoneCustomPadShape->SetSelection( 0 );
580  fgSizerCustomShapedCopperZonesOpts->Add( m_ZoneCustomPadShape, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
581 
582 
583  m_sbSizerCustomShapedZonesSettings->Add( fgSizerCustomShapedCopperZonesOpts, 0, wxEXPAND, 5 );
584 
585 
586  bSizerClearance->Add( m_sbSizerCustomShapedZonesSettings, 1, wxEXPAND|wxALL, 5 );
587 
588 
589  bSizerPanelClearance->Add( bSizerClearance, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
590 
591 
592  m_localSettingsPanel->SetSizer( bSizerPanelClearance );
593  m_localSettingsPanel->Layout();
594  bSizerPanelClearance->Fit( m_localSettingsPanel );
595  m_notebook->AddPage( m_localSettingsPanel, _("Local Clearance and Settings"), false );
596  m_panelCustomShapePrimitives = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
597  m_bSizerPanelPrimitives = new wxBoxSizer( wxVERTICAL );
598 
599  m_staticTextPrimitivesList = new wxStaticText( m_panelCustomShapePrimitives, wxID_ANY, _("Primitives list"), wxDefaultPosition, wxDefaultSize, 0 );
600  m_staticTextPrimitivesList->Wrap( -1 );
601  m_staticTextPrimitivesList->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
602 
603  m_bSizerPanelPrimitives->Add( m_staticTextPrimitivesList, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
604 
605  m_staticTextPrimitiveListWarning = new wxStaticText( m_panelCustomShapePrimitives, wxID_ANY, _("Coordinates are relative to anchor pad, orientation 0"), wxDefaultPosition, wxDefaultSize, 0 );
607  m_staticTextPrimitiveListWarning->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
608 
609  m_bSizerPanelPrimitives->Add( m_staticTextPrimitiveListWarning, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
610 
611  m_listCtrlPrimitives = new wxListView( m_panelCustomShapePrimitives, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_NO_HEADER|wxLC_REPORT );
612  m_bSizerPanelPrimitives->Add( m_listCtrlPrimitives, 1, wxALL|wxEXPAND, 5 );
613 
614  wxBoxSizer* bSizerButtons;
615  bSizerButtons = new wxBoxSizer( wxVERTICAL );
616 
617  wxBoxSizer* bSizerButtonsUpper;
618  bSizerButtonsUpper = new wxBoxSizer( wxHORIZONTAL );
619 
620  m_buttonDel = new wxButton( m_panelCustomShapePrimitives, wxID_ANY, _("Delete Primitive"), wxDefaultPosition, wxDefaultSize, 0 );
621  bSizerButtonsUpper->Add( m_buttonDel, 0, wxALL, 5 );
622 
623  m_buttonEditShape = new wxButton( m_panelCustomShapePrimitives, wxID_ANY, _("Edit Primitive"), wxDefaultPosition, wxDefaultSize, 0 );
624  bSizerButtonsUpper->Add( m_buttonEditShape, 0, wxALL, 5 );
625 
626  m_buttonAddShape = new wxButton( m_panelCustomShapePrimitives, wxID_ANY, _("Add Primitive"), wxDefaultPosition, wxDefaultSize, 0 );
627  bSizerButtonsUpper->Add( m_buttonAddShape, 0, wxALL, 5 );
628 
629  m_buttonDup = new wxButton( m_panelCustomShapePrimitives, wxID_ANY, _("Duplicate Primitive"), wxDefaultPosition, wxDefaultSize, 0 );
630  bSizerButtonsUpper->Add( m_buttonDup, 0, wxALL, 5 );
631 
632  m_buttonGeometry = new wxButton( m_panelCustomShapePrimitives, wxID_ANY, _("Transform Primitive"), wxDefaultPosition, wxDefaultSize, 0 );
633  bSizerButtonsUpper->Add( m_buttonGeometry, 0, wxALL, 5 );
634 
635 
636  bSizerButtons->Add( bSizerButtonsUpper, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
637 
638 
639  m_bSizerPanelPrimitives->Add( bSizerButtons, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
640 
641 
645  m_notebook->AddPage( m_panelCustomShapePrimitives, _("Custom Shape Primitives"), false );
646 
647  bSizerUpper->Add( m_notebook, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
648 
649  wxBoxSizer* bSizerDisplayPad;
650  bSizerDisplayPad = new wxBoxSizer( wxVERTICAL );
651 
652 
653  bSizerDisplayPad->Add( 0, 0, 0, wxBOTTOM|wxEXPAND|wxTOP, 3 );
654 
655  m_parentInfoLine1 = new wxStaticText( this, wxID_ANY, _("Footprint name"), wxDefaultPosition, wxDefaultSize, 0 );
656  m_parentInfoLine1->Wrap( -1 );
657  m_parentInfoLine1->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
658 
659  bSizerDisplayPad->Add( m_parentInfoLine1, 0, wxTOP, 8 );
660 
661  m_parentInfoLine2 = new wxStaticText( this, wxID_ANY, _("side and rotation"), wxDefaultPosition, wxDefaultSize, 0 );
662  m_parentInfoLine2->Wrap( -1 );
663  m_parentInfoLine2->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
664 
665  bSizerDisplayPad->Add( m_parentInfoLine2, 0, wxRIGHT, 3 );
666 
667 
668  bSizerDisplayPad->Add( 0, 0, 1, wxEXPAND, 5 );
669 
670  m_panelShowPad = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxFULL_REPAINT_ON_RESIZE|wxBORDER_SIMPLE );
671  m_panelShowPad->SetBackgroundColour( wxColour( 0, 0, 0 ) );
672  m_panelShowPad->SetMinSize( wxSize( 280,-1 ) );
673 
674  bSizerDisplayPad->Add( m_panelShowPad, 12, wxEXPAND|wxALL, 5 );
675 
677  m_panelShowPadGal->SetMinSize( wxSize( 280,-1 ) );
678 
679  bSizerDisplayPad->Add( m_panelShowPadGal, 12, wxEXPAND|wxALL, 5 );
680 
681  m_cbShowPadOutline = new wxCheckBox( this, wxID_ANY, _("Show pad in outline mode"), wxDefaultPosition, wxDefaultSize, 0 );
682  bSizerDisplayPad->Add( m_cbShowPadOutline, 0, wxBOTTOM|wxRIGHT|wxTOP, 5 );
683 
684 
685  bSizerDisplayPad->Add( 0, 0, 1, wxEXPAND, 5 );
686 
687  m_staticline13 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
688  bSizerDisplayPad->Add( m_staticline13, 0, wxEXPAND|wxTOP|wxBOTTOM, 10 );
689 
690 
691  bSizerUpper->Add( bSizerDisplayPad, 1, wxEXPAND|wxTOP|wxRIGHT, 10 );
692 
693 
694  m_MainSizer->Add( bSizerUpper, 1, wxEXPAND, 5 );
695 
696  m_sdbSizer = new wxStdDialogButtonSizer();
697  m_sdbSizerOK = new wxButton( this, wxID_OK );
698  m_sdbSizer->AddButton( m_sdbSizerOK );
699  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
700  m_sdbSizer->AddButton( m_sdbSizerCancel );
701  m_sdbSizer->Realize();
702 
703  m_MainSizer->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 );
704 
705 
706  this->SetSizer( m_MainSizer );
707  this->Layout();
708  m_MainSizer->Fit( this );
709 
710  this->Centre( wxBOTH );
711 
712  // Connect Events
713  this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnInitDialog ) );
714  m_panelGeneral->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnUpdateUI ), NULL, this );
715  m_PadNumCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
716  m_PadType->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadTypeSelected ), NULL, this );
717  m_PadShape->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPadShapeSelection ), NULL, this );
718  m_sizeXCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
719  m_sizeYCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
720  m_orientation->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadOrientEvent ), NULL, this );
721  m_orientation->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadOrientEvent ), NULL, this );
722  m_offsetXCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
723  m_offsetYCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
724  m_trapDeltaCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
725  m_trapAxisCtrl->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
726  m_tcCornerSizeRatio->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onCornerSizePercentChange ), NULL, this );
727  m_tcCornerRadius->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onCornerRadiusChange ), NULL, this );
728  m_holeShapeCtrl->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnDrillShapeSelected ), NULL, this );
729  m_holeXCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
730  m_holeYCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
731  m_rbCopperLayersSel->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
732  m_PadLayerAdhCmp->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
733  m_PadLayerAdhCu->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
734  m_PadLayerPateCmp->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
735  m_PadLayerPateCu->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
736  m_PadLayerSilkCmp->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
737  m_PadLayerSilkCu->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
738  m_PadLayerMaskCmp->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
739  m_PadLayerMaskCu->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
740  m_PadLayerDraft->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
741  m_PadLayerECO1->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
742  m_PadLayerECO2->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
743  m_clearanceCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
744  m_nonCopperWarningBook->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnUpdateUINonCopperWarning ), NULL, this );
745  m_listCtrlPrimitives->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_PAD_PROPERTIES_BASE::onPrimitiveDClick ), NULL, this );
746  m_listCtrlPrimitives->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPrimitiveSelection ), NULL, this );
747  m_listCtrlPrimitives->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPrimitiveSelection ), NULL, this );
748  m_buttonDel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onDeletePrimitive ), NULL, this );
749  m_buttonEditShape->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onEditPrimitive ), NULL, this );
750  m_buttonAddShape->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onAddPrimitive ), NULL, this );
751  m_buttonDup->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onDuplicatePrimitive ), NULL, this );
752  m_buttonGeometry->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onGeometryTransform ), NULL, this );
753  m_panelShowPad->Connect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPaintShowPanel ), NULL, this );
754  m_cbShowPadOutline->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onChangePadMode ), NULL, this );
755  m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnCancel ), NULL, this );
756 }
757 
759 {
760  // Disconnect Events
761  this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnInitDialog ) );
762  m_panelGeneral->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnUpdateUI ), NULL, this );
763  m_PadNumCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
764  m_PadType->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadTypeSelected ), NULL, this );
765  m_PadShape->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPadShapeSelection ), NULL, this );
766  m_sizeXCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
767  m_sizeYCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
768  m_orientation->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadOrientEvent ), NULL, this );
769  m_orientation->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::PadOrientEvent ), NULL, this );
770  m_offsetXCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
771  m_offsetYCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
772  m_trapDeltaCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
773  m_trapAxisCtrl->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
774  m_tcCornerSizeRatio->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onCornerSizePercentChange ), NULL, this );
775  m_tcCornerRadius->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onCornerRadiusChange ), NULL, this );
776  m_holeShapeCtrl->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnDrillShapeSelected ), NULL, this );
777  m_holeXCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
778  m_holeYCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
779  m_rbCopperLayersSel->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
780  m_PadLayerAdhCmp->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
781  m_PadLayerAdhCu->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
782  m_PadLayerPateCmp->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
783  m_PadLayerPateCu->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
784  m_PadLayerSilkCmp->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
785  m_PadLayerSilkCu->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
786  m_PadLayerMaskCmp->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
787  m_PadLayerMaskCu->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
788  m_PadLayerDraft->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
789  m_PadLayerECO1->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
790  m_PadLayerECO2->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
791  m_clearanceCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
792  m_nonCopperWarningBook->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnUpdateUINonCopperWarning ), NULL, this );
793  m_listCtrlPrimitives->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_PAD_PROPERTIES_BASE::onPrimitiveDClick ), NULL, this );
794  m_listCtrlPrimitives->Disconnect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPrimitiveSelection ), NULL, this );
795  m_listCtrlPrimitives->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPrimitiveSelection ), NULL, this );
796  m_buttonDel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onDeletePrimitive ), NULL, this );
797  m_buttonEditShape->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onEditPrimitive ), NULL, this );
798  m_buttonAddShape->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onAddPrimitive ), NULL, this );
799  m_buttonDup->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onDuplicatePrimitive ), NULL, this );
800  m_buttonGeometry->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onGeometryTransform ), NULL, this );
801  m_panelShowPad->Disconnect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPaintShowPanel ), NULL, this );
802  m_cbShowPadOutline->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onChangePadMode ), NULL, this );
803  m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnCancel ), NULL, this );
804 
805 }
806 
807 DIALOG_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 )
808 {
809  this->SetSizeHints( wxDefaultSize, wxDefaultSize );
810 
811  wxBoxSizer* bSizermain;
812  bSizermain = new wxBoxSizer( wxVERTICAL );
813 
814  wxFlexGridSizer* fgSizerShapeProperties;
815  fgSizerShapeProperties = new wxFlexGridSizer( 0, 7, 3, 0 );
816  fgSizerShapeProperties->AddGrowableCol( 2 );
817  fgSizerShapeProperties->AddGrowableCol( 4 );
818  fgSizerShapeProperties->SetFlexibleDirection( wxBOTH );
819  fgSizerShapeProperties->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
820 
821  m_staticTextPosStart = new wxStaticText( this, wxID_ANY, _("Start point"), wxDefaultPosition, wxDefaultSize, 0 );
822  m_staticTextPosStart->Wrap( -1 );
823  fgSizerShapeProperties->Add( m_staticTextPosStart, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
824 
825  m_startXLabel = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
826  m_startXLabel->Wrap( -1 );
827  fgSizerShapeProperties->Add( m_startXLabel, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 );
828 
829  m_startXCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
830  fgSizerShapeProperties->Add( m_startXCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
831 
832  m_startXUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
833  m_startXUnits->Wrap( -1 );
834  fgSizerShapeProperties->Add( m_startXUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 10 );
835 
836  m_startYLabel = new wxStaticText( this, wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 );
837  m_startYLabel->Wrap( -1 );
838  fgSizerShapeProperties->Add( m_startYLabel, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
839 
840  m_startYCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
841  fgSizerShapeProperties->Add( m_startYCtrl, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
842 
843  m_startYUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
844  m_startYUnits->Wrap( -1 );
845  fgSizerShapeProperties->Add( m_startYUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
846 
847  m_staticTextPosEnd = new wxStaticText( this, wxID_ANY, _("End point"), wxDefaultPosition, wxDefaultSize, 0 );
848  m_staticTextPosEnd->Wrap( -1 );
849  fgSizerShapeProperties->Add( m_staticTextPosEnd, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
850 
851  m_endXLabel = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
852  m_endXLabel->Wrap( -1 );
853  fgSizerShapeProperties->Add( m_endXLabel, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
854 
855  m_endXCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
856  fgSizerShapeProperties->Add( m_endXCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
857 
858  m_endXUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
859  m_endXUnits->Wrap( -1 );
860  fgSizerShapeProperties->Add( m_endXUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
861 
862  m_endYLabel = new wxStaticText( this, wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 );
863  m_endYLabel->Wrap( -1 );
864  fgSizerShapeProperties->Add( m_endYLabel, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 );
865 
866  m_endYCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
867  fgSizerShapeProperties->Add( m_endYCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
868 
869  m_endYUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
870  m_endYUnits->Wrap( -1 );
871  fgSizerShapeProperties->Add( m_endYUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
872 
873  m_radiusLabel = new wxStaticText( this, wxID_ANY, _("Radius:"), wxDefaultPosition, wxDefaultSize, 0 );
874  m_radiusLabel->Wrap( -1 );
875  fgSizerShapeProperties->Add( m_radiusLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
876 
877 
878  fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 );
879 
880  m_radiusCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
881  fgSizerShapeProperties->Add( m_radiusCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
882 
883  m_radiusUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
884  m_radiusUnits->Wrap( -1 );
885  fgSizerShapeProperties->Add( m_radiusUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
886 
887 
888  fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 );
889 
890 
891  fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 );
892 
893 
894  fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 );
895 
896  m_thicknessLabel = new wxStaticText( this, wxID_ANY, _("Thickness:"), wxDefaultPosition, wxDefaultSize, 0 );
897  m_thicknessLabel->Wrap( -1 );
898  fgSizerShapeProperties->Add( m_thicknessLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
899 
900 
901  fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 );
902 
903  m_thicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
904  fgSizerShapeProperties->Add( m_thicknessCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
905 
906  m_thicknessUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
907  m_thicknessUnits->Wrap( -1 );
908  fgSizerShapeProperties->Add( m_thicknessUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
909 
910 
911  fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 );
912 
913 
914  bSizermain->Add( fgSizerShapeProperties, 1, wxEXPAND|wxALL, 10 );
915 
916  m_staticTextInfo = new wxStaticText( this, wxID_ANY, _("Set thickness to 0 for a filled circle."), wxDefaultPosition, wxDefaultSize, 0 );
917  m_staticTextInfo->Wrap( -1 );
918  m_staticTextInfo->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
919 
920  bSizermain->Add( m_staticTextInfo, 0, wxRIGHT|wxLEFT, 15 );
921 
922  m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
923  bSizermain->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
924 
925  m_sdbSizer = new wxStdDialogButtonSizer();
926  m_sdbSizerOK = new wxButton( this, wxID_OK );
927  m_sdbSizer->AddButton( m_sdbSizerOK );
928  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
929  m_sdbSizer->AddButton( m_sdbSizerCancel );
930  m_sdbSizer->Realize();
931 
932  bSizermain->Add( m_sdbSizer, 0, wxALL|wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
933 
934 
935  this->SetSizer( bSizermain );
936  this->Layout();
937  bSizermain->Fit( this );
938 
939  this->Centre( wxBOTH );
940 }
941 
943 {
944 }
945 
946 DIALOG_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 )
947 {
948  this->SetSizeHints( wxDefaultSize, wxDefaultSize );
949 
950  wxBoxSizer* bSizermain;
951  bSizermain = new wxBoxSizer( wxVERTICAL );
952 
953  wxFlexGridSizer* fgSizerShapeProperties1;
954  fgSizerShapeProperties1 = new wxFlexGridSizer( 0, 7, 3, 0 );
955  fgSizerShapeProperties1->AddGrowableCol( 2 );
956  fgSizerShapeProperties1->AddGrowableCol( 4 );
957  fgSizerShapeProperties1->SetFlexibleDirection( wxBOTH );
958  fgSizerShapeProperties1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
959 
960  m_staticTextMove = new wxStaticText( this, wxID_ANY, _("Move vector"), wxDefaultPosition, wxDefaultSize, 0 );
961  m_staticTextMove->Wrap( -1 );
962  fgSizerShapeProperties1->Add( m_staticTextMove, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
963 
964  m_xLabel = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
965  m_xLabel->Wrap( -1 );
966  fgSizerShapeProperties1->Add( m_xLabel, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 );
967 
968  m_xCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
969  fgSizerShapeProperties1->Add( m_xCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
970 
971  m_xUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
972  m_xUnits->Wrap( -1 );
973  fgSizerShapeProperties1->Add( m_xUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 10 );
974 
975  m_yLabel = new wxStaticText( this, wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 );
976  m_yLabel->Wrap( -1 );
977  fgSizerShapeProperties1->Add( m_yLabel, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
978 
979  m_yCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
980  fgSizerShapeProperties1->Add( m_yCtrl, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
981 
982  m_yUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
983  m_yUnits->Wrap( -1 );
984  fgSizerShapeProperties1->Add( m_yUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
985 
986  m_rotationLabel = new wxStaticText( this, wxID_ANY, _("Rotation:"), wxDefaultPosition, wxDefaultSize, 0 );
987  m_rotationLabel->Wrap( -1 );
988  fgSizerShapeProperties1->Add( m_rotationLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
989 
990 
991  fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 );
992 
993  m_rotationCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
994  fgSizerShapeProperties1->Add( m_rotationCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
995 
996  m_rotationUnits = new wxStaticText( this, wxID_ANY, _("deg"), wxDefaultPosition, wxDefaultSize, 0 );
997  m_rotationUnits->Wrap( -1 );
998  fgSizerShapeProperties1->Add( m_rotationUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
999 
1000 
1001  fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 );
1002 
1003 
1004  fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 );
1005 
1006 
1007  fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 );
1008 
1009  m_scaleLabel = new wxStaticText( this, wxID_ANY, _("Scaling factor:"), wxDefaultPosition, wxDefaultSize, 0 );
1010  m_scaleLabel->Wrap( -1 );
1011  fgSizerShapeProperties1->Add( m_scaleLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
1012 
1013 
1014  fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 );
1015 
1016  m_scaleCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, _("1"), wxDefaultPosition, wxDefaultSize, 0 );
1017  fgSizerShapeProperties1->Add( m_scaleCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
1018 
1019 
1020  fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 );
1021 
1022 
1023  fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 );
1024 
1025 
1026  fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 );
1027 
1028 
1029  fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 );
1030 
1031  m_staticTextDupCnt = new wxStaticText( this, wxID_ANY, _("Duplicate:"), wxDefaultPosition, wxDefaultSize, 0 );
1032  m_staticTextDupCnt->Wrap( -1 );
1033  fgSizerShapeProperties1->Add( m_staticTextDupCnt, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
1034 
1035 
1036  fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 );
1037 
1038  m_spinCtrlDuplicateCount = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 100, 1 );
1039  fgSizerShapeProperties1->Add( m_spinCtrlDuplicateCount, 0, wxALL|wxEXPAND, 5 );
1040 
1041 
1042  fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 );
1043 
1044 
1045  bSizermain->Add( fgSizerShapeProperties1, 1, wxALL|wxEXPAND, 10 );
1046 
1047  m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
1048  bSizermain->Add( m_staticline1, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
1049 
1050  m_sdbSizer = new wxStdDialogButtonSizer();
1051  m_sdbSizerOK = new wxButton( this, wxID_OK );
1052  m_sdbSizer->AddButton( m_sdbSizerOK );
1053  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
1054  m_sdbSizer->AddButton( m_sdbSizerCancel );
1055  m_sdbSizer->Realize();
1056 
1057  bSizermain->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
1058 
1059 
1060  this->SetSizer( bSizermain );
1061  this->Layout();
1062  bSizermain->Fit( this );
1063 
1064  this->Centre( wxBOTH );
1065 }
1066 
1068 {
1069 }
1070 
1071 DIALOG_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 )
1072 {
1073  this->SetSizeHints( wxDefaultSize, wxDefaultSize );
1074 
1075  wxBoxSizer* bSizerMain;
1076  bSizerMain = new wxBoxSizer( wxVERTICAL );
1077 
1078  wxBoxSizer* bSizerUpper;
1079  bSizerUpper = new wxBoxSizer( wxHORIZONTAL );
1080 
1081  wxBoxSizer* bLeftSizer;
1082  bLeftSizer = new wxBoxSizer( wxVERTICAL );
1083 
1084  m_gridCornersList = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE );
1085 
1086  // Grid
1087  m_gridCornersList->CreateGrid( 1, 2 );
1088  m_gridCornersList->EnableEditing( true );
1089  m_gridCornersList->EnableGridLines( true );
1090  m_gridCornersList->EnableDragGridSize( false );
1091  m_gridCornersList->SetMargins( 0, 0 );
1092 
1093  // Columns
1094  m_gridCornersList->SetColSize( 0, 100 );
1095  m_gridCornersList->SetColSize( 1, 100 );
1096  m_gridCornersList->EnableDragColMove( false );
1097  m_gridCornersList->EnableDragColSize( true );
1098  m_gridCornersList->SetColLabelSize( 22 );
1099  m_gridCornersList->SetColLabelValue( 0, _("Pos X") );
1100  m_gridCornersList->SetColLabelValue( 1, _("Pos Y") );
1101  m_gridCornersList->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
1102 
1103  // Rows
1104  m_gridCornersList->AutoSizeRows();
1105  m_gridCornersList->EnableDragRowSize( false );
1106  m_gridCornersList->SetRowLabelSize( 80 );
1107  m_gridCornersList->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
1108 
1109  // Label Appearance
1110 
1111  // Cell Defaults
1112  m_gridCornersList->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
1113  bLeftSizer->Add( m_gridCornersList, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
1114 
1115  wxBoxSizer* bSizerRightButts;
1116  bSizerRightButts = new wxBoxSizer( wxHORIZONTAL );
1117 
1118  m_addButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
1119  m_addButton->SetMinSize( wxSize( 30,30 ) );
1120 
1121  bSizerRightButts->Add( m_addButton, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
1122 
1123 
1124  bSizerRightButts->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
1125 
1126  m_deleteButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
1127  m_deleteButton->SetMinSize( wxSize( 30,30 ) );
1128 
1129  bSizerRightButts->Add( m_deleteButton, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
1130 
1131 
1132  bLeftSizer->Add( bSizerRightButts, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
1133 
1134  wxFlexGridSizer* fgSizerThickness;
1135  fgSizerThickness = new wxFlexGridSizer( 0, 5, 0, 0 );
1136  fgSizerThickness->AddGrowableCol( 1 );
1137  fgSizerThickness->SetFlexibleDirection( wxBOTH );
1138  fgSizerThickness->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
1139 
1140  m_thicknessLabel = new wxStaticText( this, wxID_ANY, _("Outline thickness:"), wxDefaultPosition, wxDefaultSize, 0 );
1141  m_thicknessLabel->Wrap( -1 );
1142  fgSizerThickness->Add( m_thicknessLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
1143 
1144  m_thicknessCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
1145  fgSizerThickness->Add( m_thicknessCtrl, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
1146 
1147  m_thicknessUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
1148  m_thicknessUnits->Wrap( -1 );
1149  fgSizerThickness->Add( m_thicknessUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
1150 
1151 
1152  bLeftSizer->Add( fgSizerThickness, 0, wxALL|wxEXPAND, 10 );
1153 
1154 
1155  bSizerUpper->Add( bLeftSizer, 1, wxEXPAND, 5 );
1156 
1157  wxBoxSizer* bRightSizer;
1158  bRightSizer = new wxBoxSizer( wxVERTICAL );
1159 
1160  m_panelPoly = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
1161  m_panelPoly->SetBackgroundColour( wxColour( 0, 0, 0 ) );
1162  m_panelPoly->SetMinSize( wxSize( 290,290 ) );
1163 
1164  bRightSizer->Add( m_panelPoly, 1, wxEXPAND|wxTOP|wxRIGHT, 10 );
1165 
1166  wxBoxSizer* m_warningSizer;
1167  m_warningSizer = new wxBoxSizer( wxHORIZONTAL );
1168 
1169  m_warningIcon = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
1170  m_warningIcon->SetMinSize( wxSize( 50,50 ) );
1171 
1172  m_warningSizer->Add( m_warningIcon, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
1173 
1174  m_warningText = new wxStaticText( this, wxID_ANY, _("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 );
1175  m_warningText->Wrap( -1 );
1176  m_warningSizer->Add( m_warningText, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
1177 
1178 
1179  m_warningSizer->Add( 5, 88, 0, 0, 5 );
1180 
1181 
1182  bRightSizer->Add( m_warningSizer, 0, wxEXPAND|wxRIGHT, 10 );
1183 
1184 
1185  bSizerUpper->Add( bRightSizer, 1, wxEXPAND, 5 );
1186 
1187 
1188  bSizerMain->Add( bSizerUpper, 1, wxEXPAND, 5 );
1189 
1190  m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
1191  bSizerMain->Add( m_staticline3, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
1192 
1193  wxBoxSizer* bSizer24;
1194  bSizer24 = new wxBoxSizer( wxHORIZONTAL );
1195 
1196  wxBoxSizer* bSizer25;
1197  bSizer25 = new wxBoxSizer( wxVERTICAL );
1198 
1199 
1200  bSizer25->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 4 );
1201 
1202  m_statusLine1 = new wxStaticText( this, wxID_ANY, _("Coordinates are relative to anchor pad, rotated 0.0 deg."), wxDefaultPosition, wxDefaultSize, 0 );
1203  m_statusLine1->Wrap( -1 );
1204  m_statusLine1->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
1205 
1206  bSizer25->Add( m_statusLine1, 0, 0, 5 );
1207 
1208  m_statusLine2 = new wxStaticText( this, wxID_ANY, _("Set thickness to 0 for a filled polygon."), wxDefaultPosition, wxSize( -1,-1 ), 0 );
1209  m_statusLine2->Wrap( -1 );
1210  m_statusLine2->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
1211 
1212  bSizer25->Add( m_statusLine2, 0, wxTOP, 2 );
1213 
1214 
1215  bSizer24->Add( bSizer25, 1, wxEXPAND|wxLEFT, 10 );
1216 
1217  m_sdbSizer = new wxStdDialogButtonSizer();
1218  m_sdbSizerOK = new wxButton( this, wxID_OK );
1219  m_sdbSizer->AddButton( m_sdbSizerOK );
1220  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
1221  m_sdbSizer->AddButton( m_sdbSizerCancel );
1222  m_sdbSizer->Realize();
1223 
1224  bSizer24->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 );
1225 
1226 
1227  bSizerMain->Add( bSizer24, 0, wxEXPAND, 5 );
1228 
1229 
1230  this->SetSizer( bSizerMain );
1231  this->Layout();
1232  bSizerMain->Fit( this );
1233 
1234  this->Centre( wxBOTH );
1235 
1236  // Connect Events
1237  m_gridCornersList->Connect( wxEVT_GRID_RANGE_SELECT, wxGridRangeSelectEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onGridSelect ), NULL, this );
1238  m_gridCornersList->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onCellSelect ), NULL, this );
1239  m_addButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::OnButtonAdd ), NULL, this );
1240  m_deleteButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::OnButtonDelete ), NULL, this );
1241  m_panelPoly->Connect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onPaintPolyPanel ), NULL, this );
1242  m_panelPoly->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onPolyPanelResize ), NULL, this );
1243 }
1244 
1246 {
1247  // Disconnect Events
1248  m_gridCornersList->Disconnect( wxEVT_GRID_RANGE_SELECT, wxGridRangeSelectEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onGridSelect ), NULL, this );
1249  m_gridCornersList->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onCellSelect ), NULL, this );
1250  m_addButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::OnButtonAdd ), NULL, this );
1251  m_deleteButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::OnButtonDelete ), NULL, this );
1252  m_panelPoly->Disconnect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onPaintPolyPanel ), NULL, this );
1253  m_panelPoly->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onPolyPanelResize ), NULL, this );
1254 
1255 }
virtual void onPrimitiveDClick(wxMouseEvent &event)
KIGFX::GAL_DISPLAY_OPTIONS m_galOptions
virtual void onAddPrimitive(wxCommandEvent &event)
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 OnButtonDelete(wxCommandEvent &event)
virtual void onPolyPanelResize(wxSizeEvent &event)
virtual void OnPaintShowPanel(wxPaintEvent &event)
virtual void onGridSelect(wxGridRangeSelectEvent &event)
virtual void onCellSelect(wxGridEvent &event)
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:82
virtual void OnValuesChanged(wxCommandEvent &event)
virtual void OnPrimitiveSelection(wxListEvent &event)
virtual void OnInitDialog(wxInitDialogEvent &event)
virtual void OnDrillShapeSelected(wxCommandEvent &event)
virtual void PadTypeSelected(wxCommandEvent &event)
virtual void onCornerRadiusChange(wxCommandEvent &event)
virtual void onDeletePrimitive(wxCommandEvent &event)
virtual void onCornerSizePercentChange(wxCommandEvent &event)
virtual void OnPadShapeSelection(wxCommandEvent &event)
wxStaticBoxSizer * m_sbSizerCustomShapedZonesSettings
virtual void onPaintPolyPanel(wxPaintEvent &event)
virtual void PadOrientEvent(wxCommandEvent &event)
wxStdDialogButtonSizer * m_sdbSizer
virtual void OnUpdateUI(wxUpdateUIEvent &event)
virtual void onDuplicatePrimitive(wxCommandEvent &event)
DIALOG_PAD_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_DIALOG_EDIT_PAD, const wxString &title=_("Pad Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
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)
wxTextCtrl wrapper to handle math expression evaluation.
virtual void OnUpdateUINonCopperWarning(wxUpdateUIEvent &event)
virtual void OnSetLayers(wxCommandEvent &event)
virtual void onEditPrimitive(wxCommandEvent &event)
virtual void onGeometryTransform(wxCommandEvent &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)
virtual void onChangePadMode(wxCommandEvent &event)
virtual void OnButtonAdd(wxCommandEvent &event)
virtual void OnCancel(wxCommandEvent &event)