KiCad PCB EDA Suite
dialog_footprint_properties_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version 3.10.0-4761b0c)
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_PROPERTIES_BASE::DIALOG_FOOTPRINT_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( 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 ), 0 );
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, 124 );
40  m_itemsGrid->SetColSize( 1, 60 );
41  m_itemsGrid->SetColSize( 2, 110 );
42  m_itemsGrid->SetColSize( 3, 110 );
43  m_itemsGrid->SetColSize( 4, 110 );
44  m_itemsGrid->SetColSize( 5, 60 );
45  m_itemsGrid->SetColSize( 6, 140 );
46  m_itemsGrid->SetColSize( 7, 110 );
47  m_itemsGrid->SetColSize( 8, 110 );
48  m_itemsGrid->SetColSize( 9, 110 );
49  m_itemsGrid->SetColSize( 10, 110 );
50  m_itemsGrid->EnableDragColMove( false );
51  m_itemsGrid->EnableDragColSize( false );
52  m_itemsGrid->SetColLabelValue( 0, _("Text Items") );
53  m_itemsGrid->SetColLabelValue( 1, _("Show") );
54  m_itemsGrid->SetColLabelValue( 2, _("Width") );
55  m_itemsGrid->SetColLabelValue( 3, _("Height") );
56  m_itemsGrid->SetColLabelValue( 4, _("Thickness") );
57  m_itemsGrid->SetColLabelValue( 5, _("Italic") );
58  m_itemsGrid->SetColLabelValue( 6, _("Layer") );
59  m_itemsGrid->SetColLabelValue( 7, _("Orientation") );
60  m_itemsGrid->SetColLabelValue( 8, _("Keep Upright") );
61  m_itemsGrid->SetColLabelValue( 9, _("X Offset") );
62  m_itemsGrid->SetColLabelValue( 10, _("Y Offset") );
64  m_itemsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
65 
66  // Rows
67  m_itemsGrid->EnableDragRowSize( false );
68  m_itemsGrid->SetRowLabelValue( 0, _("Reference designator") );
69  m_itemsGrid->SetRowLabelValue( 1, _("Value") );
70  m_itemsGrid->SetRowLabelSize( 160 );
71  m_itemsGrid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
72 
73  // Label Appearance
74 
75  // Cell Defaults
76  m_itemsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
77  m_itemsGrid->SetMinSize( wxSize( 800,140 ) );
78 
79  sbSizerTexts->Add( m_itemsGrid, 1, wxALL|wxBOTTOM|wxEXPAND, 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|0 );
85  bButtonSize->Add( m_bpAdd, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
86 
87 
88  bButtonSize->Add( 20, 0, 0, wxEXPAND, 5 );
89 
90  m_bpDelete = new wxBitmapButton( sbSizerTexts->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
91  bButtonSize->Add( m_bpDelete, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
92 
93 
94  sbSizerTexts->Add( bButtonSize, 0, wxEXPAND, 5 );
95 
96 
97  m_PanelPropertiesBoxSizer->Add( sbSizerTexts, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
98 
99  wxBoxSizer* bSizerProperties;
100  bSizerProperties = new wxBoxSizer( wxHORIZONTAL );
101 
102  bSizerLeft = new wxBoxSizer( wxVERTICAL );
103 
104  wxStaticBoxSizer* sbSizer7;
105  sbSizer7 = new wxStaticBoxSizer( new wxStaticBox( m_PanelGeneral, wxID_ANY, _("Position") ), wxVERTICAL );
106 
107  wxFlexGridSizer* fgSizerPos;
108  fgSizerPos = new wxFlexGridSizer( 3, 3, 2, 0 );
109  fgSizerPos->AddGrowableCol( 1 );
110  fgSizerPos->AddGrowableRow( 2 );
111  fgSizerPos->SetFlexibleDirection( wxBOTH );
112  fgSizerPos->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
113 
114  m_XPosLabel = new wxStaticText( sbSizer7->GetStaticBox(), wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
115  m_XPosLabel->Wrap( -1 );
116  fgSizerPos->Add( m_XPosLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
117 
118  m_ModPositionX = new wxTextCtrl( sbSizer7->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
119  fgSizerPos->Add( m_ModPositionX, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
120 
121  m_XPosUnit = new wxStaticText( sbSizer7->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
122  m_XPosUnit->Wrap( -1 );
123  fgSizerPos->Add( m_XPosUnit, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
124 
125  m_YPosLabel = new wxStaticText( sbSizer7->GetStaticBox(), wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 );
126  m_YPosLabel->Wrap( -1 );
127  fgSizerPos->Add( m_YPosLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
128 
129  m_ModPositionY = new wxTextCtrl( sbSizer7->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
130  fgSizerPos->Add( m_ModPositionY, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
131 
132  m_YPosUnit = new wxStaticText( sbSizer7->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
133  m_YPosUnit->Wrap( -1 );
134  fgSizerPos->Add( m_YPosUnit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
135 
136  m_BoardSideLabel = new wxStaticText( sbSizer7->GetStaticBox(), wxID_ANY, _("Side:"), wxDefaultPosition, wxDefaultSize, 0 );
137  m_BoardSideLabel->Wrap( -1 );
138  fgSizerPos->Add( m_BoardSideLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
139 
140  wxString m_BoardSideCtrlChoices[] = { _("Front"), _("Back") };
141  int m_BoardSideCtrlNChoices = sizeof( m_BoardSideCtrlChoices ) / sizeof( wxString );
142  m_BoardSideCtrl = new wxChoice( sbSizer7->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_BoardSideCtrlNChoices, m_BoardSideCtrlChoices, 0 );
143  m_BoardSideCtrl->SetSelection( 1 );
144  fgSizerPos->Add( m_BoardSideCtrl, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxEXPAND|wxTOP, 5 );
145 
146 
147  sbSizer7->Add( fgSizerPos, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
148 
149 
150  bSizerLeft->Add( sbSizer7, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
151 
152 
153  bSizerLeft->Add( 0, 0, 1, wxEXPAND|wxTOP|wxBOTTOM, 3 );
154 
155  wxStaticBoxSizer* sbOrientationSizer;
156  sbOrientationSizer = new wxStaticBoxSizer( new wxStaticBox( m_PanelGeneral, wxID_ANY, _("Orientation") ), wxVERTICAL );
157 
158  wxGridBagSizer* gbSizer1;
159  gbSizer1 = new wxGridBagSizer( 1, 0 );
160  gbSizer1->SetFlexibleDirection( wxBOTH );
161  gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
162 
163  m_Orient0 = new wxRadioButton( sbOrientationSizer->GetStaticBox(), wxID_ANY, _("0.0"), wxDefaultPosition, wxDefaultSize, 0 );
164  gbSizer1->Add( m_Orient0, wxGBPosition( 0, 0 ), wxGBSpan( 1, 2 ), wxBOTTOM, 3 );
165 
166  m_Orient90 = new wxRadioButton( sbOrientationSizer->GetStaticBox(), wxID_ANY, _("90.0"), wxDefaultPosition, wxDefaultSize, 0 );
167  gbSizer1->Add( m_Orient90, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxBOTTOM, 3 );
168 
169  m_Orient270 = new wxRadioButton( sbOrientationSizer->GetStaticBox(), wxID_ANY, _("-90.0"), wxDefaultPosition, wxDefaultSize, 0 );
170  gbSizer1->Add( m_Orient270, wxGBPosition( 2, 0 ), wxGBSpan( 1, 2 ), wxBOTTOM, 3 );
171 
172  m_Orient180 = new wxRadioButton( sbOrientationSizer->GetStaticBox(), wxID_ANY, _("180.0"), wxDefaultPosition, wxDefaultSize, 0 );
173  gbSizer1->Add( m_Orient180, wxGBPosition( 3, 0 ), wxGBSpan( 1, 2 ), wxBOTTOM, 1 );
174 
175  m_OrientOther = new wxRadioButton( sbOrientationSizer->GetStaticBox(), wxID_ANY, _("Other:"), wxDefaultPosition, wxDefaultSize, 0 );
176  gbSizer1->Add( m_OrientOther, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
177 
178  m_OrientValueCtrl = new wxTextCtrl( sbOrientationSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
179  gbSizer1->Add( m_OrientValueCtrl, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxRIGHT|wxLEFT, 5 );
180 
181 
182  gbSizer1->AddGrowableCol( 1 );
183 
184  sbOrientationSizer->Add( gbSizer1, 1, wxEXPAND|wxBOTTOM, 5 );
185 
186 
187  bSizerLeft->Add( sbOrientationSizer, 0, wxEXPAND|wxALL, 5 );
188 
189 
190  bSizerProperties->Add( bSizerLeft, 1, wxEXPAND, 5 );
191 
192  wxBoxSizer* bSizerMiddle;
193  bSizerMiddle = new wxBoxSizer( wxVERTICAL );
194 
195  wxString m_AutoPlaceCtrlChoices[] = { _("Unlock footprint"), _("Lock footprint") };
196  int m_AutoPlaceCtrlNChoices = sizeof( m_AutoPlaceCtrlChoices ) / sizeof( wxString );
197  m_AutoPlaceCtrl = new wxRadioBox( m_PanelGeneral, wxID_ANY, _("Move and Place"), wxDefaultPosition, wxDefaultSize, m_AutoPlaceCtrlNChoices, m_AutoPlaceCtrlChoices, 1, wxRA_SPECIFY_COLS );
198  m_AutoPlaceCtrl->SetSelection( 0 );
199  bSizerMiddle->Add( m_AutoPlaceCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
200 
201 
202  bSizerMiddle->Add( 0, 0, 1, wxEXPAND, 5 );
203 
204  m_sizerAP = new wxStaticBoxSizer( new wxStaticBox( m_PanelGeneral, wxID_ANY, _("Auto-placement Rules") ), wxVERTICAL );
205 
206  m_sizerAllow90 = new wxBoxSizer( wxVERTICAL );
207 
208  m_allow90Label = new wxStaticText( m_sizerAP->GetStaticBox(), wxID_ANY, _("Allow 90 degree rotated placement:"), wxDefaultPosition, wxDefaultSize, 0 );
209  m_allow90Label->Wrap( -1 );
210  m_sizerAllow90->Add( m_allow90Label, 0, wxALL, 2 );
211 
212  m_CostRot90Ctrl = new wxSlider( m_sizerAP->GetStaticBox(), wxID_ANY, 0, 0, 10, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
213  m_sizerAllow90->Add( m_CostRot90Ctrl, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
214 
215 
216  m_sizerAP->Add( m_sizerAllow90, 0, wxEXPAND, 5 );
217 
218 
219  m_sizerAP->Add( 0, 8, 0, wxEXPAND|wxTOP|wxBOTTOM, 8 );
220 
221  m_sizerAllow180 = new wxBoxSizer( wxVERTICAL );
222 
223  m_allow180Label = new wxStaticText( m_sizerAP->GetStaticBox(), wxID_ANY, _("Allow 180 degree rotated placement:"), wxDefaultPosition, wxDefaultSize, 0 );
224  m_allow180Label->Wrap( -1 );
225  m_sizerAllow180->Add( m_allow180Label, 0, wxBOTTOM|wxRIGHT|wxLEFT, 2 );
226 
227  m_CostRot180Ctrl = new wxSlider( m_sizerAP->GetStaticBox(), wxID_ANY, 0, 0, 10, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
228  m_sizerAllow180->Add( m_CostRot180Ctrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
229 
230 
231  m_sizerAP->Add( m_sizerAllow180, 0, wxEXPAND, 5 );
232 
233 
234  bSizerMiddle->Add( m_sizerAP, 0, wxEXPAND|wxALL, 5 );
235 
236 
237  bSizerProperties->Add( bSizerMiddle, 1, wxEXPAND|wxTOP, 5 );
238 
239  wxBoxSizer* bSizerRight;
240  bSizerRight = new wxBoxSizer( wxVERTICAL );
241 
242  wxBoxSizer* bButtonsSizer;
243  bButtonsSizer = new wxBoxSizer( wxVERTICAL );
244 
245  m_buttonUpdate = new wxButton( m_PanelGeneral, wxID_ANY, _("Update Footprint from Library..."), wxDefaultPosition, wxDefaultSize, 0 );
246  bButtonsSizer->Add( m_buttonUpdate, 0, wxEXPAND|wxALL, 5 );
247 
248  m_buttonExchange = new wxButton( m_PanelGeneral, wxID_ANY, _("Change Footprint..."), wxDefaultPosition, wxDefaultSize, 0 );
249  bButtonsSizer->Add( m_buttonExchange, 0, wxEXPAND|wxALL, 5 );
250 
251  m_buttonModuleEditor = new wxButton( m_PanelGeneral, wxID_ANY, _("Edit Footprint..."), wxDefaultPosition, wxDefaultSize, 0 );
252  bButtonsSizer->Add( m_buttonModuleEditor, 0, wxEXPAND|wxALL, 5 );
253 
254 
255  bButtonsSizer->Add( 0, 10, 0, wxEXPAND, 5 );
256 
257  m_button5 = new wxButton( m_PanelGeneral, wxID_ANY, _("Edit Library Footprint..."), wxDefaultPosition, wxDefaultSize, 0 );
258  bButtonsSizer->Add( m_button5, 0, wxEXPAND|wxALL, 5 );
259 
260 
261  bSizerRight->Add( bButtonsSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
262 
263 
264  bSizerRight->Add( 0, 0, 1, wxEXPAND, 5 );
265 
266  wxStaticBoxSizer* sbFabSizer;
267  sbFabSizer = new wxStaticBoxSizer( new wxStaticBox( m_PanelGeneral, wxID_ANY, _("Fabrication Attributes") ), wxVERTICAL );
268 
269  wxBoxSizer* bPartTypeSizer;
270  bPartTypeSizer = new wxBoxSizer( wxHORIZONTAL );
271 
272  m_componentTypeLabel = new wxStaticText( sbFabSizer->GetStaticBox(), wxID_ANY, _("Footprint type:"), wxDefaultPosition, wxDefaultSize, 0 );
273  m_componentTypeLabel->Wrap( -1 );
274  bPartTypeSizer->Add( m_componentTypeLabel, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
275 
276  wxString m_componentTypeChoices[] = { _("Through hole"), _("SMD"), _("Other") };
277  int m_componentTypeNChoices = sizeof( m_componentTypeChoices ) / sizeof( wxString );
278  m_componentType = new wxChoice( sbFabSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_componentTypeNChoices, m_componentTypeChoices, 0 );
279  m_componentType->SetSelection( 0 );
280  bPartTypeSizer->Add( m_componentType, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
281 
282 
283  sbFabSizer->Add( bPartTypeSizer, 1, wxEXPAND, 5 );
284 
285  m_boardOnly = new wxCheckBox( sbFabSizer->GetStaticBox(), wxID_ANY, _("Not in schematic"), wxDefaultPosition, wxDefaultSize, 0 );
286  sbFabSizer->Add( m_boardOnly, 0, wxALL, 5 );
287 
288  m_excludeFromPosFiles = new wxCheckBox( sbFabSizer->GetStaticBox(), wxID_ANY, _("Exclude from position files"), wxDefaultPosition, wxDefaultSize, 0 );
289  sbFabSizer->Add( m_excludeFromPosFiles, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
290 
291  m_excludeFromBOM = new wxCheckBox( sbFabSizer->GetStaticBox(), wxID_ANY, _("Exclude from BOM"), wxDefaultPosition, wxDefaultSize, 0 );
292  sbFabSizer->Add( m_excludeFromBOM, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
293 
294 
295  bSizerRight->Add( sbFabSizer, 0, wxEXPAND|wxALL, 5 );
296 
297 
298  bSizerProperties->Add( bSizerRight, 1, wxEXPAND|wxTOP, 5 );
299 
300 
301  m_PanelPropertiesBoxSizer->Add( bSizerProperties, 0, wxEXPAND, 5 );
302 
303 
304  m_PanelGeneral->SetSizer( m_PanelPropertiesBoxSizer );
305  m_PanelGeneral->Layout();
306  m_PanelPropertiesBoxSizer->Fit( m_PanelGeneral );
307  m_NoteBook->AddPage( m_PanelGeneral, _("General"), false );
308  m_PanelClearances = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
309  wxBoxSizer* bSizerPanelClearances;
310  bSizerPanelClearances = new wxBoxSizer( wxVERTICAL );
311 
312  wxStaticBoxSizer* sbSizerLocalProperties;
313  sbSizerLocalProperties = new wxStaticBoxSizer( new wxStaticBox( m_PanelClearances, wxID_ANY, _("Clearances") ), wxVERTICAL );
314 
315  m_staticTextInfo = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Set values to 0 to use Board Setup values."), wxDefaultPosition, wxDefaultSize, 0 );
316  m_staticTextInfo->Wrap( -1 );
317  sbSizerLocalProperties->Add( m_staticTextInfo, 0, wxLEFT|wxRIGHT, 5 );
318 
319  m_staticTextInfoValPos = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Positive clearance means area bigger than the pad (usual for mask clearance)."), wxDefaultPosition, wxDefaultSize, 0 );
320  m_staticTextInfoValPos->Wrap( -1 );
321  sbSizerLocalProperties->Add( m_staticTextInfoValPos, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
322 
323  m_staticTextInfoValNeg = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Negative clearance means area smaller than the pad (usual for paste clearance)."), wxDefaultPosition, wxDefaultSize, 0 );
324  m_staticTextInfoValNeg->Wrap( -1 );
325  sbSizerLocalProperties->Add( m_staticTextInfoValNeg, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
326 
327  wxFlexGridSizer* fgSizerClearances;
328  fgSizerClearances = new wxFlexGridSizer( 5, 3, 5, 5 );
329  fgSizerClearances->AddGrowableCol( 1 );
330  fgSizerClearances->SetFlexibleDirection( wxBOTH );
331  fgSizerClearances->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
332 
333  m_NetClearanceLabel = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Pad clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
334  m_NetClearanceLabel->Wrap( -1 );
335  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.") );
336 
337  fgSizerClearances->Add( m_NetClearanceLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
338 
339  m_NetClearanceCtrl = new wxTextCtrl( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
340  fgSizerClearances->Add( m_NetClearanceCtrl, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 5 );
341 
342  m_NetClearanceUnits = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
343  m_NetClearanceUnits->Wrap( -1 );
344  fgSizerClearances->Add( m_NetClearanceUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
345 
346  m_SolderMaskMarginLabel = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Solder mask clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
347  m_SolderMaskMarginLabel->Wrap( -1 );
348  m_SolderMaskMarginLabel->SetToolTip( _("This is the local clearance between pads and the solder mask for this footprint.\nThis value can be superseded by a pad local value.\nIf 0, the global value is used.") );
349 
350  fgSizerClearances->Add( m_SolderMaskMarginLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
351 
352  m_SolderMaskMarginCtrl = new wxTextCtrl( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
353  fgSizerClearances->Add( m_SolderMaskMarginCtrl, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 5 );
354 
355  m_SolderMaskMarginUnits = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
356  m_SolderMaskMarginUnits->Wrap( -1 );
357  fgSizerClearances->Add( m_SolderMaskMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
358 
359  m_SolderPasteMarginLabel = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Solder paste absolute clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
360  m_SolderPasteMarginLabel->Wrap( -1 );
361  m_SolderPasteMarginLabel->SetToolTip( _("This is the local clearance between pads and the solder paste for 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.") );
362 
363  fgSizerClearances->Add( m_SolderPasteMarginLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
364 
365  m_SolderPasteMarginCtrl = new wxTextCtrl( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
366  fgSizerClearances->Add( m_SolderPasteMarginCtrl, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 5 );
367 
368  m_SolderPasteMarginUnits = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
369  m_SolderPasteMarginUnits->Wrap( -1 );
370  fgSizerClearances->Add( m_SolderPasteMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
371 
372  m_PasteMarginRatioLabel = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Solder paste relative clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
373  m_PasteMarginRatioLabel->Wrap( -1 );
374  m_PasteMarginRatioLabel->SetToolTip( _("This is the local clearance ratio in percent between pads and the solder paste for this footprint.\nA value of 10 means the clearance value is 10 percent 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.") );
375 
376  fgSizerClearances->Add( m_PasteMarginRatioLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
377 
378  m_PasteMarginRatioCtrl = new TEXT_CTRL_EVAL( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
379  fgSizerClearances->Add( m_PasteMarginRatioCtrl, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 5 );
380 
381  m_PasteMarginRatioUnits = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
382  m_PasteMarginRatioUnits->Wrap( -1 );
383  fgSizerClearances->Add( m_PasteMarginRatioUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
384 
385 
386  sbSizerLocalProperties->Add( fgSizerClearances, 1, wxEXPAND, 5 );
387 
388  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 );
389  m_staticTextInfoCopper->Wrap( -1 );
390  sbSizerLocalProperties->Add( m_staticTextInfoCopper, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
391 
392  m_staticTextInfoPaste = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Note: solder paste clearances (absolute and relative) are added to determine the final clearance."), wxDefaultPosition, wxDefaultSize, 0 );
393  m_staticTextInfoPaste->Wrap( -1 );
394  sbSizerLocalProperties->Add( m_staticTextInfoPaste, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
395 
396 
397  bSizerPanelClearances->Add( sbSizerLocalProperties, 0, wxEXPAND|wxALL, 10 );
398 
399  wxStaticBoxSizer* sbSizerZoneConnection;
400  sbSizerZoneConnection = new wxStaticBoxSizer( new wxStaticBox( m_PanelClearances, wxID_ANY, _("Connection to Copper Zones") ), wxHORIZONTAL );
401 
402  m_staticText16 = new wxStaticText( sbSizerZoneConnection->GetStaticBox(), wxID_ANY, _("Pad connection to zones:"), wxDefaultPosition, wxDefaultSize, 0 );
403  m_staticText16->Wrap( -1 );
404  sbSizerZoneConnection->Add( m_staticText16, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
405 
406  wxString m_ZoneConnectionChoiceChoices[] = { _("Use zone setting"), _("Solid"), _("Thermal relief"), _("None") };
407  int m_ZoneConnectionChoiceNChoices = sizeof( m_ZoneConnectionChoiceChoices ) / sizeof( wxString );
408  m_ZoneConnectionChoice = new wxChoice( sbSizerZoneConnection->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ZoneConnectionChoiceNChoices, m_ZoneConnectionChoiceChoices, 0 );
409  m_ZoneConnectionChoice->SetSelection( 0 );
410  sbSizerZoneConnection->Add( m_ZoneConnectionChoice, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
411 
412 
413  bSizerPanelClearances->Add( sbSizerZoneConnection, 0, wxALL|wxEXPAND, 10 );
414 
415 
416  m_PanelClearances->SetSizer( bSizerPanelClearances );
417  m_PanelClearances->Layout();
418  bSizerPanelClearances->Fit( m_PanelClearances );
419  m_NoteBook->AddPage( m_PanelClearances, _("Clearance Overrides and Settings"), true );
420 
421  m_GeneralBoxSizer->Add( m_NoteBook, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
422 
423  wxBoxSizer* bSizerButtons;
424  bSizerButtons = new wxBoxSizer( wxHORIZONTAL );
425 
426  wxFlexGridSizer* fgSizerSymbolRef;
427  fgSizerSymbolRef = new wxFlexGridSizer( 0, 2, 4, 0 );
428  fgSizerSymbolRef->AddGrowableCol( 1 );
429  fgSizerSymbolRef->SetFlexibleDirection( wxBOTH );
430  fgSizerSymbolRef->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
431 
432  m_libraryIDLabel = new wxStaticText( this, wxID_ANY, _("Library link:"), wxDefaultPosition, wxDefaultSize, 0 );
433  m_libraryIDLabel->Wrap( -1 );
434  fgSizerSymbolRef->Add( m_libraryIDLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 2 );
435 
436  m_tcLibraryID = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxBORDER_NONE );
437  m_tcLibraryID->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
438  m_tcLibraryID->SetToolTip( _("The library ID and footprint ID currently assigned. Use \"Change Footprint...\" to assign a different footprint.") );
439 
440  fgSizerSymbolRef->Add( m_tcLibraryID, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
441 
442 
443  bSizerButtons->Add( fgSizerSymbolRef, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
444 
445 
446  bSizerButtons->Add( 20, 0, 0, wxEXPAND, 5 );
447 
448  m_sdbSizerStdButtons = new wxStdDialogButtonSizer();
449  m_sdbSizerStdButtonsOK = new wxButton( this, wxID_OK );
451  m_sdbSizerStdButtonsCancel = new wxButton( this, wxID_CANCEL );
453  m_sdbSizerStdButtons->Realize();
454 
455  bSizerButtons->Add( m_sdbSizerStdButtons, 0, wxEXPAND|wxALL, 5 );
456 
457 
458  m_GeneralBoxSizer->Add( bSizerButtons, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
459 
460 
461  this->SetSizer( m_GeneralBoxSizer );
462  this->Layout();
463  m_GeneralBoxSizer->Fit( this );
464 
465  // Connect Events
466  this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::OnInitDlg ) );
467  this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::OnUpdateUI ) );
468  m_NoteBook->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::OnPageChange ), NULL, this );
469  m_itemsGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::OnGridSize ), NULL, this );
470  m_bpAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::OnAddField ), NULL, this );
471  m_bpDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::OnDeleteField ), NULL, this );
472  m_Orient0->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::FootprintOrientEvent ), NULL, this );
473  m_Orient90->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::FootprintOrientEvent ), NULL, this );
474  m_Orient270->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::FootprintOrientEvent ), NULL, this );
475  m_Orient180->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::FootprintOrientEvent ), NULL, this );
476  m_OrientOther->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::FootprintOrientEvent ), NULL, this );
477  m_OrientValueCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::OnOtherOrientation ), NULL, this );
478  m_buttonUpdate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::UpdateFootprint ), NULL, this );
479  m_buttonExchange->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::ChangeFootprint ), NULL, this );
480  m_buttonModuleEditor->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::EditFootprint ), NULL, this );
481  m_button5->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::EditLibraryFootprint ), NULL, this );
482 }
483 
485 {
486  // Disconnect Events
487  this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::OnInitDlg ) );
488  this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::OnUpdateUI ) );
489  m_NoteBook->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::OnPageChange ), NULL, this );
490  m_itemsGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::OnGridSize ), NULL, this );
491  m_bpAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::OnAddField ), NULL, this );
492  m_bpDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::OnDeleteField ), NULL, this );
493  m_Orient0->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::FootprintOrientEvent ), NULL, this );
494  m_Orient90->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::FootprintOrientEvent ), NULL, this );
495  m_Orient270->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::FootprintOrientEvent ), NULL, this );
496  m_Orient180->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::FootprintOrientEvent ), NULL, this );
497  m_OrientOther->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::FootprintOrientEvent ), NULL, this );
498  m_OrientValueCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::OnOtherOrientation ), NULL, this );
499  m_buttonUpdate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::UpdateFootprint ), NULL, this );
500  m_buttonExchange->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::ChangeFootprint ), NULL, this );
501  m_buttonModuleEditor->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::EditFootprint ), NULL, this );
502  m_button5->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_BASE::EditLibraryFootprint ), NULL, this );
503 
504 }
virtual void ChangeFootprint(wxCommandEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:82
virtual void EditLibraryFootprint(wxCommandEvent &event)
#define _(s)
DIALOG_FOOTPRINT_PROPERTIES_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)
virtual void OnUpdateUI(wxUpdateUIEvent &event)
virtual void OnOtherOrientation(wxCommandEvent &event)
virtual void UpdateFootprint(wxCommandEvent &event)
virtual void OnAddField(wxCommandEvent &event)
virtual void OnGridSize(wxSizeEvent &event)
wxTextCtrl wrapper to handle math expression evaluation.
virtual void OnPageChange(wxNotebookEvent &event)
virtual void EditFootprint(wxCommandEvent &event)
virtual void FootprintOrientEvent(wxCommandEvent &event)
virtual void OnInitDlg(wxInitDialogEvent &event)
void SetColLabelSize(int aHeight)
Hide wxGrid's SetColLabelSize() method with one which makes sure the size is tall enough for the syst...
Definition: wx_grid.cpp:53
virtual void OnDeleteField(wxCommandEvent &event)