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 )
18 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
24 wxBoxSizer* m_PanelPropertiesBoxSizer;
25 m_PanelPropertiesBoxSizer =
new wxBoxSizer( wxVERTICAL );
27 wxStaticBoxSizer* sbSizerTexts;
28 sbSizerTexts =
new wxStaticBoxSizer(
new wxStaticBox(
m_PanelGeneral, wxID_ANY,
_(
"Fields") ), wxVERTICAL );
30 m_itemsGrid =
new WX_GRID( sbSizerTexts->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), 0 );
65 m_itemsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
69 m_itemsGrid->SetRowLabelValue( 0,
_(
"Reference designator") );
72 m_itemsGrid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
77 m_itemsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
80 sbSizerTexts->Add(
m_itemsGrid, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
82 wxBoxSizer* bButtonSize;
83 bButtonSize =
new wxBoxSizer( wxHORIZONTAL );
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 );
89 bButtonSize->Add( 20, 0, 0, wxEXPAND, 5 );
91 m_bpDelete =
new STD_BITMAP_BUTTON( sbSizerTexts->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
95 sbSizerTexts->Add( bButtonSize, 0, wxEXPAND, 5 );
98 m_PanelPropertiesBoxSizer->Add( sbSizerTexts, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
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 );
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 );
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 );
120 fgSizerFPID->Add(
m_DocCtrl, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
127 fgSizerFPID->Add(
m_KeywordCtrl, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
130 m_PanelPropertiesBoxSizer->Add( fgSizerFPID, 0, wxEXPAND|wxBOTTOM, 10 );
132 wxBoxSizer* bSizerProperties;
133 bSizerProperties =
new wxBoxSizer( wxHORIZONTAL );
135 wxStaticBoxSizer* bSizerPrivateLayers;
136 bSizerPrivateLayers =
new wxStaticBoxSizer(
new wxStaticBox(
m_PanelGeneral, wxID_ANY,
_(
"Private Layers") ), wxVERTICAL );
165 wxBoxSizer* bButtonSize1;
166 bButtonSize1 =
new wxBoxSizer( wxHORIZONTAL );
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 );
172 bButtonSize1->Add( 20, 0, 0, wxEXPAND, 5 );
178 bSizerPrivateLayers->Add( bButtonSize1, 0, wxEXPAND, 5 );
181 bSizerProperties->Add( bSizerPrivateLayers, 1, wxEXPAND|wxRIGHT, 15 );
183 wxStaticBoxSizer* sbAttributesSizer;
184 sbAttributesSizer =
new wxStaticBoxSizer(
new wxStaticBox(
m_PanelGeneral, wxID_ANY,
_(
"Fabrication Attributes") ), wxVERTICAL );
186 wxBoxSizer* bPartTypeSizer;
187 bPartTypeSizer =
new wxBoxSizer( wxHORIZONTAL );
189 m_componentTypeLabel =
new wxStaticText( sbAttributesSizer->GetStaticBox(), wxID_ANY,
_(
"Component type:"), wxDefaultPosition, wxDefaultSize, 0 );
191 bPartTypeSizer->Add(
m_componentTypeLabel, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
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 );
197 bPartTypeSizer->Add(
m_componentType, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
200 sbAttributesSizer->Add( bPartTypeSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT, 5 );
202 m_boardOnly =
new wxCheckBox( sbAttributesSizer->GetStaticBox(), wxID_ANY,
_(
"Not in schematic"), wxDefaultPosition, wxDefaultSize, 0 );
203 sbAttributesSizer->Add(
m_boardOnly, 0, wxALL, 5 );
205 m_excludeFromPosFiles =
new wxCheckBox( sbAttributesSizer->GetStaticBox(), wxID_ANY,
_(
"Exclude from position files"), wxDefaultPosition, wxDefaultSize, 0 );
208 m_excludeFromBOM =
new wxCheckBox( sbAttributesSizer->GetStaticBox(), wxID_ANY,
_(
"Exclude from bill of materials"), wxDefaultPosition, wxDefaultSize, 0 );
211 m_cbDNP =
new wxCheckBox( sbAttributesSizer->GetStaticBox(), wxID_ANY,
_(
"Do not populate"), wxDefaultPosition, wxDefaultSize, 0 );
212 sbAttributesSizer->Add(
m_cbDNP, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
215 bSizerProperties->Add( sbAttributesSizer, 1, wxEXPAND|wxRIGHT, 5 );
218 m_PanelPropertiesBoxSizer->Add( bSizerProperties, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
226 wxBoxSizer* bSizerPanelClearances;
227 bSizerPanelClearances =
new wxBoxSizer( wxVERTICAL );
229 wxStaticBoxSizer* sbSizerLocalProperties;
230 sbSizerLocalProperties =
new wxStaticBoxSizer(
new wxStaticBox(
m_PanelClearances, wxID_ANY,
_(
"Clearances") ), wxVERTICAL );
232 m_staticTextInfo =
new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY,
_(
"Leave values blank to use netclass values."), wxDefaultPosition, wxDefaultSize, 0 );
234 sbSizerLocalProperties->Add(
m_staticTextInfo, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
236 wxGridBagSizer* gbSizer1;
237 gbSizer1 =
new wxGridBagSizer( 4, 0 );
238 gbSizer1->SetFlexibleDirection( wxBOTH );
239 gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
240 gbSizer1->SetEmptyCellSize( wxSize( -1,15 ) );
242 m_NetClearanceLabel =
new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY,
_(
"Pad clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
244 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.") );
246 gbSizer1->Add(
m_NetClearanceLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
248 m_NetClearanceCtrl =
new wxTextCtrl( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
249 gbSizer1->Add(
m_NetClearanceCtrl, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
251 m_NetClearanceUnits =
new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY,
_(
"unit"), wxDefaultPosition, wxDefaultSize, 0 );
253 gbSizer1->Add(
m_NetClearanceUnits, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
255 m_SolderMaskMarginLabel =
new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY,
_(
"Solder mask expansion:"), wxDefaultPosition, wxDefaultSize, 0 );
257 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.") );
259 gbSizer1->Add(
m_SolderMaskMarginLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
261 m_SolderMaskMarginCtrl =
new wxTextCtrl( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
262 gbSizer1->Add(
m_SolderMaskMarginCtrl, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
264 m_SolderMaskMarginUnits =
new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY,
_(
"unit"), wxDefaultPosition, wxDefaultSize, 0 );
266 gbSizer1->Add(
m_SolderMaskMarginUnits, wxGBPosition( 2, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
268 m_allowBridges =
new wxCheckBox( sbSizerLocalProperties->GetStaticBox(), wxID_ANY,
_(
"Allow bridged solder mask apertures between pads"), wxDefaultPosition, wxDefaultSize, 0 );
269 gbSizer1->Add(
m_allowBridges, wxGBPosition( 3, 0 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
271 m_SolderPasteMarginLabel =
new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY,
_(
"Solder paste absolute clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
273 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.") );
275 gbSizer1->Add(
m_SolderPasteMarginLabel, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
277 m_SolderPasteMarginCtrl =
new wxTextCtrl( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
280 m_SolderPasteMarginUnits =
new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY,
_(
"unit"), wxDefaultPosition, wxDefaultSize, 0 );
282 gbSizer1->Add(
m_SolderPasteMarginUnits, wxGBPosition( 5, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
284 m_PasteMarginRatioLabel =
new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY,
_(
"Solder paste relative clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
286 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.") );
288 gbSizer1->Add(
m_PasteMarginRatioLabel, wxGBPosition( 6, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
291 gbSizer1->Add(
m_PasteMarginRatioCtrl, wxGBPosition( 6, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
293 m_PasteMarginRatioUnits =
new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY,
_(
"%"), wxDefaultPosition, wxDefaultSize, 0 );
295 gbSizer1->Add(
m_PasteMarginRatioUnits, wxGBPosition( 6, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
298 sbSizerLocalProperties->Add( gbSizer1, 0, wxEXPAND|wxTOP|wxBOTTOM, 10 );
300 wxFlexGridSizer* fgSizerClearances;
301 fgSizerClearances =
new wxFlexGridSizer( 5, 3, 0, 0 );
302 fgSizerClearances->AddGrowableCol( 1 );
303 fgSizerClearances->SetFlexibleDirection( wxBOTH );
304 fgSizerClearances->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
307 sbSizerLocalProperties->Add( fgSizerClearances, 1, wxEXPAND, 5 );
309 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 );
313 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 );
318 bSizerPanelClearances->Add( sbSizerLocalProperties, 0, wxEXPAND|wxALL, 5 );
321 bSizerPanelClearances->Add( 0, 5, 0, wxEXPAND, 5 );
323 wxStaticBoxSizer* sbSizerCourtyards;
324 sbSizerCourtyards =
new wxStaticBoxSizer(
new wxStaticBox(
m_PanelClearances, wxID_ANY,
_(
"Courtyards") ), wxVERTICAL );
326 m_noCourtyards =
new wxCheckBox( sbSizerCourtyards->GetStaticBox(), wxID_ANY,
_(
"Exempt from courtyard requirement"), wxDefaultPosition, wxDefaultSize, 0 );
327 m_noCourtyards->SetToolTip(
_(
"Will not generate \"missing courtyard\" DRC violations") );
329 sbSizerCourtyards->Add(
m_noCourtyards, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
332 bSizerPanelClearances->Add( sbSizerCourtyards, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
340 wxBoxSizer* bSizer19;
341 bSizer19 =
new wxBoxSizer( wxVERTICAL );
343 wxStaticBoxSizer* sbSizerCopperZones;
344 sbSizerCopperZones =
new wxStaticBoxSizer(
new wxStaticBox(
m_PanelPadConnections, wxID_ANY,
_(
"Connection to Copper Zones") ), wxHORIZONTAL );
346 m_staticText16 =
new wxStaticText( sbSizerCopperZones->GetStaticBox(), wxID_ANY,
_(
"Pad connection to zones:"), wxDefaultPosition, wxDefaultSize, 0 );
348 sbSizerCopperZones->Add(
m_staticText16, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
350 wxString m_ZoneConnectionChoiceChoices[] = {
_(
"Use zone setting"),
_(
"Solid"),
_(
"Thermal relief"),
_(
"None") };
351 int m_ZoneConnectionChoiceNChoices =
sizeof( m_ZoneConnectionChoiceChoices ) /
sizeof( wxString );
352 m_ZoneConnectionChoice =
new wxChoice( sbSizerCopperZones->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ZoneConnectionChoiceNChoices, m_ZoneConnectionChoiceChoices, 0 );
357 bSizer19->Add( sbSizerCopperZones, 0, wxALL|wxEXPAND, 5 );
360 bSizer19->Add( 0, 5, 0, wxEXPAND, 5 );
362 wxStaticBoxSizer* sbSizerNetTies;
363 sbSizerNetTies =
new wxStaticBoxSizer(
new wxStaticBox(
m_PanelPadConnections, wxID_ANY,
_(
"Net Ties") ), wxVERTICAL );
365 m_nettieGroupsLabel =
new wxStaticText( sbSizerNetTies->GetStaticBox(), wxID_ANY,
_(
"Pad groups allowed to short different nets:"), wxDefaultPosition, wxDefaultSize, 0 );
398 wxBoxSizer* bButtonSize2;
399 bButtonSize2 =
new wxBoxSizer( wxHORIZONTAL );
405 bButtonSize2->Add( 20, 0, 0, wxEXPAND, 5 );
411 sbSizerNetTies->Add( bButtonSize2, 0, wxEXPAND, 2 );
414 bSizer19->Add( sbSizerNetTies, 1, wxALL|wxEXPAND, 5 );
417 bSizer19->Add( 0, 5, 0, wxEXPAND, 5 );
419 wxStaticBoxSizer* sbJumpers;
420 sbJumpers =
new wxStaticBoxSizer(
new wxStaticBox(
m_PanelPadConnections, wxID_ANY,
_(
"Jumpers") ), wxVERTICAL );
422 m_cbDuplicatePadsAreJumpers =
new wxCheckBox( sbJumpers->GetStaticBox(), wxID_ANY,
_(
"All pads with duplicate numbers are jumpers"), wxDefaultPosition, wxDefaultSize, 0 );
423 m_cbDuplicatePadsAreJumpers->SetToolTip(
_(
"When enabled, this footprint can have more than one pad with the same number, and pads with the same number will be considered to be jumpered together internally.") );
428 sbJumpers->Add( 0, 5, 0, wxEXPAND, 5 );
430 m_jumperGroupsLabel =
new wxStaticText( sbJumpers->GetStaticBox(), wxID_ANY,
_(
"Explicit jumper pad groups:"), wxDefaultPosition, wxDefaultSize, 0 );
463 wxBoxSizer* bButtonSize21;
464 bButtonSize21 =
new wxBoxSizer( wxHORIZONTAL );
470 bButtonSize21->Add( 20, 0, 0, wxEXPAND, 5 );
476 sbJumpers->Add( bButtonSize21, 0, wxEXPAND, 5 );
479 bSizer19->Add( sbJumpers, 1, wxALL|wxTOP|wxEXPAND, 5 );
489 wxBoxSizer* bSizer16;
490 bSizer16 =
new wxBoxSizer( wxHORIZONTAL );
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
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...