16DIALOG_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 )
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, wxALL|wxBOTTOM|wxEXPAND, 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 );
92 bButtonSize->Add(
m_bpDelete, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
95 sbSizerTexts->Add( bButtonSize, 0, wxEXPAND, 5 );
98 m_PanelPropertiesBoxSizer->Add( sbSizerTexts, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
100 wxBoxSizer* bSizerProperties;
101 bSizerProperties =
new wxBoxSizer( wxHORIZONTAL );
105 wxStaticBoxSizer* sbSizer7;
106 sbSizer7 =
new wxStaticBoxSizer(
new wxStaticBox(
m_PanelGeneral, wxID_ANY,
_(
"Position") ), wxVERTICAL );
108 wxFlexGridSizer* fgSizerPos;
109 fgSizerPos =
new wxFlexGridSizer( 4, 3, 2, 0 );
110 fgSizerPos->AddGrowableCol( 1 );
111 fgSizerPos->AddGrowableRow( 2 );
112 fgSizerPos->SetFlexibleDirection( wxBOTH );
113 fgSizerPos->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
115 m_XPosLabel =
new wxStaticText( sbSizer7->GetStaticBox(), wxID_ANY,
_(
"X:"), wxDefaultPosition, wxDefaultSize, 0 );
117 fgSizerPos->Add(
m_XPosLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
119 m_ModPositionX =
new wxTextCtrl( sbSizer7->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
120 fgSizerPos->Add(
m_ModPositionX, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
122 m_XPosUnit =
new wxStaticText( sbSizer7->GetStaticBox(), wxID_ANY,
_(
"unit"), wxDefaultPosition, wxDefaultSize, 0 );
124 fgSizerPos->Add(
m_XPosUnit, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
126 m_YPosLabel =
new wxStaticText( sbSizer7->GetStaticBox(), wxID_ANY,
_(
"Y:"), wxDefaultPosition, wxDefaultSize, 0 );
128 fgSizerPos->Add(
m_YPosLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
130 m_ModPositionY =
new wxTextCtrl( sbSizer7->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
131 fgSizerPos->Add(
m_ModPositionY, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP, 1 );
133 m_YPosUnit =
new wxStaticText( sbSizer7->GetStaticBox(), wxID_ANY,
_(
"unit"), wxDefaultPosition, wxDefaultSize, 0 );
135 fgSizerPos->Add(
m_YPosUnit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
137 m_orientationLabel =
new wxStaticText( sbSizer7->GetStaticBox(), wxID_ANY,
_(
"Orientation:"), wxDefaultPosition, wxDefaultSize, 0 );
141 m_orientationCtrl =
new wxComboBox( sbSizer7->GetStaticBox(), wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
146 fgSizerPos->Add(
m_orientationCtrl, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 2 );
149 fgSizerPos->Add( 0, 0, 1, wxEXPAND, 5 );
151 m_BoardSideLabel =
new wxStaticText( sbSizer7->GetStaticBox(), wxID_ANY,
_(
"Side:"), wxDefaultPosition, wxDefaultSize, 0 );
153 fgSizerPos->Add(
m_BoardSideLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
155 wxString m_BoardSideCtrlChoices[] = {
_(
"Front"),
_(
"Back") };
156 int m_BoardSideCtrlNChoices =
sizeof( m_BoardSideCtrlChoices ) /
sizeof( wxString );
157 m_BoardSideCtrl =
new wxChoice( sbSizer7->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_BoardSideCtrlNChoices, m_BoardSideCtrlChoices, 0 );
159 fgSizerPos->Add(
m_BoardSideCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM, 2 );
162 sbSizer7->Add( fgSizerPos, 0, wxEXPAND|wxBOTTOM, 3 );
164 m_cbLocked =
new wxCheckBox( sbSizer7->GetStaticBox(), wxID_ANY,
_(
"Locked"), wxDefaultPosition, wxDefaultSize, 0 );
168 bSizerLeft->Add( sbSizer7, 1, wxEXPAND|wxALL, 5 );
171 bSizerProperties->Add(
bSizerLeft, 1, wxEXPAND, 5 );
174 bSizerProperties->Add( 5, 0, 0, 0, 5 );
176 wxBoxSizer* bSizerMiddle;
177 bSizerMiddle =
new wxBoxSizer( wxVERTICAL );
179 wxStaticBoxSizer* sbAttributesSizer;
180 sbAttributesSizer =
new wxStaticBoxSizer(
new wxStaticBox(
m_PanelGeneral, wxID_ANY,
_(
"Attributes") ), wxVERTICAL );
182 wxBoxSizer* bPartTypeSizer;
183 bPartTypeSizer =
new wxBoxSizer( wxHORIZONTAL );
185 m_componentTypeLabel =
new wxStaticText( sbAttributesSizer->GetStaticBox(), wxID_ANY,
_(
"Footprint type:"), wxDefaultPosition, wxDefaultSize, 0 );
187 bPartTypeSizer->Add(
m_componentTypeLabel, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
189 wxString m_componentTypeChoices[] = {
_(
"Through hole"),
_(
"SMD"),
_(
"Unspecified") };
190 int m_componentTypeNChoices =
sizeof( m_componentTypeChoices ) /
sizeof( wxString );
191 m_componentType =
new wxChoice( sbAttributesSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_componentTypeNChoices, m_componentTypeChoices, 0 );
193 bPartTypeSizer->Add(
m_componentType, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
196 sbAttributesSizer->Add( bPartTypeSizer, 0, wxEXPAND, 5 );
199 sbAttributesSizer->Add( 0, 0, 1, wxEXPAND, 5 );
201 m_boardOnly =
new wxCheckBox( sbAttributesSizer->GetStaticBox(), wxID_ANY,
_(
"Not in schematic"), wxDefaultPosition, wxDefaultSize, 0 );
202 sbAttributesSizer->Add(
m_boardOnly, 0, wxALL, 5 );
204 m_excludeFromPosFiles =
new wxCheckBox( sbAttributesSizer->GetStaticBox(), wxID_ANY,
_(
"Exclude from position files"), wxDefaultPosition, wxDefaultSize, 0 );
207 m_excludeFromBOM =
new wxCheckBox( sbAttributesSizer->GetStaticBox(), wxID_ANY,
_(
"Exclude from bill of materials"), wxDefaultPosition, wxDefaultSize, 0 );
210 m_noCourtyards =
new wxCheckBox( sbAttributesSizer->GetStaticBox(), wxID_ANY,
_(
"Exempt from courtyard requirement"), wxDefaultPosition, wxDefaultSize, 0 );
211 m_noCourtyards->SetToolTip(
_(
"Will not generate \"missing courtyard\" DRC violations") );
213 sbAttributesSizer->Add(
m_noCourtyards, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
215 m_cbDNP =
new wxCheckBox( sbAttributesSizer->GetStaticBox(), wxID_ANY,
_(
"Do not populate"), wxDefaultPosition, wxDefaultSize, 0 );
216 sbAttributesSizer->Add(
m_cbDNP, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
219 bSizerMiddle->Add( sbAttributesSizer, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
222 bSizerProperties->Add( bSizerMiddle, 1, wxEXPAND|wxTOP, 5 );
224 wxBoxSizer* bSizerRight;
225 bSizerRight =
new wxBoxSizer( wxVERTICAL );
227 wxBoxSizer* bButtonsSizer;
228 bButtonsSizer =
new wxBoxSizer( wxVERTICAL );
240 bButtonsSizer->Add( 0, 15, 0, wxEXPAND, 5 );
242 m_button5 =
new wxButton(
m_PanelGeneral, wxID_ANY,
_(
"Edit Library Footprint..."), wxDefaultPosition, wxDefaultSize, 0 );
243 bButtonsSizer->Add(
m_button5, 0, wxEXPAND|wxALL, 5 );
246 bSizerRight->Add( bButtonsSizer, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
249 bSizerRight->Add( 0, 0, 1, wxEXPAND, 5 );
252 bSizerProperties->Add( bSizerRight, 1, wxEXPAND|wxTOP, 5 );
255 m_PanelPropertiesBoxSizer->Add( bSizerProperties, 0, wxEXPAND, 5 );
263 wxBoxSizer* bSizerPanelClearances;
264 bSizerPanelClearances =
new wxBoxSizer( wxVERTICAL );
266 wxStaticBoxSizer* sbSizerLocalProperties;
267 sbSizerLocalProperties =
new wxStaticBoxSizer(
new wxStaticBox(
m_PanelClearances, wxID_ANY,
_(
"Clearances") ), wxVERTICAL );
269 m_staticTextInfo =
new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY,
_(
"Leave values blank to use Board Setup values."), wxDefaultPosition, wxDefaultSize, 0 );
271 sbSizerLocalProperties->Add(
m_staticTextInfo, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
273 wxGridBagSizer* gbSizer2;
274 gbSizer2 =
new wxGridBagSizer( 4, 0 );
275 gbSizer2->SetFlexibleDirection( wxBOTH );
276 gbSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
277 gbSizer2->SetEmptyCellSize( wxSize( -1,15 ) );
279 m_NetClearanceLabel =
new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY,
_(
"Pad clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
281 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.") );
283 gbSizer2->Add(
m_NetClearanceLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
285 m_NetClearanceCtrl =
new wxTextCtrl( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
286 gbSizer2->Add(
m_NetClearanceCtrl, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
288 m_NetClearanceUnits =
new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY,
_(
"unit"), wxDefaultPosition, wxDefaultSize, 0 );
290 gbSizer2->Add(
m_NetClearanceUnits, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
292 m_SolderMaskMarginLabel =
new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY,
_(
"Solder mask expansion:"), wxDefaultPosition, wxDefaultSize, 0 );
294 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.") );
296 gbSizer2->Add(
m_SolderMaskMarginLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
298 m_SolderMaskMarginCtrl =
new wxTextCtrl( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
299 gbSizer2->Add(
m_SolderMaskMarginCtrl, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
301 m_SolderMaskMarginUnits =
new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY,
_(
"unit"), wxDefaultPosition, wxDefaultSize, 0 );
303 gbSizer2->Add(
m_SolderMaskMarginUnits, wxGBPosition( 2, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
305 m_allowSolderMaskBridges =
new wxCheckBox( sbSizerLocalProperties->GetStaticBox(), wxID_ANY,
_(
"Allow bridged solder mask apertures between pads"), wxDefaultPosition, wxDefaultSize, 0 );
308 m_SolderPasteMarginLabel =
new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY,
_(
"Solder paste absolute clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
310 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 stencil aperture size than pad size.") );
312 gbSizer2->Add(
m_SolderPasteMarginLabel, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
314 m_SolderPasteMarginCtrl =
new wxTextCtrl( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
317 m_SolderPasteMarginUnits =
new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY,
_(
"unit"), wxDefaultPosition, wxDefaultSize, 0 );
319 gbSizer2->Add(
m_SolderPasteMarginUnits, wxGBPosition( 5, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
321 m_PasteMarginRatioLabel =
new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY,
_(
"Solder paste relative clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
323 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.\nThis value can be superseded by a pad local value.\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.") );
325 gbSizer2->Add(
m_PasteMarginRatioLabel, wxGBPosition( 6, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
328 gbSizer2->Add(
m_PasteMarginRatioCtrl, wxGBPosition( 6, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
330 m_PasteMarginRatioUnits =
new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY,
_(
"%"), wxDefaultPosition, wxDefaultSize, 0 );
332 gbSizer2->Add(
m_PasteMarginRatioUnits, wxGBPosition( 6, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
335 sbSizerLocalProperties->Add( gbSizer2, 1, wxEXPAND|wxTOP|wxBOTTOM, 10 );
337 wxFlexGridSizer* fgSizerClearances;
338 fgSizerClearances =
new wxFlexGridSizer( 5, 3, 5, 0 );
339 fgSizerClearances->AddGrowableCol( 1 );
340 fgSizerClearances->SetFlexibleDirection( wxBOTH );
341 fgSizerClearances->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
344 sbSizerLocalProperties->Add( fgSizerClearances, 0, wxTOP|wxBOTTOM, 10 );
346 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 );
350 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 );
355 bSizerPanelClearances->Add( sbSizerLocalProperties, 0, wxEXPAND|wxALL, 10 );
357 wxStaticBoxSizer* sbSizerZoneConnection;
358 sbSizerZoneConnection =
new wxStaticBoxSizer(
new wxStaticBox(
m_PanelClearances, wxID_ANY,
_(
"Connection to Copper Zones") ), wxHORIZONTAL );
360 m_staticText16 =
new wxStaticText( sbSizerZoneConnection->GetStaticBox(), wxID_ANY,
_(
"Pad connection to zones:"), wxDefaultPosition, wxDefaultSize, 0 );
362 sbSizerZoneConnection->Add(
m_staticText16, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
364 wxString m_ZoneConnectionChoiceChoices[] = {
_(
"Use zone setting"),
_(
"Solid"),
_(
"Thermal relief"),
_(
"None") };
365 int m_ZoneConnectionChoiceNChoices =
sizeof( m_ZoneConnectionChoiceChoices ) /
sizeof( wxString );
366 m_ZoneConnectionChoice =
new wxChoice( sbSizerZoneConnection->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ZoneConnectionChoiceNChoices, m_ZoneConnectionChoiceChoices, 0 );
368 sbSizerZoneConnection->Add(
m_ZoneConnectionChoice, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
371 bSizerPanelClearances->Add( sbSizerZoneConnection, 0, wxALL|wxEXPAND, 10 );
381 wxBoxSizer* bottomButtonsSizer;
382 bottomButtonsSizer =
new wxBoxSizer( wxHORIZONTAL );
384 m_libraryIDLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Library link:"), wxDefaultPosition, wxDefaultSize, 0 );
386 bottomButtonsSizer->Add(
m_libraryIDLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 7 );
388 m_tcLibraryID =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxBORDER_NONE );
389 m_tcLibraryID->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) );
390 m_tcLibraryID->SetToolTip(
_(
"The library ID and footprint ID currently assigned. Use \"Change Footprint...\" to assign a different footprint.") );
392 bottomButtonsSizer->Add(
m_tcLibraryID, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
395 bottomButtonsSizer->Add( 10, 0, 0, 0, 5 );
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...