KiCad PCB EDA Suite
dialog_edit_footprint_for_BoardEditor_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Dec 30 2017)
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_FOOTPRINT_BOARD_EDITOR_BASE::DIALOG_FOOTPRINT_BOARD_EDITOR_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( wxDefaultSize, wxDefaultSize );
18 
19  m_GeneralBoxSizer = new wxBoxSizer( wxVERTICAL );
20 
21  m_NoteBook = new wxNotebook( this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize, 0 );
22  m_PanelGeneral = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
23  wxBoxSizer* m_PanelPropertiesBoxSizer;
24  m_PanelPropertiesBoxSizer = new wxBoxSizer( wxVERTICAL );
25 
26  wxStaticBoxSizer* sbSizerTexts;
27  sbSizerTexts = new wxStaticBoxSizer( new wxStaticBox( m_PanelGeneral, wxID_ANY, wxEmptyString ), wxVERTICAL );
28 
29  m_itemsGrid = new WX_GRID( sbSizerTexts->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxRAISED_BORDER );
30 
31  // Grid
32  m_itemsGrid->CreateGrid( 2, 11 );
33  m_itemsGrid->EnableEditing( true );
34  m_itemsGrid->EnableGridLines( true );
35  m_itemsGrid->EnableDragGridSize( false );
36  m_itemsGrid->SetMargins( 0, 0 );
37 
38  // Columns
39  m_itemsGrid->SetColSize( 0, 120 );
40  m_itemsGrid->SetColSize( 1, 48 );
41  m_itemsGrid->SetColSize( 2, 90 );
42  m_itemsGrid->SetColSize( 3, 90 );
43  m_itemsGrid->SetColSize( 4, 90 );
44  m_itemsGrid->SetColSize( 5, 48 );
45  m_itemsGrid->SetColSize( 6, 112 );
46  m_itemsGrid->SetColSize( 7, 90 );
47  m_itemsGrid->SetColSize( 8, 90 );
48  m_itemsGrid->SetColSize( 9, 90 );
49  m_itemsGrid->SetColSize( 10, 90 );
50  m_itemsGrid->EnableDragColMove( false );
51  m_itemsGrid->EnableDragColSize( false );
52  m_itemsGrid->SetColLabelSize( 22 );
53  m_itemsGrid->SetColLabelValue( 0, _("Text Items") );
54  m_itemsGrid->SetColLabelValue( 1, _("Show") );
55  m_itemsGrid->SetColLabelValue( 2, _("Width") );
56  m_itemsGrid->SetColLabelValue( 3, _("Height") );
57  m_itemsGrid->SetColLabelValue( 4, _("Thickness") );
58  m_itemsGrid->SetColLabelValue( 5, _("Italic") );
59  m_itemsGrid->SetColLabelValue( 6, _("Layer") );
60  m_itemsGrid->SetColLabelValue( 7, _("Orientation") );
61  m_itemsGrid->SetColLabelValue( 8, _("Keep Upright") );
62  m_itemsGrid->SetColLabelValue( 9, _("X Offset") );
63  m_itemsGrid->SetColLabelValue( 10, _("Y Offset") );
64  m_itemsGrid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
65 
66  // Rows
67  m_itemsGrid->EnableDragRowSize( false );
68  m_itemsGrid->SetRowLabelSize( 80 );
69  m_itemsGrid->SetRowLabelValue( 0, _("Reference") );
70  m_itemsGrid->SetRowLabelValue( 1, _("Value") );
71  m_itemsGrid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTRE );
72 
73  // Label Appearance
74 
75  // Cell Defaults
76  m_itemsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
77  m_itemsGrid->SetMinSize( wxSize( 724,140 ) );
78 
79  sbSizerTexts->Add( m_itemsGrid, 1, wxEXPAND|wxBOTTOM, 5 );
80 
81  wxBoxSizer* bButtonSize;
82  bButtonSize = new wxBoxSizer( wxHORIZONTAL );
83 
84  m_bpAdd = new wxBitmapButton( sbSizerTexts->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
85  m_bpAdd->SetMinSize( wxSize( 29,29 ) );
86 
87  bButtonSize->Add( m_bpAdd, 0, 0, 5 );
88 
89  m_bpDelete = new wxBitmapButton( sbSizerTexts->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
90  m_bpDelete->SetMinSize( wxSize( 29,29 ) );
91 
92  bButtonSize->Add( m_bpDelete, 0, wxRIGHT|wxLEFT, 5 );
93 
94 
95  bButtonSize->Add( 0, 0, 1, wxEXPAND, 5 );
96 
97 
98  sbSizerTexts->Add( bButtonSize, 0, wxEXPAND, 5 );
99 
100 
101  m_PanelPropertiesBoxSizer->Add( sbSizerTexts, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
102 
103  wxBoxSizer* bSizerProperties;
104  bSizerProperties = new wxBoxSizer( wxHORIZONTAL );
105 
106  bSizerLeft = new wxBoxSizer( wxVERTICAL );
107 
108 
109  bSizerLeft->Add( 0, 0, 0, wxEXPAND|wxTOP, 5 );
110 
111  wxFlexGridSizer* fgSizerPos;
112  fgSizerPos = new wxFlexGridSizer( 2, 3, 3, 0 );
113  fgSizerPos->AddGrowableCol( 1 );
114  fgSizerPos->AddGrowableRow( 0 );
115  fgSizerPos->AddGrowableRow( 1 );
116  fgSizerPos->SetFlexibleDirection( wxHORIZONTAL );
117  fgSizerPos->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
118 
119  m_XPosLabel = new wxStaticText( m_PanelGeneral, wxID_ANY, _("Position X:"), wxDefaultPosition, wxDefaultSize, 0 );
120  m_XPosLabel->Wrap( -1 );
121  fgSizerPos->Add( m_XPosLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
122 
123  m_ModPositionX = new wxTextCtrl( m_PanelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
124  fgSizerPos->Add( m_ModPositionX, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
125 
126  m_XPosUnit = new wxStaticText( m_PanelGeneral, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
127  m_XPosUnit->Wrap( -1 );
128  fgSizerPos->Add( m_XPosUnit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
129 
130  m_YPosLabel = new wxStaticText( m_PanelGeneral, wxID_ANY, _("Position Y:"), wxDefaultPosition, wxDefaultSize, 0 );
131  m_YPosLabel->Wrap( -1 );
132  fgSizerPos->Add( m_YPosLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
133 
134  m_ModPositionY = new wxTextCtrl( m_PanelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
135  fgSizerPos->Add( m_ModPositionY, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
136 
137  m_YPosUnit = new wxStaticText( m_PanelGeneral, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
138  m_YPosUnit->Wrap( -1 );
139  fgSizerPos->Add( m_YPosUnit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
140 
141 
142  bSizerLeft->Add( fgSizerPos, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
143 
144 
145  bSizerLeft->Add( 0, 0, 0, wxEXPAND|wxTOP, 3 );
146 
147  wxStaticBoxSizer* sbOrientationSizer;
148  sbOrientationSizer = new wxStaticBoxSizer( new wxStaticBox( m_PanelGeneral, wxID_ANY, _("Orientation") ), wxVERTICAL );
149 
150  wxGridBagSizer* gbSizer1;
151  gbSizer1 = new wxGridBagSizer( 4, 0 );
152  gbSizer1->SetFlexibleDirection( wxBOTH );
153  gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
154 
155  m_Orient0 = new wxRadioButton( sbOrientationSizer->GetStaticBox(), wxID_ANY, _("0.0"), wxDefaultPosition, wxDefaultSize, 0 );
156  gbSizer1->Add( m_Orient0, wxGBPosition( 0, 0 ), wxGBSpan( 1, 2 ), 0, 5 );
157 
158  m_Orient90 = new wxRadioButton( sbOrientationSizer->GetStaticBox(), wxID_ANY, _("90.0"), wxDefaultPosition, wxDefaultSize, 0 );
159  gbSizer1->Add( m_Orient90, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), 0, 5 );
160 
161  m_Orient270 = new wxRadioButton( sbOrientationSizer->GetStaticBox(), wxID_ANY, _("-90.0"), wxDefaultPosition, wxDefaultSize, 0 );
162  gbSizer1->Add( m_Orient270, wxGBPosition( 2, 0 ), wxGBSpan( 1, 2 ), 0, 5 );
163 
164  m_Orient180 = new wxRadioButton( sbOrientationSizer->GetStaticBox(), wxID_ANY, _("180.0"), wxDefaultPosition, wxDefaultSize, 0 );
165  gbSizer1->Add( m_Orient180, wxGBPosition( 3, 0 ), wxGBSpan( 1, 2 ), 0, 5 );
166 
167  m_OrientOther = new wxRadioButton( sbOrientationSizer->GetStaticBox(), wxID_ANY, _("Other:"), wxDefaultPosition, wxDefaultSize, 0 );
168  gbSizer1->Add( m_OrientOther, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
169 
170  m_OrientValueCtrl = new wxTextCtrl( sbOrientationSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
171  gbSizer1->Add( m_OrientValueCtrl, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxRIGHT|wxLEFT|wxEXPAND, 5 );
172 
173 
174  gbSizer1->AddGrowableCol( 1 );
175 
176  sbOrientationSizer->Add( gbSizer1, 1, wxEXPAND, 5 );
177 
178 
179  bSizerLeft->Add( sbOrientationSizer, 0, wxEXPAND|wxALL, 5 );
180 
181  wxString m_LayerCtrlChoices[] = { _("Front"), _("Back") };
182  int m_LayerCtrlNChoices = sizeof( m_LayerCtrlChoices ) / sizeof( wxString );
183  m_LayerCtrl = new wxRadioBox( m_PanelGeneral, wxID_ANY, _("Board Side"), wxDefaultPosition, wxDefaultSize, m_LayerCtrlNChoices, m_LayerCtrlChoices, 1, wxRA_SPECIFY_COLS );
184  m_LayerCtrl->SetSelection( 0 );
185  bSizerLeft->Add( m_LayerCtrl, 1, wxALL|wxEXPAND, 5 );
186 
187 
188  bSizerProperties->Add( bSizerLeft, 8, wxEXPAND, 5 );
189 
190  wxBoxSizer* bSizerMiddle;
191  bSizerMiddle = new wxBoxSizer( wxVERTICAL );
192 
193  wxString m_AutoPlaceCtrlChoices[] = { _("Free"), _("Lock pads"), _("Lock footprint") };
194  int m_AutoPlaceCtrlNChoices = sizeof( m_AutoPlaceCtrlChoices ) / sizeof( wxString );
195  m_AutoPlaceCtrl = new wxRadioBox( m_PanelGeneral, wxID_ANY, _("Move and Place"), wxDefaultPosition, wxDefaultSize, m_AutoPlaceCtrlNChoices, m_AutoPlaceCtrlChoices, 1, wxRA_SPECIFY_COLS );
196  m_AutoPlaceCtrl->SetSelection( 0 );
197  bSizerMiddle->Add( m_AutoPlaceCtrl, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
198 
199  wxStaticBoxSizer* sbSizerAP;
200  sbSizerAP = new wxStaticBoxSizer( new wxStaticBox( m_PanelGeneral, wxID_ANY, _("Auto-placement Rules") ), wxVERTICAL );
201 
202  wxBoxSizer* bSizerRotOpt;
203  bSizerRotOpt = new wxBoxSizer( wxVERTICAL );
204 
205  m_allow90Label = new wxStaticText( sbSizerAP->GetStaticBox(), wxID_ANY, _("Allow 90 degree rotated placement:"), wxDefaultPosition, wxDefaultSize, 0 );
206  m_allow90Label->Wrap( -1 );
207  m_allow90Label->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
208 
209  bSizerRotOpt->Add( m_allow90Label, 0, 0, 5 );
210 
211  m_CostRot90Ctrl = new wxSlider( sbSizerAP->GetStaticBox(), wxID_ANY, 0, 0, 10, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS );
212  bSizerRotOpt->Add( m_CostRot90Ctrl, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
213 
214 
215  sbSizerAP->Add( bSizerRotOpt, 1, wxEXPAND|wxTOP, 5 );
216 
217  wxBoxSizer* bSizerMoveOpt;
218  bSizerMoveOpt = new wxBoxSizer( wxVERTICAL );
219 
220  m_allow180Label = new wxStaticText( sbSizerAP->GetStaticBox(), wxID_ANY, _("Allow 180 degree rotated placement:"), wxDefaultPosition, wxDefaultSize, 0 );
221  m_allow180Label->Wrap( -1 );
222  m_allow180Label->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
223 
224  bSizerMoveOpt->Add( m_allow180Label, 0, 0, 5 );
225 
226  m_CostRot180Ctrl = new wxSlider( sbSizerAP->GetStaticBox(), wxID_ANY, 0, 0, 10, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS );
227  bSizerMoveOpt->Add( m_CostRot180Ctrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
228 
229 
230  sbSizerAP->Add( bSizerMoveOpt, 1, wxEXPAND|wxTOP, 5 );
231 
232 
233  bSizerMiddle->Add( sbSizerAP, 0, wxEXPAND|wxALL, 5 );
234 
235 
236  bSizerProperties->Add( bSizerMiddle, 8, wxEXPAND|wxTOP, 5 );
237 
238  wxBoxSizer* bSizerRight;
239  bSizerRight = new wxBoxSizer( wxVERTICAL );
240 
241  wxBoxSizer* bButtonsSizer;
242  bButtonsSizer = new wxBoxSizer( wxVERTICAL );
243 
244  m_buttonUpdate = new wxButton( m_PanelGeneral, ID_MODULE_PROPERTIES_UPDATE, _("Update Footprint from Library..."), wxDefaultPosition, wxDefaultSize, 0 );
245  bButtonsSizer->Add( m_buttonUpdate, 0, wxEXPAND|wxALL, 5 );
246 
247  m_buttonExchange = new wxButton( m_PanelGeneral, ID_MODULE_PROPERTIES_EXCHANGE, _("Change Footprint..."), wxDefaultPosition, wxDefaultSize, 0 );
248  bButtonsSizer->Add( m_buttonExchange, 0, wxEXPAND|wxALL, 5 );
249 
250  m_buttonModuleEditor = new wxButton( m_PanelGeneral, ID_GOTO_MODULE_EDITOR, _("Footprint Editor..."), wxDefaultPosition, wxDefaultSize, 0 );
251  bButtonsSizer->Add( m_buttonModuleEditor, 0, wxEXPAND|wxALL, 5 );
252 
253 
254  bSizerRight->Add( bButtonsSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
255 
256 
257  bSizerRight->Add( 0, 0, 1, wxEXPAND, 5 );
258 
259  wxString m_AttributsCtrlChoices[] = { _("Through hole"), _("Surface mount"), _("Virtual") };
260  int m_AttributsCtrlNChoices = sizeof( m_AttributsCtrlChoices ) / sizeof( wxString );
261  m_AttributsCtrl = new wxRadioBox( m_PanelGeneral, wxID_ANY, _("Fabrication Attributes"), wxDefaultPosition, wxDefaultSize, m_AttributsCtrlNChoices, m_AttributsCtrlChoices, 1, wxRA_SPECIFY_COLS );
262  m_AttributsCtrl->SetSelection( 0 );
263  bSizerRight->Add( m_AttributsCtrl, 0, wxALL|wxEXPAND, 5 );
264 
265 
266  bSizerProperties->Add( bSizerRight, 8, wxEXPAND|wxTOP, 5 );
267 
268 
269  m_PanelPropertiesBoxSizer->Add( bSizerProperties, 0, wxEXPAND, 5 );
270 
271 
272  m_PanelGeneral->SetSizer( m_PanelPropertiesBoxSizer );
273  m_PanelGeneral->Layout();
274  m_PanelPropertiesBoxSizer->Fit( m_PanelGeneral );
275  m_NoteBook->AddPage( m_PanelGeneral, _("General"), true );
276  m_PanelClearances = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
277  wxBoxSizer* bSizerPanelClearances;
278  bSizerPanelClearances = new wxBoxSizer( wxVERTICAL );
279 
280  wxStaticBoxSizer* sbSizerLocalProperties;
281  sbSizerLocalProperties = new wxStaticBoxSizer( new wxStaticBox( m_PanelClearances, wxID_ANY, _("Clearances") ), wxVERTICAL );
282 
283  m_staticTextInfo = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Set values to 0 to use Board Setup values."), wxDefaultPosition, wxDefaultSize, 0 );
284  m_staticTextInfo->Wrap( -1 );
285  m_staticTextInfo->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
286 
287  sbSizerLocalProperties->Add( m_staticTextInfo, 0, wxRIGHT, 10 );
288 
289  m_staticTextInfoValPos = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Positive clearance means area bigger than the pad (usual for mask clearance)."), wxDefaultPosition, wxDefaultSize, 0 );
290  m_staticTextInfoValPos->Wrap( -1 );
291  m_staticTextInfoValPos->SetFont( wxFont( 12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
292 
293  sbSizerLocalProperties->Add( m_staticTextInfoValPos, 0, wxTOP|wxRIGHT, 10 );
294 
295  m_staticTextInfoValNeg = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Negative clearance means area smaller than the pad (usual for paste clearance)."), wxDefaultPosition, wxDefaultSize, 0 );
296  m_staticTextInfoValNeg->Wrap( -1 );
297  m_staticTextInfoValNeg->SetFont( wxFont( 12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
298 
299  sbSizerLocalProperties->Add( m_staticTextInfoValNeg, 0, wxBOTTOM|wxRIGHT, 10 );
300 
301  wxFlexGridSizer* fgSizerClearances;
302  fgSizerClearances = new wxFlexGridSizer( 5, 3, 0, 0 );
303  fgSizerClearances->AddGrowableCol( 1 );
304  fgSizerClearances->SetFlexibleDirection( wxBOTH );
305  fgSizerClearances->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
306 
307  m_NetClearanceLabel = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Pad clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
308  m_NetClearanceLabel->Wrap( -1 );
309  m_NetClearanceLabel->SetToolTip( _("This is the local net clearance for all pad of this footprint\nIf 0, the Netclass values are used\nThis value can be superseded by a pad local value.") );
310 
311  fgSizerClearances->Add( m_NetClearanceLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
312 
313  m_NetClearanceCtrl = new wxTextCtrl( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
314  fgSizerClearances->Add( m_NetClearanceCtrl, 1, wxEXPAND|wxALL, 5 );
315 
316  m_NetClearanceUnits = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
317  m_NetClearanceUnits->Wrap( -1 );
318  fgSizerClearances->Add( m_NetClearanceUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
319 
320  m_SolderMaskMarginLabel = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Solder mask clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
321  m_SolderMaskMarginLabel->Wrap( -1 );
322  m_SolderMaskMarginLabel->SetToolTip( _("This is the local clearance between pads and the solder mask\nfor this footprint\nThis value can be superseded by a pad local value.\nIf 0, the global value is used") );
323 
324  fgSizerClearances->Add( m_SolderMaskMarginLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
325 
326  m_SolderMaskMarginCtrl = new wxTextCtrl( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
327  fgSizerClearances->Add( m_SolderMaskMarginCtrl, 1, wxALL|wxEXPAND, 5 );
328 
329  m_SolderMaskMarginUnits = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
330  m_SolderMaskMarginUnits->Wrap( -1 );
331  fgSizerClearances->Add( m_SolderMaskMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
332 
333  m_SolderPasteMarginLabel = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Solder paste clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
334  m_SolderPasteMarginLabel->Wrap( -1 );
335  m_SolderPasteMarginLabel->SetToolTip( _("This is the local clearance between pads and the solder paste\nfor this footprint.\nThis value can be superseded by a pad local values.\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") );
336 
337  fgSizerClearances->Add( m_SolderPasteMarginLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
338 
339  m_SolderPasteMarginCtrl = new wxTextCtrl( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
340  fgSizerClearances->Add( m_SolderPasteMarginCtrl, 1, wxEXPAND|wxLEFT|wxRIGHT, 5 );
341 
342  m_SolderPasteMarginUnits = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
343  m_SolderPasteMarginUnits->Wrap( -1 );
344  fgSizerClearances->Add( m_SolderPasteMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
345 
346  m_staticTextRatio = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Solder paste ratio clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
347  m_staticTextRatio->Wrap( -1 );
348  m_staticTextRatio->SetToolTip( _("This is the local clearance ratio in per cent between pads and the solder paste\nfor this footprint.\nA value of 10 means the clearance value is 10 per cent of the pad size\nThis value can be superseded by a pad local value.\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.") );
349 
350  fgSizerClearances->Add( m_staticTextRatio, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
351 
352  m_SolderPasteMarginRatioCtrl = new TEXT_CTRL_EVAL( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
353  fgSizerClearances->Add( m_SolderPasteMarginRatioCtrl, 1, wxALL|wxEXPAND, 5 );
354 
355  m_SolderPasteRatioMarginUnits = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
356  m_SolderPasteRatioMarginUnits->Wrap( -1 );
357  fgSizerClearances->Add( m_SolderPasteRatioMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
358 
359 
360  sbSizerLocalProperties->Add( fgSizerClearances, 1, wxEXPAND, 5 );
361 
362  m_staticTextInfoCopper = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Note: solder mask and paste values are used only for pads on copper layers."), wxDefaultPosition, wxDefaultSize, 0 );
363  m_staticTextInfoCopper->Wrap( -1 );
364  m_staticTextInfoCopper->SetFont( wxFont( 12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
365 
366  sbSizerLocalProperties->Add( m_staticTextInfoCopper, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 10 );
367 
368 
369  bSizerPanelClearances->Add( sbSizerLocalProperties, 0, wxEXPAND|wxALL, 10 );
370 
371  wxStaticBoxSizer* sbSizer5;
372  sbSizer5 = new wxStaticBoxSizer( new wxStaticBox( m_PanelClearances, wxID_ANY, _("Connection to Copper Zones") ), wxHORIZONTAL );
373 
374  m_staticText16 = new wxStaticText( sbSizer5->GetStaticBox(), wxID_ANY, _("Pad connection to zones:"), wxDefaultPosition, wxDefaultSize, 0 );
375  m_staticText16->Wrap( -1 );
376  sbSizer5->Add( m_staticText16, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
377 
378  wxString m_ZoneConnectionChoiceChoices[] = { _("Use zone setting"), _("Solid"), _("Thermal relief"), _("None") };
379  int m_ZoneConnectionChoiceNChoices = sizeof( m_ZoneConnectionChoiceChoices ) / sizeof( wxString );
380  m_ZoneConnectionChoice = new wxChoice( sbSizer5->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ZoneConnectionChoiceNChoices, m_ZoneConnectionChoiceChoices, 0 );
381  m_ZoneConnectionChoice->SetSelection( 0 );
382  sbSizer5->Add( m_ZoneConnectionChoice, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
383 
384 
385  bSizerPanelClearances->Add( sbSizer5, 0, wxALL|wxEXPAND, 10 );
386 
387 
388  m_PanelClearances->SetSizer( bSizerPanelClearances );
389  m_PanelClearances->Layout();
390  bSizerPanelClearances->Fit( m_PanelClearances );
391  m_NoteBook->AddPage( m_PanelClearances, _("Local Clearance and Settings"), false );
392  m_Panel3D = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
393  bSizerMain3D = new wxBoxSizer( wxVERTICAL );
394 
395  wxStaticBoxSizer* sbSizer3;
396  sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_Panel3D, wxID_ANY, wxEmptyString ), wxVERTICAL );
397 
398  m_modelsGrid = new wxGrid( sbSizer3->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
399 
400  // Grid
401  m_modelsGrid->CreateGrid( 3, 2 );
402  m_modelsGrid->EnableEditing( true );
403  m_modelsGrid->EnableGridLines( false );
404  m_modelsGrid->EnableDragGridSize( false );
405  m_modelsGrid->SetMargins( 0, 0 );
406 
407  // Columns
408  m_modelsGrid->SetColSize( 0, 662 );
409  m_modelsGrid->SetColSize( 1, 53 );
410  m_modelsGrid->EnableDragColMove( false );
411  m_modelsGrid->EnableDragColSize( false );
412  m_modelsGrid->SetColLabelSize( 22 );
413  m_modelsGrid->SetColLabelValue( 0, _("3D Model(s)") );
414  m_modelsGrid->SetColLabelValue( 1, _("Preview") );
415  m_modelsGrid->SetColLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTRE );
416 
417  // Rows
418  m_modelsGrid->EnableDragRowSize( false );
419  m_modelsGrid->SetRowLabelSize( 0 );
420  m_modelsGrid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
421 
422  // Label Appearance
423 
424  // Cell Defaults
425  m_modelsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
426  sbSizer3->Add( m_modelsGrid, 1, wxEXPAND|wxRIGHT, 5 );
427 
428  wxBoxSizer* bSizer3DButtons;
429  bSizer3DButtons = new wxBoxSizer( wxHORIZONTAL );
430 
431  m_buttonAdd = new wxBitmapButton( sbSizer3->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 29,29 ), wxBU_AUTODRAW );
432  bSizer3DButtons->Add( m_buttonAdd, 0, wxTOP, 5 );
433 
434  m_buttonRemove = new wxBitmapButton( sbSizer3->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 29,29 ), wxBU_AUTODRAW );
435  bSizer3DButtons->Add( m_buttonRemove, 0, wxTOP, 5 );
436 
437 
438  bSizer3DButtons->Add( 0, 0, 1, wxEXPAND, 5 );
439 
440  m_button8 = new wxButton( sbSizer3->GetStaticBox(), wxID_ANY, _("Configure Paths..."), wxDefaultPosition, wxDefaultSize, 0 );
441  bSizer3DButtons->Add( m_button8, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
442 
443 
444  sbSizer3->Add( bSizer3DButtons, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
445 
446 
447  bSizerMain3D->Add( sbSizer3, 5, wxEXPAND|wxRIGHT|wxLEFT, 5 );
448 
449  bLowerSizer3D = new wxBoxSizer( wxHORIZONTAL );
450 
451 
452  bSizerMain3D->Add( bLowerSizer3D, 10, wxEXPAND, 5 );
453 
454 
455  m_Panel3D->SetSizer( bSizerMain3D );
456  m_Panel3D->Layout();
457  bSizerMain3D->Fit( m_Panel3D );
458  m_NoteBook->AddPage( m_Panel3D, _("3D Settings"), false );
459 
460  m_GeneralBoxSizer->Add( m_NoteBook, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
461 
462  wxBoxSizer* bSizer16;
463  bSizer16 = new wxBoxSizer( wxHORIZONTAL );
464 
465  wxFlexGridSizer* fgSizerSymbolRef;
466  fgSizerSymbolRef = new wxFlexGridSizer( 2, 2, 0, 0 );
467  fgSizerSymbolRef->SetFlexibleDirection( wxBOTH );
468  fgSizerSymbolRef->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
469 
470  m_libraryIDLabel = new wxStaticText( this, wxID_ANY, _("Library reference:"), wxDefaultPosition, wxDefaultSize, 0 );
471  m_libraryIDLabel->Wrap( -1 );
472  m_libraryIDLabel->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
473 
474  fgSizerSymbolRef->Add( m_libraryIDLabel, 0, wxRIGHT|wxLEFT, 5 );
475 
476  m_staticLibraryID = new wxStaticText( this, wxID_ANY, _("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 );
477  m_staticLibraryID->Wrap( -1 );
478  m_staticLibraryID->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
479 
480  fgSizerSymbolRef->Add( m_staticLibraryID, 0, 0, 5 );
481 
482  m_sheetPathLabel = new wxStaticText( this, wxID_ANY, _("Schematic sheet:"), wxDefaultPosition, wxDefaultSize, 0 );
483  m_sheetPathLabel->Wrap( -1 );
484  m_sheetPathLabel->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
485 
486  fgSizerSymbolRef->Add( m_sheetPathLabel, 0, wxRIGHT|wxLEFT, 5 );
487 
488  m_staticSheetPath = new wxStaticText( this, wxID_ANY, _("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 );
489  m_staticSheetPath->Wrap( -1 );
490  m_staticSheetPath->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
491 
492  fgSizerSymbolRef->Add( m_staticSheetPath, 0, 0, 5 );
493 
494 
495  bSizer16->Add( fgSizerSymbolRef, 1, wxRIGHT|wxLEFT, 10 );
496 
497  m_sdbSizerStdButtons = new wxStdDialogButtonSizer();
498  m_sdbSizerStdButtonsOK = new wxButton( this, wxID_OK );
500  m_sdbSizerStdButtonsCancel = new wxButton( this, wxID_CANCEL );
502  m_sdbSizerStdButtons->Realize();
503 
504  bSizer16->Add( m_sdbSizerStdButtons, 0, wxEXPAND|wxALL, 5 );
505 
506 
507  m_GeneralBoxSizer->Add( bSizer16, 0, wxEXPAND, 5 );
508 
509 
510  this->SetSizer( m_GeneralBoxSizer );
511  this->Layout();
512  m_GeneralBoxSizer->Fit( this );
513 
514  // Connect Events
515  this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnInitDlg ) );
516  this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnUpdateUI ) );
517  m_itemsGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnGridSize ), NULL, this );
518  m_bpAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnAddField ), NULL, this );
519  m_bpDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnDeleteField ), NULL, this );
520  m_Orient0->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this );
521  m_Orient90->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this );
522  m_Orient270->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this );
523  m_Orient180->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this );
524  m_OrientOther->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this );
525  m_OrientValueCtrl->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnOtherOrientation ), NULL, this );
526  m_buttonUpdate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::UpdateModule ), NULL, this );
527  m_buttonExchange->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::ExchangeModule ), NULL, this );
528  m_buttonModuleEditor->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::GotoModuleEditor ), NULL, this );
529  m_modelsGrid->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::On3DModelCellChanged ), NULL, this );
530  m_modelsGrid->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::On3DModelSelected ), NULL, this );
531  m_buttonAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnAdd3DModel ), NULL, this );
532  m_buttonRemove->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnRemove3DModel ), NULL, this );
533  m_button8->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::Cfg3DPath ), NULL, this );
534 }
535 
537 {
538  // Disconnect Events
539  this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnInitDlg ) );
540  this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnUpdateUI ) );
541  m_itemsGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnGridSize ), NULL, this );
542  m_bpAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnAddField ), NULL, this );
543  m_bpDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnDeleteField ), NULL, this );
544  m_Orient0->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this );
545  m_Orient90->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this );
546  m_Orient270->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this );
547  m_Orient180->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this );
548  m_OrientOther->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this );
549  m_OrientValueCtrl->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnOtherOrientation ), NULL, this );
550  m_buttonUpdate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::UpdateModule ), NULL, this );
551  m_buttonExchange->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::ExchangeModule ), NULL, this );
552  m_buttonModuleEditor->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::GotoModuleEditor ), NULL, this );
553  m_modelsGrid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::On3DModelCellChanged ), NULL, this );
554  m_modelsGrid->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::On3DModelSelected ), NULL, this );
555  m_buttonAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnAdd3DModel ), NULL, this );
556  m_buttonRemove->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnRemove3DModel ), NULL, this );
557  m_button8->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::Cfg3DPath ), NULL, this );
558 
559 }
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:53
wxTextCtrl wrapper to handle math expression evaluation.
DIALOG_FOOTPRINT_BOARD_EDITOR_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Footprint Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)