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, 120 );
45 m_grid->SetColSize( 2, 48 );
46 m_grid->SetColSize( 3, 84 );
47 m_grid->SetColSize( 4, 70 );
48 m_grid->SetColSize( 5, 70 );
49 m_grid->SetColSize( 6, 48 );
50 m_grid->SetColSize( 7, 48 );
51 m_grid->SetColSize( 8, 84 );
52 m_grid->SetColSize( 9, 84 );
53 m_grid->SetColSize( 10, 84 );
54 m_grid->SetColSize( 11, 84 );
55 m_grid->SetColSize( 12, 140 );
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") );
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 wxBoxSizer* bSizerUnitCount;
168 bSizerUnitCount =
new wxBoxSizer( wxHORIZONTAL );
170 m_staticTextNbUnits =
new wxStaticText( sbSizerSymbol->GetStaticBox(), wxID_ANY,
_(
"Number of units:"), wxDefaultPosition, wxDefaultSize, 0 );
172 m_staticTextNbUnits->SetToolTip(
_(
"Enter the number of units for a symbol that contains more than one unit") );
176 m_SelNumberOfUnits =
new wxSpinCtrl( sbSizerSymbol->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 64, 1 );
177 bSizerUnitCount->Add(
m_SelNumberOfUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
180 sbSizerSymbol->Add( bSizerUnitCount, 1, wxEXPAND|wxLEFT, 4 );
182 m_OptionPartsInterchangeable =
new wxCheckBox( sbSizerSymbol->GetStaticBox(), wxID_ANY,
_(
"All units are interchangeable"), wxDefaultPosition, wxDefaultSize, 0 );
183 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).") );
188 sbSizerSymbol->Add( 0, 8, 0, wxEXPAND, 5 );
190 m_hasAlternateBodyStyles =
new wxCheckBox( sbSizerSymbol->GetStaticBox(), wxID_ANY,
_(
"Has alternate body style (De Morgan)"), wxDefaultPosition, wxDefaultSize, 0 );
191 m_hasAlternateBodyStyles->SetToolTip(
_(
"Check this option if the symbol has an alternate body style for a De Morgan logic equivalence.\nFor instance, this should be checked for a NAND gate to provide an alternate representation as an OR gate with inverted inputs.") );
196 sbSizerSymbol->Add( 0, 7, 0, wxEXPAND, 5 );
198 m_OptionPower =
new wxCheckBox( sbSizerSymbol->GetStaticBox(), wxID_ANY,
_(
"Define as power symbol"), wxDefaultPosition, wxDefaultSize, 0 );
199 m_OptionPower->SetToolTip(
_(
"Setting this option makes the symbol in question appear in the\n\"add power symbol\" dialog. It will lock the value text to protect it\nfrom editing in the schematic. The symbol will not be included in\nthe BOM and cannot be assigned a footprint.") );
201 sbSizerSymbol->Add(
m_OptionPower, 0, wxBOTTOM|wxRIGHT|wxLEFT, 4 );
204 bSizerLeftCol->Add( sbSizerSymbol, 0, wxEXPAND|wxALL, 5 );
209 wxBoxSizer* bSizerMiddleCol;
210 bSizerMiddleCol =
new wxBoxSizer( wxVERTICAL );
212 wxStaticBoxSizer* sbSizerPinTextOpts;
213 sbSizerPinTextOpts =
new wxStaticBoxSizer(
new wxStaticBox(
m_PanelBasic, wxID_ANY,
_(
"Pin Text Options") ), wxVERTICAL );
215 m_ShowPinNumButt =
new wxCheckBox( sbSizerPinTextOpts->GetStaticBox(), wxID_ANY,
_(
"Show pin number"), wxDefaultPosition, wxDefaultSize, 0 );
221 m_ShowPinNameButt =
new wxCheckBox( sbSizerPinTextOpts->GetStaticBox(), wxID_ANY,
_(
"Show pin name"), wxDefaultPosition, wxDefaultSize, 0 );
228 sbSizerPinTextOpts->Add( 0, 12, 0, wxEXPAND, 5 );
230 m_PinsNameInsideButt =
new wxCheckBox( sbSizerPinTextOpts->GetStaticBox(), wxID_ANY,
_(
"Place pin names inside"), wxDefaultPosition, wxDefaultSize, 0 );
232 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.") );
236 wxBoxSizer* bSizerNameOffset;
237 bSizerNameOffset =
new wxBoxSizer( wxHORIZONTAL );
239 m_nameOffsetLabel =
new wxStaticText( sbSizerPinTextOpts->GetStaticBox(), wxID_ANY,
_(
"Position offset:"), wxDefaultPosition, wxDefaultSize, 0 );
241 m_nameOffsetLabel->SetToolTip(
_(
"Margin between the pin name position and the symbol body.") );
243 bSizerNameOffset->Add(
m_nameOffsetLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 24 );
245 m_nameOffsetCtrl =
new wxTextCtrl( sbSizerPinTextOpts->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
248 m_nameOffsetUnits =
new wxStaticText( sbSizerPinTextOpts->GetStaticBox(), wxID_ANY,
_(
"units"), wxDefaultPosition, wxDefaultSize, 0 );
250 bSizerNameOffset->Add(
m_nameOffsetUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
253 sbSizerPinTextOpts->Add( bSizerNameOffset, 0, wxBOTTOM|wxEXPAND|wxTOP, 4 );
256 sbSizerPinTextOpts->Add( 0, 0, 0, wxEXPAND, 5 );
259 bSizerMiddleCol->Add( sbSizerPinTextOpts, 1, wxALL|wxEXPAND, 5 );
264 wxBoxSizer* bSizerRightCol;
265 bSizerRightCol =
new wxBoxSizer( wxVERTICAL );
267 wxStaticBoxSizer* sbSizerAttributes;
268 sbSizerAttributes =
new wxStaticBoxSizer(
new wxStaticBox(
m_PanelBasic, wxID_ANY,
_(
"Attributes") ), wxVERTICAL );
270 m_excludeFromSimCheckBox =
new wxCheckBox( sbSizerAttributes->GetStaticBox(), wxID_ANY,
_(
"Exclude from simulation"), wxDefaultPosition, wxDefaultSize, 0 );
274 sbSizerAttributes->Add( 0, 10, 0, wxEXPAND, 5 );
276 m_excludeFromBomCheckBox =
new wxCheckBox( sbSizerAttributes->GetStaticBox(), wxID_ANY,
_(
"Exclude from bill of materials"), wxDefaultPosition, wxDefaultSize, 0 );
279 m_excludeFromBoardCheckBox =
new wxCheckBox( sbSizerAttributes->GetStaticBox(), wxID_ANY,
_(
"Exclude from board"), wxDefaultPosition, wxDefaultSize, 0 );
283 bSizerRightCol->Add( sbSizerAttributes, 1, wxEXPAND|wxALL, 5 );
297 wxBoxSizer* bPanelFpFilterBoxSizer;
298 bPanelFpFilterBoxSizer =
new wxBoxSizer( wxHORIZONTAL );
300 wxBoxSizer* bFpFilterLeftBoxSizer;
301 bFpFilterLeftBoxSizer =
new wxBoxSizer( wxVERTICAL );
305 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.") );
312 wxBoxSizer* bFpFilterRightBoxSizer;
313 bFpFilterRightBoxSizer =
new wxBoxSizer( wxHORIZONTAL );
326 bFpFilterRightBoxSizer->Add( 20, 0, 0, wxEXPAND, 5 );
334 bFpFilterLeftBoxSizer->Add( bFpFilterRightBoxSizer, 0, 0, 5 );
337 bPanelFpFilterBoxSizer->Add( bFpFilterLeftBoxSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
345 bUpperSizer->Add(
m_NoteBook, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
348 bMainSizer->Add( bUpperSizer, 1, wxEXPAND|wxBOTTOM, 5 );
350 wxBoxSizer* bSizer101;
351 bSizer101 =
new wxBoxSizer( wxHORIZONTAL );
354 bSizer101->Add( 0, 0, 1, wxEXPAND, 5 );
356 m_spiceFieldsButton =
new wxButton(
this, wxID_ANY,
_(
"Edit Simulation Model..."), wxDefaultPosition, wxDefaultSize, 0 );
360 bSizer101->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 15 );
372 bMainSizer->Add( bSizer101, 0, wxEXPAND, 5 );
375 this->SetSizer( bMainSizer );
377 bMainSizer->Fit(
this );
STD_BITMAP_BUTTON * m_editFilterButton
wxCheckBox * m_hasAlternateBodyStyles
virtual void OnEditFootprintFilter(wxCommandEvent &event)
wxButton * m_spiceFieldsButton
DIALOG_LIB_SYMBOL_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=ID_LIBEDIT_NOTEBOOK, const wxString &title=_("Library Symbol Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxTextCtrl * m_KeywordCtrl
virtual void OnFpFilterDClick(wxMouseEvent &event)
virtual void onPowerCheckBox(wxCommandEvent &event)
virtual void OnCheckBox(wxCommandEvent &event)
STD_BITMAP_BUTTON * m_bpAdd
wxStdDialogButtonSizer * m_stdSizerButton
virtual void OnMoveDown(wxCommandEvent &event)
wxButton * m_stdSizerButtonOK
wxBoxSizer * bSizerLowerBasicPanel
STD_BITMAP_BUTTON * m_bpDelete
wxCheckBox * m_PinsNameInsideButt
STD_BITMAP_BUTTON * m_deleteFilterButton
wxListBox * m_FootprintFilterListBox
virtual void OnPageChanging(wxNotebookEvent &event)
virtual void OnSymbolNameText(wxCommandEvent &event)
wxStaticText * m_nameOffsetUnits
wxComboBox * m_inheritanceSelectCombo
wxStaticText * m_staticTextFootprints
wxSpinCtrl * m_SelNumberOfUnits
wxCheckBox * m_ShowPinNumButt
wxCheckBox * m_OptionPower
wxStaticText * m_nameOffsetLabel
wxCheckBox * m_excludeFromBoardCheckBox
virtual void OnMoveUp(wxCommandEvent &event)
STD_BITMAP_BUTTON * m_bpMoveDown
wxButton * m_stdSizerButtonCancel
virtual void OnText(wxCommandEvent &event)
wxStaticText * staticKeywordsLabel
virtual void OnDeleteField(wxCommandEvent &event)
virtual void OnSpinCtrlText(wxCommandEvent &event)
virtual void OnCancelButtonClick(wxCommandEvent &event)
STD_BITMAP_BUTTON * m_addFilterButton
virtual void OnSymbolNameKillFocus(wxFocusEvent &event)
virtual void OnAddField(wxCommandEvent &event)
wxTextCtrl * m_nameOffsetCtrl
wxCheckBox * m_excludeFromBomCheckBox
wxPanel * m_PanelFootprintFilter
~DIALOG_LIB_SYMBOL_PROPERTIES_BASE()
wxStaticText * m_staticTextNbUnits
wxCheckBox * m_OptionPartsInterchangeable
wxCheckBox * m_excludeFromSimCheckBox
virtual void OnAddFootprintFilter(wxCommandEvent &event)
virtual void OnSpinCtrl(wxSpinEvent &event)
virtual void OnCombobox(wxCommandEvent &event)
STD_BITMAP_BUTTON * m_bpMoveUp
virtual void OnEditSpiceModel(wxCommandEvent &event)
wxTextCtrl * m_SymbolNameCtrl
wxStaticText * m_inheritsStaticText
wxCheckBox * m_ShowPinNameButt
virtual void OnSizeGrid(wxSizeEvent &event)
virtual void OnUpdateUI(wxUpdateUIEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
void SetColLabelSize(int aHeight)
Hide wxGrid's SetColLabelSize() method with one which makes sure the size is tall enough for the syst...