KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_footprint_properties_fp_editor_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
10#include "widgets/wx_grid.h"
11
13
15
16DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::DIALOG_FOOTPRINT_PROPERTIES_FP_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 )
17{
18 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
19
20 m_GeneralBoxSizer = new wxBoxSizer( wxVERTICAL );
21
22 m_NoteBook = new wxNotebook( this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize, 0 );
23 m_PanelGeneral = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
24 wxBoxSizer* m_PanelPropertiesBoxSizer;
25 m_PanelPropertiesBoxSizer = new wxBoxSizer( wxVERTICAL );
26
27 wxStaticBoxSizer* sbSizerTexts;
28 sbSizerTexts = new wxStaticBoxSizer( new wxStaticBox( m_PanelGeneral, wxID_ANY, _("Fields") ), wxVERTICAL );
29
30 m_itemsGrid = new WX_GRID( sbSizerTexts->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), 0 );
31
32 // Grid
33 m_itemsGrid->CreateGrid( 2, 11 );
34 m_itemsGrid->EnableEditing( true );
35 m_itemsGrid->EnableGridLines( true );
36 m_itemsGrid->EnableDragGridSize( false );
37 m_itemsGrid->SetMargins( 0, 0 );
38
39 // Columns
40 m_itemsGrid->SetColSize( 0, 124 );
41 m_itemsGrid->SetColSize( 1, 60 );
42 m_itemsGrid->SetColSize( 2, 110 );
43 m_itemsGrid->SetColSize( 3, 110 );
44 m_itemsGrid->SetColSize( 4, 110 );
45 m_itemsGrid->SetColSize( 5, 60 );
46 m_itemsGrid->SetColSize( 6, 110 );
47 m_itemsGrid->SetColSize( 7, 110 );
48 m_itemsGrid->SetColSize( 8, 110 );
49 m_itemsGrid->SetColSize( 9, 110 );
50 m_itemsGrid->SetColSize( 10, 110 );
51 m_itemsGrid->EnableDragColMove( false );
52 m_itemsGrid->EnableDragColSize( true );
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, _("Unconstrained") );
62 m_itemsGrid->SetColLabelValue( 9, _("X Offset") );
63 m_itemsGrid->SetColLabelValue( 10, _("Y Offset") );
64 m_itemsGrid->SetColLabelSize( wxGRID_AUTOSIZE );
65 m_itemsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
66
67 // Rows
68 m_itemsGrid->EnableDragRowSize( false );
69 m_itemsGrid->SetRowLabelValue( 0, _("Reference designator") );
70 m_itemsGrid->SetRowLabelValue( 1, _("Value") );
71 m_itemsGrid->SetRowLabelSize( 160 );
72 m_itemsGrid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
73
74 // Label Appearance
75
76 // Cell Defaults
77 m_itemsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
78 m_itemsGrid->SetMinSize( wxSize( 800,140 ) );
79
80 sbSizerTexts->Add( m_itemsGrid, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
81
82 wxBoxSizer* bButtonSize;
83 bButtonSize = new wxBoxSizer( wxHORIZONTAL );
84
85 m_bpAdd = new STD_BITMAP_BUTTON( sbSizerTexts->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
86 bButtonSize->Add( m_bpAdd, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
87
88
89 bButtonSize->Add( 20, 0, 0, wxEXPAND, 5 );
90
91 m_bpDelete = new STD_BITMAP_BUTTON( sbSizerTexts->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
92 bButtonSize->Add( m_bpDelete, 0, wxRIGHT, 5 );
93
94
95 sbSizerTexts->Add( bButtonSize, 0, wxEXPAND, 5 );
96
97
98 m_PanelPropertiesBoxSizer->Add( sbSizerTexts, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
99
100 wxFlexGridSizer* fgSizerFPID;
101 fgSizerFPID = new wxFlexGridSizer( 4, 2, 3, 0 );
102 fgSizerFPID->AddGrowableCol( 1 );
103 fgSizerFPID->SetFlexibleDirection( wxBOTH );
104 fgSizerFPID->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
105
106 wxStaticText* staticFPNameLabel;
107 staticFPNameLabel = new wxStaticText( m_PanelGeneral, wxID_ANY, _("Footprint name:"), wxDefaultPosition, wxDefaultSize, 0 );
108 staticFPNameLabel->Wrap( -1 );
109 fgSizerFPID->Add( staticFPNameLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
110
111 m_FootprintNameCtrl = new wxTextCtrl( m_PanelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
112 fgSizerFPID->Add( m_FootprintNameCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
113
114 wxStaticText* staticDescriptionLabel;
115 staticDescriptionLabel = new wxStaticText( m_PanelGeneral, wxID_ANY, _("Description:"), wxDefaultPosition, wxDefaultSize, 0 );
116 staticDescriptionLabel->Wrap( -1 );
117 fgSizerFPID->Add( staticDescriptionLabel, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
118
119 m_DocCtrl = new wxTextCtrl( m_PanelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
120 fgSizerFPID->Add( m_DocCtrl, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
121
122 staticKeywordsLabel = new wxStaticText( m_PanelGeneral, wxID_ANY, _("Keywords:"), wxDefaultPosition, wxDefaultSize, 0 );
123 staticKeywordsLabel->Wrap( -1 );
124 fgSizerFPID->Add( staticKeywordsLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
125
126 m_KeywordCtrl = new wxTextCtrl( m_PanelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
127 fgSizerFPID->Add( m_KeywordCtrl, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
128
129
130 m_PanelPropertiesBoxSizer->Add( fgSizerFPID, 0, wxEXPAND|wxBOTTOM, 10 );
131
132 wxBoxSizer* bSizerProperties;
133 bSizerProperties = new wxBoxSizer( wxHORIZONTAL );
134
135 wxStaticBoxSizer* bSizerPrivateLayers;
136 bSizerPrivateLayers = new wxStaticBoxSizer( new wxStaticBox( m_PanelGeneral, wxID_ANY, _("Private Layers") ), wxVERTICAL );
137
138 m_privateLayersGrid = new WX_GRID( bSizerPrivateLayers->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), 0 );
139
140 // Grid
141 m_privateLayersGrid->CreateGrid( 2, 1 );
142 m_privateLayersGrid->EnableEditing( true );
143 m_privateLayersGrid->EnableGridLines( true );
144 m_privateLayersGrid->EnableDragGridSize( false );
145 m_privateLayersGrid->SetMargins( 0, 0 );
146
147 // Columns
148 m_privateLayersGrid->SetColSize( 0, 180 );
149 m_privateLayersGrid->EnableDragColMove( false );
150 m_privateLayersGrid->EnableDragColSize( true );
152 m_privateLayersGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
153
154 // Rows
155 m_privateLayersGrid->EnableDragRowSize( false );
156 m_privateLayersGrid->SetRowLabelSize( 0 );
157 m_privateLayersGrid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
158
159 // Label Appearance
160
161 // Cell Defaults
162 m_privateLayersGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
163 bSizerPrivateLayers->Add( m_privateLayersGrid, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
164
165 wxBoxSizer* bButtonSize1;
166 bButtonSize1 = new wxBoxSizer( wxHORIZONTAL );
167
168 m_bpAddLayer = new STD_BITMAP_BUTTON( bSizerPrivateLayers->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
169 bButtonSize1->Add( m_bpAddLayer, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
170
171
172 bButtonSize1->Add( 20, 0, 0, wxEXPAND, 5 );
173
174 m_bpDeleteLayer = new STD_BITMAP_BUTTON( bSizerPrivateLayers->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
175 bButtonSize1->Add( m_bpDeleteLayer, 0, wxBOTTOM|wxRIGHT, 5 );
176
177
178 bSizerPrivateLayers->Add( bButtonSize1, 0, wxEXPAND, 5 );
179
180
181 bSizerProperties->Add( bSizerPrivateLayers, 1, wxEXPAND|wxRIGHT, 15 );
182
183 wxStaticBoxSizer* sbAttributesSizer;
184 sbAttributesSizer = new wxStaticBoxSizer( new wxStaticBox( m_PanelGeneral, wxID_ANY, _("Attributes") ), wxVERTICAL );
185
186 wxBoxSizer* bPartTypeSizer;
187 bPartTypeSizer = new wxBoxSizer( wxHORIZONTAL );
188
189 m_componentTypeLabel = new wxStaticText( sbAttributesSizer->GetStaticBox(), wxID_ANY, _("Component type:"), wxDefaultPosition, wxDefaultSize, 0 );
190 m_componentTypeLabel->Wrap( -1 );
191 bPartTypeSizer->Add( m_componentTypeLabel, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
192
193 wxString m_componentTypeChoices[] = { _("Through hole"), _("SMD"), _("Unspecified") };
194 int m_componentTypeNChoices = sizeof( m_componentTypeChoices ) / sizeof( wxString );
195 m_componentType = new wxChoice( sbAttributesSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_componentTypeNChoices, m_componentTypeChoices, 0 );
196 m_componentType->SetSelection( 0 );
197 bPartTypeSizer->Add( m_componentType, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
198
199
200 sbAttributesSizer->Add( bPartTypeSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT, 5 );
201
202 m_boardOnly = new wxCheckBox( sbAttributesSizer->GetStaticBox(), wxID_ANY, _("Not in schematic"), wxDefaultPosition, wxDefaultSize, 0 );
203 sbAttributesSizer->Add( m_boardOnly, 0, wxALL, 5 );
204
205 m_excludeFromPosFiles = new wxCheckBox( sbAttributesSizer->GetStaticBox(), wxID_ANY, _("Exclude from position files"), wxDefaultPosition, wxDefaultSize, 0 );
206 sbAttributesSizer->Add( m_excludeFromPosFiles, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
207
208 m_excludeFromBOM = new wxCheckBox( sbAttributesSizer->GetStaticBox(), wxID_ANY, _("Exclude from bill of materials"), wxDefaultPosition, wxDefaultSize, 0 );
209 sbAttributesSizer->Add( m_excludeFromBOM, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
210
211 m_noCourtyards = new wxCheckBox( sbAttributesSizer->GetStaticBox(), wxID_ANY, _("Exempt from courtyard requirement"), wxDefaultPosition, wxDefaultSize, 0 );
212 m_noCourtyards->SetToolTip( _("Will not generate \"missing courtyard\" DRC violations") );
213
214 sbAttributesSizer->Add( m_noCourtyards, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
215
216 m_cbDNP = new wxCheckBox( sbAttributesSizer->GetStaticBox(), wxID_ANY, _("Do not populate"), wxDefaultPosition, wxDefaultSize, 0 );
217 sbAttributesSizer->Add( m_cbDNP, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
218
219
220 bSizerProperties->Add( sbAttributesSizer, 1, wxEXPAND|wxRIGHT, 5 );
221
222
223 m_PanelPropertiesBoxSizer->Add( bSizerProperties, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
224
225
226 m_PanelGeneral->SetSizer( m_PanelPropertiesBoxSizer );
227 m_PanelGeneral->Layout();
228 m_PanelPropertiesBoxSizer->Fit( m_PanelGeneral );
229 m_NoteBook->AddPage( m_PanelGeneral, _("General"), false );
230 m_PanelClearances = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
231 wxBoxSizer* bSizerPanelClearances;
232 bSizerPanelClearances = new wxBoxSizer( wxVERTICAL );
233
234 wxStaticBoxSizer* sbSizerLocalProperties;
235 sbSizerLocalProperties = new wxStaticBoxSizer( new wxStaticBox( m_PanelClearances, wxID_ANY, _("Clearances") ), wxVERTICAL );
236
237 m_staticTextInfo = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Leave values blank to use netclass values."), wxDefaultPosition, wxDefaultSize, 0 );
238 m_staticTextInfo->Wrap( -1 );
239 sbSizerLocalProperties->Add( m_staticTextInfo, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
240
241 wxGridBagSizer* gbSizer1;
242 gbSizer1 = new wxGridBagSizer( 4, 0 );
243 gbSizer1->SetFlexibleDirection( wxBOTH );
244 gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
245 gbSizer1->SetEmptyCellSize( wxSize( -1,15 ) );
246
247 m_NetClearanceLabel = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Pad clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
248 m_NetClearanceLabel->Wrap( -1 );
249 m_NetClearanceLabel->SetToolTip( _("This is the local net clearance for all pads of this footprint.\nIf 0, the Netclass values are used.\nThis value can be overridden on a pad-by-pad basis in the Local\nClearance and Settings tab of Pad Properties.") );
250
251 gbSizer1->Add( m_NetClearanceLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
252
253 m_NetClearanceCtrl = new wxTextCtrl( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
254 gbSizer1->Add( m_NetClearanceCtrl, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
255
256 m_NetClearanceUnits = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
257 m_NetClearanceUnits->Wrap( -1 );
258 gbSizer1->Add( m_NetClearanceUnits, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
259
260 m_SolderMaskMarginLabel = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Solder mask expansion:"), wxDefaultPosition, wxDefaultSize, 0 );
261 m_SolderMaskMarginLabel->Wrap( -1 );
262 m_SolderMaskMarginLabel->SetToolTip( _("This is the local clearance between pads and the solder mask for \nthis footprint.\nIf 0, the global value is used.\nThis value can be overridden on a pad-by-pad basis in the Local\nClearance and Settings tab of Pad Properties.") );
263
264 gbSizer1->Add( m_SolderMaskMarginLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
265
266 m_SolderMaskMarginCtrl = new wxTextCtrl( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
267 gbSizer1->Add( m_SolderMaskMarginCtrl, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
268
269 m_SolderMaskMarginUnits = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
270 m_SolderMaskMarginUnits->Wrap( -1 );
271 gbSizer1->Add( m_SolderMaskMarginUnits, wxGBPosition( 2, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
272
273 m_allowBridges = new wxCheckBox( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Allow bridged solder mask apertures between pads"), wxDefaultPosition, wxDefaultSize, 0 );
274 gbSizer1->Add( m_allowBridges, wxGBPosition( 3, 0 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
275
276 m_SolderPasteMarginLabel = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Solder paste absolute clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
277 m_SolderPasteMarginLabel->Wrap( -1 );
278 m_SolderPasteMarginLabel->SetToolTip( _("This is the local clearance between pads and the solder paste for\nthis footprint.\nThe final clearance value is the sum of this value and the clearance value ratio.\nA negative value means a smaller stencil aperture size than pad size.\nThis value can be overridden on a pad-by-pad basis in the Local\nClearance and Settings tab of Pad Properties.") );
279
280 gbSizer1->Add( m_SolderPasteMarginLabel, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
281
282 m_SolderPasteMarginCtrl = new wxTextCtrl( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
283 gbSizer1->Add( m_SolderPasteMarginCtrl, wxGBPosition( 5, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
284
285 m_SolderPasteMarginUnits = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
286 m_SolderPasteMarginUnits->Wrap( -1 );
287 gbSizer1->Add( m_SolderPasteMarginUnits, wxGBPosition( 5, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
288
289 m_PasteMarginRatioLabel = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Solder paste relative clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
290 m_PasteMarginRatioLabel->Wrap( -1 );
291 m_PasteMarginRatioLabel->SetToolTip( _("This is the local clearance ratio applied as a percentage of the pad width and height for this footprint.\nA value of 10 means the horizontal clearance value is 10% of the pad’s width, and the vertical clearance value is 10% of the pad’s height.\nThe final clearance value is the sum of this value and the absolute clearance value.\nA negative value means a smaller stencil aperture size than pad size.\nThis value can be overridden on a pad-by-pad basis in the Local Clearance and Settings tab of Pad Properties.") );
292
293 gbSizer1->Add( m_PasteMarginRatioLabel, wxGBPosition( 6, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
294
295 m_PasteMarginRatioCtrl = new TEXT_CTRL_EVAL( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
296 gbSizer1->Add( m_PasteMarginRatioCtrl, wxGBPosition( 6, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
297
298 m_PasteMarginRatioUnits = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
299 m_PasteMarginRatioUnits->Wrap( -1 );
300 gbSizer1->Add( m_PasteMarginRatioUnits, wxGBPosition( 6, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
301
302
303 sbSizerLocalProperties->Add( gbSizer1, 0, wxEXPAND|wxTOP|wxBOTTOM, 10 );
304
305 wxFlexGridSizer* fgSizerClearances;
306 fgSizerClearances = new wxFlexGridSizer( 5, 3, 0, 0 );
307 fgSizerClearances->AddGrowableCol( 1 );
308 fgSizerClearances->SetFlexibleDirection( wxBOTH );
309 fgSizerClearances->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
310
311
312 sbSizerLocalProperties->Add( fgSizerClearances, 1, wxEXPAND, 5 );
313
314 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 );
315 m_staticTextInfoCopper->Wrap( -1 );
316 sbSizerLocalProperties->Add( m_staticTextInfoCopper, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
317
318 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 );
319 m_staticTextInfoPaste->Wrap( -1 );
320 sbSizerLocalProperties->Add( m_staticTextInfoPaste, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
321
322
323 bSizerPanelClearances->Add( sbSizerLocalProperties, 0, wxEXPAND|wxALL, 5 );
324
325 wxStaticBoxSizer* sbSizerCopperZones;
326 sbSizerCopperZones = new wxStaticBoxSizer( new wxStaticBox( m_PanelClearances, wxID_ANY, _("Connection to Copper Zones") ), wxHORIZONTAL );
327
328 m_staticText16 = new wxStaticText( sbSizerCopperZones->GetStaticBox(), wxID_ANY, _("Pad connection to zones:"), wxDefaultPosition, wxDefaultSize, 0 );
329 m_staticText16->Wrap( -1 );
330 sbSizerCopperZones->Add( m_staticText16, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
331
332 wxString m_ZoneConnectionChoiceChoices[] = { _("Use zone setting"), _("Solid"), _("Thermal relief"), _("None") };
333 int m_ZoneConnectionChoiceNChoices = sizeof( m_ZoneConnectionChoiceChoices ) / sizeof( wxString );
334 m_ZoneConnectionChoice = new wxChoice( sbSizerCopperZones->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ZoneConnectionChoiceNChoices, m_ZoneConnectionChoiceChoices, 0 );
335 m_ZoneConnectionChoice->SetSelection( 0 );
336 sbSizerCopperZones->Add( m_ZoneConnectionChoice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
337
338
339 bSizerPanelClearances->Add( sbSizerCopperZones, 0, wxALL|wxEXPAND, 5 );
340
341 wxStaticBoxSizer* sbSizerNetTies;
342 sbSizerNetTies = new wxStaticBoxSizer( new wxStaticBox( m_PanelClearances, wxID_ANY, _("Net Ties") ), wxVERTICAL );
343
344 m_padGroupsLabel = new wxStaticText( sbSizerNetTies->GetStaticBox(), wxID_ANY, _("Pad groups allowed to short different nets:"), wxDefaultPosition, wxDefaultSize, 0 );
345 m_padGroupsLabel->Wrap( -1 );
346 sbSizerNetTies->Add( m_padGroupsLabel, 0, wxRIGHT|wxLEFT, 5 );
347
348 m_padGroupsGrid = new WX_GRID( sbSizerNetTies->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
349
350 // Grid
351 m_padGroupsGrid->CreateGrid( 0, 1 );
352 m_padGroupsGrid->EnableEditing( true );
353 m_padGroupsGrid->EnableGridLines( true );
354 m_padGroupsGrid->EnableDragGridSize( false );
355 m_padGroupsGrid->SetMargins( 0, 0 );
356
357 // Columns
358 m_padGroupsGrid->SetColSize( 0, 320 );
359 m_padGroupsGrid->EnableDragColMove( false );
360 m_padGroupsGrid->EnableDragColSize( true );
362 m_padGroupsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
363
364 // Rows
365 m_padGroupsGrid->EnableDragRowSize( true );
366 m_padGroupsGrid->SetRowLabelSize( 0 );
367 m_padGroupsGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
368
369 // Label Appearance
370
371 // Cell Defaults
372 m_padGroupsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
373 m_padGroupsGrid->SetMinSize( wxSize( -1,30 ) );
374
375 sbSizerNetTies->Add( m_padGroupsGrid, 1, wxALL|wxEXPAND, 5 );
376
377 wxBoxSizer* bButtonSize2;
378 bButtonSize2 = new wxBoxSizer( wxHORIZONTAL );
379
380 m_bpAddPadGroup = new STD_BITMAP_BUTTON( sbSizerNetTies->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
381 bButtonSize2->Add( m_bpAddPadGroup, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
382
383
384 bButtonSize2->Add( 20, 0, 0, wxEXPAND, 5 );
385
386 m_bpRemovePadGroup = new STD_BITMAP_BUTTON( sbSizerNetTies->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
387 bButtonSize2->Add( m_bpRemovePadGroup, 0, wxBOTTOM|wxRIGHT, 5 );
388
389
390 sbSizerNetTies->Add( bButtonSize2, 0, wxEXPAND, 2 );
391
392
393 bSizerPanelClearances->Add( sbSizerNetTies, 1, wxALL|wxEXPAND, 5 );
394
395
396 m_PanelClearances->SetSizer( bSizerPanelClearances );
397 m_PanelClearances->Layout();
398 bSizerPanelClearances->Fit( m_PanelClearances );
399 m_NoteBook->AddPage( m_PanelClearances, _("Clearance Overrides and Settings"), true );
400
401 m_GeneralBoxSizer->Add( m_NoteBook, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
402
403 wxBoxSizer* bSizer16;
404 bSizer16 = new wxBoxSizer( wxHORIZONTAL );
405
406 m_sdbSizerStdButtons = new wxStdDialogButtonSizer();
407 m_sdbSizerStdButtonsOK = new wxButton( this, wxID_OK );
409 m_sdbSizerStdButtonsCancel = new wxButton( this, wxID_CANCEL );
411 m_sdbSizerStdButtons->Realize();
412
413 bSizer16->Add( m_sdbSizerStdButtons, 1, wxEXPAND|wxALL, 5 );
414
415
416 m_GeneralBoxSizer->Add( bSizer16, 0, wxEXPAND|wxTOP, 5 );
417
418
419 this->SetSizer( m_GeneralBoxSizer );
420 this->Layout();
421 m_GeneralBoxSizer->Fit( this );
422
423 // Connect Events
424 this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnInitDlg ) );
425 this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnUpdateUI ) );
426 m_itemsGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnGridSize ), NULL, this );
427 m_bpAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnAddField ), NULL, this );
428 m_bpDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnDeleteField ), NULL, this );
429 m_FootprintNameCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnFootprintNameText ), NULL, this );
430 m_privateLayersGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnGridSize ), NULL, this );
431 m_bpAddLayer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnAddLayer ), NULL, this );
432 m_bpDeleteLayer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnDeleteLayer ), NULL, this );
433 m_padGroupsGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnGridSize ), NULL, this );
434 m_bpAddPadGroup->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnAddPadGroup ), NULL, this );
435 m_bpRemovePadGroup->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnRemovePadGroup ), NULL, this );
436}
437
439{
440 // Disconnect Events
441 this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnInitDlg ) );
442 this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnUpdateUI ) );
443 m_itemsGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnGridSize ), NULL, this );
444 m_bpAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnAddField ), NULL, this );
445 m_bpDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnDeleteField ), NULL, this );
446 m_FootprintNameCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnFootprintNameText ), NULL, this );
447 m_privateLayersGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnGridSize ), NULL, this );
448 m_bpAddLayer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnAddLayer ), NULL, this );
449 m_bpDeleteLayer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnDeleteLayer ), NULL, this );
450 m_padGroupsGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnGridSize ), NULL, this );
451 m_bpAddPadGroup->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnAddPadGroup ), NULL, this );
452 m_bpRemovePadGroup->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnRemovePadGroup ), NULL, this );
453
454}
DIALOG_FOOTPRINT_PROPERTIES_FP_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)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:88
A bitmap button widget that behaves like a standard dialog button except with an icon.
wxTextCtrl wrapper to handle math expression evaluation.
void SetColLabelSize(int aHeight)
Hide wxGrid's SetColLabelSize() method with one which makes sure the size is tall enough for the syst...
Definition: wx_grid.cpp:246
#define _(s)