15DIALOG_LIB_SYMBOL_PROPERTIES_BASE::DIALOG_LIB_SYMBOL_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 )
17 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
19 wxBoxSizer* bMainSizer;
20 bMainSizer =
new wxBoxSizer( wxVERTICAL );
22 wxBoxSizer* bUpperSizer;
23 bUpperSizer =
new wxBoxSizer( wxVERTICAL );
25 m_NoteBook =
new wxNotebook(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0|wxTAB_TRAVERSAL );
27 wxBoxSizer* bSizerBasicPanel;
28 bSizerBasicPanel =
new wxBoxSizer( wxVERTICAL );
30 wxStaticBoxSizer* sbSizer4;
31 sbSizer4 =
new wxStaticBoxSizer(
new wxStaticBox(
m_PanelBasic, wxID_ANY,
_(
"Fields") ), wxVERTICAL );
33 m_grid =
new WX_GRID( sbSizer4->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
36 m_grid->CreateGrid( 4, 14 );
37 m_grid->EnableEditing(
true );
38 m_grid->EnableGridLines(
true );
39 m_grid->EnableDragGridSize(
false );
40 m_grid->SetMargins( 0, 0 );
43 m_grid->SetColSize( 0, 72 );
44 m_grid->SetColSize( 1, 8 );
45 m_grid->SetColSize( 2, 48 );
46 m_grid->SetColSize( 3, 84 );
47 m_grid->SetColSize( 4, 66 );
48 m_grid->SetColSize( 5, 66 );
49 m_grid->SetColSize( 6, 48 );
50 m_grid->SetColSize( 7, 48 );
51 m_grid->SetColSize( 8, 80 );
52 m_grid->SetColSize( 9, 84 );
53 m_grid->SetColSize( 10, 84 );
54 m_grid->SetColSize( 11, 84 );
55 m_grid->SetColSize( 12, 10 );
56 m_grid->SetColSize( 13, 48 );
57 m_grid->EnableDragColMove(
false );
58 m_grid->EnableDragColSize(
true );
59 m_grid->SetColLabelValue( 0,
_(
"Name") );
60 m_grid->SetColLabelValue( 1,
_(
"Value") );
61 m_grid->SetColLabelValue( 2,
_(
"Show") );
62 m_grid->SetColLabelValue( 3,
_(
"Show Name") );
63 m_grid->SetColLabelValue( 4,
_(
"H Align") );
64 m_grid->SetColLabelValue( 5,
_(
"V Align") );
65 m_grid->SetColLabelValue( 6,
_(
"Italic") );
66 m_grid->SetColLabelValue( 7,
_(
"Bold") );
67 m_grid->SetColLabelValue( 8,
_(
"Text Size") );
68 m_grid->SetColLabelValue( 9,
_(
"Orientation") );
69 m_grid->SetColLabelValue( 10,
_(
"X Position") );
70 m_grid->SetColLabelValue( 11,
_(
"Y Position") );
71 m_grid->SetColLabelValue( 12,
_(
"Font") );
72 m_grid->SetColLabelValue( 13,
_(
"Color") );
73 m_grid->SetColLabelSize( 22 );
74 m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
77 m_grid->EnableDragRowSize(
true );
78 m_grid->SetRowLabelSize( 0 );
79 m_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
84 m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
85 m_grid->SetMinSize( wxSize( -1,160 ) );
87 sbSizer4->Add(
m_grid, 1, wxALL|wxEXPAND, 5 );
91 m_bpAdd =
new STD_BITMAP_BUTTON( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
92 m_bpAdd->SetToolTip(
_(
"Add field") );
96 m_bpMoveUp =
new STD_BITMAP_BUTTON( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
109 m_bpDelete =
new STD_BITMAP_BUTTON( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
115 sbSizer4->Add(
bButtonSize, 0, wxEXPAND|wxBOTTOM, 5 );
118 bSizerBasicPanel->Add( sbSizer4, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
120 wxBoxSizer* bSizerMidBasicPanel;
121 bSizerMidBasicPanel =
new wxBoxSizer( wxVERTICAL );
123 wxFlexGridSizer* fgSizerFPID;
124 fgSizerFPID =
new wxFlexGridSizer( 4, 2, 3, 0 );
125 fgSizerFPID->AddGrowableCol( 1 );
126 fgSizerFPID->SetFlexibleDirection( wxBOTH );
127 fgSizerFPID->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
129 wxStaticText* staticNameLabel;
130 staticNameLabel =
new wxStaticText(
m_PanelBasic, wxID_ANY,
_(
"Symbol name:"), wxDefaultPosition, wxDefaultSize, 0 );
131 staticNameLabel->Wrap( -1 );
132 fgSizerFPID->Add( staticNameLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 8 );
135 fgSizerFPID->Add(
m_SymbolNameCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 8 );
142 fgSizerFPID->Add(
m_KeywordCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 8 );
149 m_inheritanceSelectCombo->SetToolTip(
_(
"Select symbol to derive this symbol from or select\n<None> for root symbol.\n\nDerived symbols were formerly referred to as aliases.\nThis is no longer the case and all symbols are either\nderived from another symbols or they stand alone as\nroot symbols.") );
154 bSizerMidBasicPanel->Add( fgSizerFPID, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
157 bSizerBasicPanel->Add( bSizerMidBasicPanel, 0, wxEXPAND, 5 );
161 wxBoxSizer* bSizerLeftCol;
162 bSizerLeftCol =
new wxBoxSizer( wxVERTICAL );
164 wxStaticBoxSizer* sbSizerSymbol;
165 sbSizerSymbol =
new wxStaticBoxSizer(
new wxStaticBox(
m_PanelBasic, wxID_ANY,
_(
"General") ), wxVERTICAL );
167 m_OptionPower =
new wxCheckBox( sbSizerSymbol->GetStaticBox(), wxID_ANY,
_(
"Define as power symbol"), wxDefaultPosition, wxDefaultSize, 0 );
168 m_OptionPower->SetToolTip(
_(
"Power symbols define a global net with the value as a netname.\nThey will not be included in the BOM and cannot be assigned a footprint.") );
170 sbSizerSymbol->Add(
m_OptionPower, 0, wxBOTTOM|wxRIGHT|wxLEFT, 4 );
172 wxBoxSizer* bSizer16;
173 bSizer16 =
new wxBoxSizer( wxHORIZONTAL );
176 bSizer16->Add( 0, 0, 0, wxEXPAND|wxLEFT|wxRIGHT, 10 );
178 m_OptionLocalPower =
new wxCheckBox( sbSizerSymbol->GetStaticBox(), wxID_ANY,
_(
"Define as local power symbol"), wxDefaultPosition, wxDefaultSize, 0 );
179 m_OptionLocalPower->SetToolTip(
_(
"Local power symbols create labels that are limited to the sheet in which they are used") );
184 sbSizerSymbol->Add( bSizer16, 1, wxEXPAND, 5 );
187 bSizerLeftCol->Add( sbSizerSymbol, 1, wxEXPAND|wxALL, 5 );
192 wxBoxSizer* bSizerPinTextCol;
193 bSizerPinTextCol =
new wxBoxSizer( wxVERTICAL );
195 wxStaticBoxSizer* sbSizerPinTextOpts;
196 sbSizerPinTextOpts =
new wxStaticBoxSizer(
new wxStaticBox(
m_PanelBasic, wxID_ANY,
_(
"Pin Text Options") ), wxVERTICAL );
198 m_ShowPinNumButt =
new wxCheckBox( sbSizerPinTextOpts->GetStaticBox(), wxID_ANY,
_(
"Show pin number"), wxDefaultPosition, wxDefaultSize, 0 );
204 m_ShowPinNameButt =
new wxCheckBox( sbSizerPinTextOpts->GetStaticBox(), wxID_ANY,
_(
"Show pin name"), wxDefaultPosition, wxDefaultSize, 0 );
211 sbSizerPinTextOpts->Add( 0, 12, 0, wxEXPAND, 5 );
213 m_PinsNameInsideButt =
new wxCheckBox( sbSizerPinTextOpts->GetStaticBox(), wxID_ANY,
_(
"Place pin names inside"), wxDefaultPosition, wxDefaultSize, 0 );
215 m_PinsNameInsideButt->SetToolTip(
_(
"Check this option to have pin names inside the body and pin number outside.\nIf not checked pins names and pins numbers are outside.") );
219 wxBoxSizer* bSizerNameOffset;
220 bSizerNameOffset =
new wxBoxSizer( wxHORIZONTAL );
222 m_nameOffsetLabel =
new wxStaticText( sbSizerPinTextOpts->GetStaticBox(), wxID_ANY,
_(
"Position offset:"), wxDefaultPosition, wxDefaultSize, 0 );
224 m_nameOffsetLabel->SetToolTip(
_(
"Margin between the pin name position and the symbol body.") );
226 bSizerNameOffset->Add(
m_nameOffsetLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 24 );
228 m_nameOffsetCtrl =
new wxTextCtrl( sbSizerPinTextOpts->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
231 m_nameOffsetUnits =
new wxStaticText( sbSizerPinTextOpts->GetStaticBox(), wxID_ANY,
_(
"units"), wxDefaultPosition, wxDefaultSize, 0 );
233 bSizerNameOffset->Add(
m_nameOffsetUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
236 sbSizerPinTextOpts->Add( bSizerNameOffset, 0, wxEXPAND|wxTOP, 2 );
239 sbSizerPinTextOpts->Add( 0, 0, 0, wxEXPAND, 5 );
242 bSizerPinTextCol->Add( sbSizerPinTextOpts, 1, wxALL|wxEXPAND, 5 );
247 wxBoxSizer* bSizerRightCol;
248 bSizerRightCol =
new wxBoxSizer( wxVERTICAL );
250 wxStaticBoxSizer* sbSizerAttributes;
251 sbSizerAttributes =
new wxStaticBoxSizer(
new wxStaticBox(
m_PanelBasic, wxID_ANY,
_(
"Attributes") ), wxVERTICAL );
253 m_excludeFromSimCheckBox =
new wxCheckBox( sbSizerAttributes->GetStaticBox(), wxID_ANY,
_(
"Exclude from simulation"), wxDefaultPosition, wxDefaultSize, 0 );
257 sbSizerAttributes->Add( 0, 10, 0, wxEXPAND, 5 );
259 m_excludeFromBomCheckBox =
new wxCheckBox( sbSizerAttributes->GetStaticBox(), wxID_ANY,
_(
"Exclude from bill of materials"), wxDefaultPosition, wxDefaultSize, 0 );
262 m_excludeFromBoardCheckBox =
new wxCheckBox( sbSizerAttributes->GetStaticBox(), wxID_ANY,
_(
"Exclude from board"), wxDefaultPosition, wxDefaultSize, 0 );
266 bSizerRightCol->Add( sbSizerAttributes, 1, wxEXPAND|wxALL, 5 );
280 wxBoxSizer* bSizerUnitsAndBodyStyles;
281 bSizerUnitsAndBodyStyles =
new wxBoxSizer( wxHORIZONTAL );
283 wxStaticBoxSizer* sbSizerUnits;
286 wxBoxSizer* bSizerUnitCount;
287 bSizerUnitCount =
new wxBoxSizer( wxHORIZONTAL );
289 m_staticTextNbUnits =
new wxStaticText( sbSizerUnits->GetStaticBox(), wxID_ANY,
_(
"Number of units:"), wxDefaultPosition, wxDefaultSize, 0 );
291 m_staticTextNbUnits->SetToolTip(
_(
"Enter the number of units for a symbol that contains more than one unit") );
295 m_unitSpinCtrl =
new wxSpinCtrl( sbSizerUnits->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 64, 1 );
296 bSizerUnitCount->Add(
m_unitSpinCtrl, 0, wxALIGN_CENTER_VERTICAL, 5 );
299 sbSizerUnits->Add( bSizerUnitCount, 0, wxEXPAND|wxBOTTOM|wxLEFT, 4 );
302 sbSizerUnits->Add( 0, 2, 0, wxEXPAND, 5 );
304 m_OptionPartsInterchangeable =
new wxCheckBox( sbSizerUnits->GetStaticBox(), wxID_ANY,
_(
"All units are interchangeable"), wxDefaultPosition, wxDefaultSize, 0 );
305 m_OptionPartsInterchangeable->SetToolTip(
_(
"Check this option when all symbol units have the same function.\nFor instance, this should be checked for a quad NAND gate, while it should not be checked for a dual triode (where unit C is the filament).") );
310 sbSizerUnits->Add( 0, 15, 0, wxEXPAND, 5 );
312 m_unitNamesLabel =
new wxStaticText( sbSizerUnits->GetStaticBox(), wxID_ANY,
_(
"Unit display names (optional):"), wxDefaultPosition, wxDefaultSize, 0 );
316 m_unitNamesGrid =
new WX_GRID( sbSizerUnits->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
331 m_unitNamesGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
336 m_unitNamesGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
345 bSizerUnitsAndBodyStyles->Add( sbSizerUnits, 1, wxEXPAND|wxALL, 10 );
347 wxStaticBoxSizer* sbSizerBodyStyles;
348 sbSizerBodyStyles =
new wxStaticBoxSizer(
new wxStaticBox(
m_PanelUnitsAndBodyStyles, wxID_ANY,
_(
"Body Styles") ), wxVERTICAL );
350 m_radioSingle =
new wxRadioButton( sbSizerBodyStyles->GetStaticBox(), wxID_ANY,
_(
"Single body style"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
351 sbSizerBodyStyles->Add(
m_radioSingle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
354 sbSizerBodyStyles->Add( 0, 3, 0, wxEXPAND, 5 );
356 m_radioDeMorgan =
new wxRadioButton( sbSizerBodyStyles->GetStaticBox(), wxID_ANY,
_(
"‘Standard’ and ‘Alternate’ De Morgan body styles"), wxDefaultPosition, wxDefaultSize, 0 );
360 sbSizerBodyStyles->Add( 0, 3, 0, wxEXPAND, 5 );
362 m_radioCustom =
new wxRadioButton( sbSizerBodyStyles->GetStaticBox(), wxID_ANY,
_(
"Custom body styles:"), wxDefaultPosition, wxDefaultSize, 0 );
365 wxBoxSizer* bSizerIndent;
366 bSizerIndent =
new wxBoxSizer( wxVERTICAL );
424 sbSizerBodyStyles->Add( bSizerIndent, 1, wxEXPAND|wxLEFT, 24 );
427 bSizerUnitsAndBodyStyles->Add( sbSizerBodyStyles, 1, wxEXPAND|wxALL, 10 );
435 wxBoxSizer* bSizerFPFilters;
436 bSizerFPFilters =
new wxBoxSizer( wxHORIZONTAL );
438 wxBoxSizer* bFPFiltersMargins;
439 bFPFiltersMargins =
new wxBoxSizer( wxVERTICAL );
443 m_staticTextFootprints->SetToolTip(
_(
"A list of footprints names that can be used for this symbol.\nFootprints names can used wildcards like sm* to allow all footprints names starting by sm.") );
450 wxBoxSizer* bFpFilterRightBoxSizer;
451 bFpFilterRightBoxSizer =
new wxBoxSizer( wxHORIZONTAL );
464 bFpFilterRightBoxSizer->Add( 20, 0, 0, wxEXPAND, 5 );
472 bFPFiltersMargins->Add( bFpFilterRightBoxSizer, 0, 0, 5 );
475 bSizerFPFilters->Add( bFPFiltersMargins, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
483 wxBoxSizer* bSizerPinConnections;
484 bSizerPinConnections =
new wxBoxSizer( wxVERTICAL );
487 m_cbDuplicatePinsAreJumpers->SetToolTip(
_(
"When enabled, this symbol can have more than one pin with the same number, and pins with the same number will be considered to be jumpered together internally.") );
492 bSizerPinConnections->Add( 0, 3, 0, wxEXPAND, 5 );
494 wxStaticBoxSizer* sbJumperPinGroups;
495 sbJumperPinGroups =
new wxStaticBoxSizer(
new wxStaticBox(
m_PanelPinConnections, wxID_ANY,
_(
"Jumper Pin Groups") ), wxVERTICAL );
497 wxBoxSizer* bSizerMargins;
498 bSizerMargins =
new wxBoxSizer( wxHORIZONTAL );
500 wxBoxSizer* bSizerLeft;
501 bSizerLeft =
new wxBoxSizer( wxVERTICAL );
503 stLabelAvailablePins =
new wxStaticText( sbJumperPinGroups->GetStaticBox(), wxID_ANY,
_(
"Available pins:"), wxDefaultPosition, wxDefaultSize, 0 );
507 m_listAvailablePins =
new wxListBox( sbJumperPinGroups->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_EXTENDED|wxLB_SORT );
513 bSizerMargins->Add( bSizerLeft, 1, wxEXPAND, 5 );
515 wxBoxSizer* bSizerCenter;
516 bSizerCenter =
new wxBoxSizer( wxVERTICAL );
518 m_btnCreateJumperPinGroup =
new wxBitmapButton( sbJumperPinGroups->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
523 m_btnRemoveJumperPinGroup =
new wxBitmapButton( sbJumperPinGroups->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
529 bSizerMargins->Add( bSizerCenter, 0, wxALIGN_CENTER_VERTICAL, 5 );
531 wxBoxSizer* bSizerRight;
532 bSizerRight =
new wxBoxSizer( wxVERTICAL );
534 stLabelGroups =
new wxStaticText( sbJumperPinGroups->GetStaticBox(), wxID_ANY,
_(
"Grouped pins:"), wxDefaultPosition, wxDefaultSize, 0 );
538 m_listJumperPinGroups =
new wxListBox( sbJumperPinGroups->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_EXTENDED|wxLB_SORT );
544 bSizerMargins->Add( bSizerRight, 1, wxEXPAND, 5 );
547 sbJumperPinGroups->Add( bSizerMargins, 1, wxEXPAND|wxTOP, 2 );
550 bSizerPinConnections->Add( sbJumperPinGroups, 1, wxALL|wxTOP, 5 );
558 bUpperSizer->Add(
m_NoteBook, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
561 bMainSizer->Add( bUpperSizer, 1, wxEXPAND|wxBOTTOM, 5 );
563 wxBoxSizer* bSizer101;
564 bSizer101 =
new wxBoxSizer( wxHORIZONTAL );
567 bSizer101->Add( 0, 0, 1, wxEXPAND, 5 );
569 m_spiceFieldsButton =
new wxButton(
this, wxID_ANY,
_(
"Edit Simulation Model..."), wxDefaultPosition, wxDefaultSize, 0 );
573 bSizer101->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 15 );
585 bMainSizer->Add( bSizer101, 0, wxEXPAND, 5 );
588 this->SetSizer( bMainSizer );
590 bMainSizer->Fit(
this );