15DIALOG_SYMBOL_PROPERTIES_BASE::DIALOG_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* mainSizer;
20 mainSizer =
new wxBoxSizer( wxVERTICAL );
22 m_notebook1 =
new wxNotebook(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
24 wxBoxSizer* generalPageSizer;
25 generalPageSizer =
new wxBoxSizer( wxVERTICAL );
27 wxStaticBoxSizer* sbFields;
28 sbFields =
new wxStaticBoxSizer(
new wxStaticBox(
generalPage, wxID_ANY,
_(
"Fields") ), wxVERTICAL );
30 m_fieldsGrid =
new WX_GRID( sbFields->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
71 m_fieldsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
76 m_fieldsGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
81 m_fieldsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
84 sbFields->Add(
m_fieldsGrid, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
86 wxBoxSizer* bButtonSize;
87 bButtonSize =
new wxBoxSizer( wxHORIZONTAL );
89 m_bpAdd =
new STD_BITMAP_BUTTON( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
90 m_bpAdd->SetToolTip(
_(
"Add field") );
92 bButtonSize->Add(
m_bpAdd, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
94 m_bpMoveUp =
new STD_BITMAP_BUTTON( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
97 bButtonSize->Add(
m_bpMoveUp, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
102 bButtonSize->Add(
m_bpMoveDown, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
105 bButtonSize->Add( 20, 0, 0, wxEXPAND, 10 );
107 m_bpDelete =
new STD_BITMAP_BUTTON( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
110 bButtonSize->Add(
m_bpDelete, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
113 bButtonSize->Add( 0, 0, 1, wxEXPAND, 5 );
116 sbFields->Add( bButtonSize, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
119 generalPageSizer->Add( sbFields, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
121 wxBoxSizer* bLowerSizer;
122 bLowerSizer =
new wxBoxSizer( wxHORIZONTAL );
124 wxStaticBoxSizer* sbGeneralProps;
125 sbGeneralProps =
new wxStaticBoxSizer(
new wxStaticBox(
generalPage, wxID_ANY,
_(
"General") ), wxVERTICAL );
127 wxGridBagSizer* gbSizer1;
128 gbSizer1 =
new wxGridBagSizer( 3, 3 );
129 gbSizer1->SetFlexibleDirection( wxBOTH );
130 gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
131 gbSizer1->SetEmptyCellSize( wxSize( -1,12 ) );
133 m_unitLabel =
new wxStaticText( sbGeneralProps->GetStaticBox(), wxID_ANY,
_(
"Unit:"), wxDefaultPosition, wxDefaultSize, 0 );
135 gbSizer1->Add(
m_unitLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
137 wxArrayString m_unitChoiceChoices;
138 m_unitChoice =
new wxChoice( sbGeneralProps->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_unitChoiceChoices, 0 );
142 gbSizer1->Add(
m_unitChoice, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxLEFT|wxRIGHT, 5 );
144 m_cbAlternateSymbol =
new wxCheckBox( sbGeneralProps->GetStaticBox(), wxID_ANY,
_(
"Alternate symbol (De Morgan)"), wxDefaultPosition, wxDefaultSize, 0 );
145 m_cbAlternateSymbol->SetToolTip(
_(
"Use the alternate shape of this symbol.\nFor gates, this is the \"De Morgan\" conversion") );
147 gbSizer1->Add(
m_cbAlternateSymbol, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 4 );
149 m_orientationLabel =
new wxStaticText( sbGeneralProps->GetStaticBox(), wxID_ANY,
_(
"Angle:"), wxDefaultPosition, wxDefaultSize, 0 );
151 gbSizer1->Add(
m_orientationLabel, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
153 wxString m_orientationCtrlChoices[] = {
_(
"0"),
_(
"+90"),
_(
"-90"),
_(
"180") };
154 int m_orientationCtrlNChoices =
sizeof( m_orientationCtrlChoices ) /
sizeof( wxString );
155 m_orientationCtrl =
new wxChoice( sbGeneralProps->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_orientationCtrlNChoices, m_orientationCtrlChoices, 0 );
157 gbSizer1->Add(
m_orientationCtrl, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxEXPAND, 5 );
159 m_mirrorLabel =
new wxStaticText( sbGeneralProps->GetStaticBox(), wxID_ANY,
_(
"Mirror:"), wxDefaultPosition, wxDefaultSize, 0 );
161 gbSizer1->Add(
m_mirrorLabel, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
163 wxString m_mirrorCtrlChoices[] = {
_(
"Not mirrored"),
_(
"Around X axis"),
_(
"Around Y axis") };
164 int m_mirrorCtrlNChoices =
sizeof( m_mirrorCtrlChoices ) /
sizeof( wxString );
165 m_mirrorCtrl =
new wxChoice( sbGeneralProps->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_mirrorCtrlNChoices, m_mirrorCtrlChoices, 0 );
167 gbSizer1->Add(
m_mirrorCtrl, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxLEFT|wxRIGHT, 5 );
170 gbSizer1->AddGrowableCol( 1 );
172 sbGeneralProps->Add( gbSizer1, 1, wxEXPAND, 5 );
174 wxBoxSizer* bSizer11;
175 bSizer11 =
new wxBoxSizer( wxHORIZONTAL );
177 m_ShowPinNumButt =
new wxCheckBox( sbGeneralProps->GetStaticBox(), wxID_ANY,
_(
"Show pin numbers"), wxDefaultPosition, wxDefaultSize, 0 );
183 m_ShowPinNameButt =
new wxCheckBox( sbGeneralProps->GetStaticBox(), wxID_ANY,
_(
"Show pin names"), wxDefaultPosition, wxDefaultSize, 0 );
190 sbGeneralProps->Add( bSizer11, 0, wxEXPAND|wxTOP, 13 );
193 bLowerSizer->Add( sbGeneralProps, 4, wxEXPAND|wxRIGHT|wxLEFT, 5 );
195 wxBoxSizer* bMiddleCol;
196 bMiddleCol =
new wxBoxSizer( wxVERTICAL );
198 wxStaticBoxSizer* sbAttributes;
199 sbAttributes =
new wxStaticBoxSizer(
new wxStaticBox(
generalPage, wxID_ANY,
_(
"Attributes") ), wxVERTICAL );
201 m_cbExcludeFromSim =
new wxCheckBox( sbAttributes->GetStaticBox(), wxID_ANY,
_(
"Exclude from simulation"), wxDefaultPosition, wxDefaultSize, 0 );
205 sbAttributes->Add( 0, 10, 0, wxEXPAND, 5 );
207 m_cbExcludeFromBom =
new wxCheckBox( sbAttributes->GetStaticBox(), wxID_ANY,
_(
"Exclude from bill of materials"), wxDefaultPosition, wxDefaultSize, 0 );
208 m_cbExcludeFromBom->SetToolTip(
_(
"This is useful for adding symbols for board footprints such as fiducials\nand logos that you do not want to appear in the bill of materials export") );
212 m_cbExcludeFromBoard =
new wxCheckBox( sbAttributes->GetStaticBox(), wxID_ANY,
_(
"Exclude from board"), wxDefaultPosition, wxDefaultSize, 0 );
213 m_cbExcludeFromBoard->SetToolTip(
_(
"This is useful for adding symbols that only get exported to the bill of materials but\nnot required to layout the board such as mechanical fasteners and enclosures") );
217 m_cbDNP =
new wxCheckBox( sbAttributes->GetStaticBox(), wxID_ANY,
_(
"Do not populate"), wxDefaultPosition, wxDefaultSize, 0 );
218 sbAttributes->Add(
m_cbDNP, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
221 bMiddleCol->Add( sbAttributes, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
224 bLowerSizer->Add( bMiddleCol, 3, wxEXPAND|wxRIGHT|wxLEFT, 5 );
226 wxBoxSizer* buttonsSizer;
227 buttonsSizer =
new wxBoxSizer( wxVERTICAL );
239 buttonsSizer->Add( 0, 20, 0, wxEXPAND, 5 );
245 bLowerSizer->Add( buttonsSizer, 3, wxEXPAND|wxALL, 5 );
248 generalPageSizer->Add( bLowerSizer, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
256 wxBoxSizer* pinTableSizer;
257 pinTableSizer =
new wxBoxSizer( wxVERTICAL );
259 wxBoxSizer* bMargins;
260 bMargins =
new wxBoxSizer( wxVERTICAL );
279 m_pinGrid->SetColLabelValue( 0,
_(
"Pin Number") );
280 m_pinGrid->SetColLabelValue( 1,
_(
"Base Pin Name") );
281 m_pinGrid->SetColLabelValue( 2,
_(
"Alternate Assignment") );
282 m_pinGrid->SetColLabelValue( 3,
_(
"Electrical Type") );
283 m_pinGrid->SetColLabelValue( 4,
_(
"Graphic Style") );
285 m_pinGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
290 m_pinGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
295 m_pinGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
296 bMargins->Add(
m_pinGrid, 1, wxEXPAND|wxALL|wxFIXED_MINSIZE, 5 );
299 pinTableSizer->Add( bMargins, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
307 mainSizer->Add(
m_notebook1, 1, wxEXPAND|wxALL, 10 );
309 wxBoxSizer* bSizerBottom;
310 bSizerBottom =
new wxBoxSizer( wxHORIZONTAL );
312 wxBoxSizer* bLibLink;
313 bLibLink =
new wxBoxSizer( wxHORIZONTAL );
316 bSizerBottom->Add( bLibLink, 1, wxLEFT|wxEXPAND, 12 );
318 m_libraryIDLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Library link:"), wxDefaultPosition, wxDefaultSize, 0 );
320 bSizerBottom->Add(
m_libraryIDLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
322 m_tcLibraryID =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxBORDER_NONE );
323 bSizerBottom->Add(
m_tcLibraryID, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
326 bSizerBottom->Add( 10, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
328 m_spiceFieldsButton =
new wxButton(
this, wxID_ANY,
_(
"Simulation Model..."), wxDefaultPosition, wxDefaultSize, 0 );
341 mainSizer->Add( bSizerBottom, 0, wxEXPAND|wxLEFT, 5 );
344 this->SetSizer( mainSizer );
346 mainSizer->Fit(
this );
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
virtual void OnChoice(wxCommandEvent &event)
wxStaticText * m_libraryIDLabel
virtual void onUpdateEditSymbol(wxUpdateUIEvent &event)
virtual void OnEditSpiceModel(wxCommandEvent &event)
wxButton * m_stdDialogButtonSizerCancel
wxCheckBox * m_cbExcludeFromBom
virtual void OnCheckBox(wxCommandEvent &event)
wxChoice * m_orientationCtrl
virtual void OnUpdateUI(wxUpdateUIEvent &event)
wxStdDialogButtonSizer * m_stdDialogButtonSizer
STD_BITMAP_BUTTON * m_bpMoveDown
virtual void OnCancelButtonClick(wxCommandEvent &event)
wxStaticText * m_unitLabel
wxButton * m_editSchematicSymbolBtn
wxStaticText * m_orientationLabel
wxCheckBox * m_cbExcludeFromSim
wxStaticText * m_mirrorLabel
virtual void onUpdateEditLibrarySymbol(wxUpdateUIEvent &event)
STD_BITMAP_BUTTON * m_bpAdd
virtual void OnEditLibrarySymbol(wxCommandEvent &event)
virtual void OnAddField(wxCommandEvent &event)
wxButton * m_changeSymbolBtn
virtual void OnPageChanging(wxNotebookEvent &event)
virtual void OnPinTableCellEdited(wxGridEvent &event)
wxButton * m_editLibrarySymbolBtn
virtual void OnSizePinsGrid(wxSizeEvent &event)
STD_BITMAP_BUTTON * m_bpDelete
wxTextCtrl * m_tcLibraryID
wxButton * m_stdDialogButtonSizerOK
virtual void OnDeleteField(wxCommandEvent &event)
wxCheckBox * m_cbAlternateSymbol
wxButton * m_spiceFieldsButton
wxButton * m_updateSymbolBtn
virtual void OnGridEditorHidden(wxGridEvent &event)
virtual void OnUnitChoice(wxCommandEvent &event)
virtual void OnUpdateSymbol(wxCommandEvent &event)
wxCheckBox * m_cbExcludeFromBoard
virtual void OnMoveUp(wxCommandEvent &event)
virtual void OnGridEditorShown(wxGridEvent &event)
virtual void OnExchangeSymbol(wxCommandEvent &event)
virtual void OnEditSymbol(wxCommandEvent &event)
DIALOG_SYMBOL_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Symbol Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU)
wxCheckBox * m_ShowPinNameButt
virtual void OnMoveDown(wxCommandEvent &event)
~DIALOG_SYMBOL_PROPERTIES_BASE()
wxCheckBox * m_ShowPinNumButt
virtual void OnInitDlg(wxInitDialogEvent &event)
STD_BITMAP_BUTTON * m_bpMoveUp
virtual void OnSizeFieldsGrid(wxSizeEvent &event)
void SetColLabelSize(int aHeight)
Hide wxGrid's SetColLabelSize() method with one which makes sure the size is tall enough for the syst...