18DIALOG_LIB_NEW_SYMBOL_BASE::
DIALOG_LIB_NEW_SYMBOL_BASE( wxWindow* parent, wxWindowID
id, const wxString& title, const wxPoint& pos, const wxSize& size,
long style ) :
DIALOG_SHIM( parent,
id, title, pos, size, style )
20 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
22 wxBoxSizer* bSizerMain;
23 bSizerMain =
new wxBoxSizer( wxVERTICAL );
26 m_infoBar->SetShowHideEffects( wxSHOW_EFFECT_NONE, wxSHOW_EFFECT_NONE );
27 m_infoBar->SetEffectDuration( 500 );
30 bSizerMain->Add( m_infoBar, 0, wxBOTTOM|wxEXPAND, 5 );
32 wxBoxSizer* bSizerTop;
33 bSizerTop =
new wxBoxSizer( wxVERTICAL );
35 wxFlexGridSizer* fgSizer31;
36 fgSizer31 =
new wxFlexGridSizer( 0, 2, 6, 6 );
37 fgSizer31->AddGrowableCol( 1 );
38 fgSizer31->SetFlexibleDirection( wxBOTH );
39 fgSizer31->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
41 m_staticTextName =
new wxStaticText(
this, wxID_ANY,
_(
"Symbol name:"), wxDefaultPosition, wxDefaultSize, 0 );
42 m_staticTextName->Wrap( -1 );
43 m_staticTextName->SetToolTip(
_(
"The symbol name in library and also the default\nsymbol value when loaded in the schematic.") );
45 fgSizer31->Add( m_staticTextName, 0, wxALIGN_CENTER_VERTICAL, 5 );
47 m_textName =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
48 fgSizer31->Add( m_textName, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
50 m_staticText5 =
new wxStaticText(
this, wxID_ANY,
_(
"Derive from existing symbol:"), wxDefaultPosition, wxDefaultSize, 0 );
51 m_staticText5->Wrap( -1 );
52 fgSizer31->Add( m_staticText5, 0, wxALIGN_CENTER_VERTICAL, 5 );
54 m_comboInheritanceSelect =
new SYMBOL_FILTER_COMBOBOX(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
55 fgSizer31->Add( m_comboInheritanceSelect, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
57 m_staticTextDes =
new wxStaticText(
this, wxID_ANY,
_(
"Default reference designator:"), wxDefaultPosition, wxDefaultSize, 0 );
58 m_staticTextDes->Wrap( -1 );
59 fgSizer31->Add( m_staticTextDes, 0, wxALIGN_CENTER_VERTICAL, 5 );
61 m_textReference =
new wxTextCtrl(
this, wxID_ANY,
_(
"U"), wxDefaultPosition, wxDefaultSize, 0 );
62 fgSizer31->Add( m_textReference, 0, wxEXPAND, 5 );
64 m_staticTextUnits =
new wxStaticText(
this, wxID_ANY,
_(
"Number of units per package:"), wxDefaultPosition, wxDefaultSize, 0 );
65 m_staticTextUnits->Wrap( -1 );
66 fgSizer31->Add( m_staticTextUnits, 0, wxALIGN_CENTER_VERTICAL, 5 );
68 m_spinPartCount =
new wxSpinCtrl(
this, wxID_ANY, wxT(
"1"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 64, 0 );
69 fgSizer31->Add( m_spinPartCount, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
72 bSizerTop->Add( fgSizer31, 1, wxALL|wxEXPAND, 5 );
75 bSizer17 =
new wxBoxSizer( wxVERTICAL );
77 m_checkUnitsInterchangeable =
new wxCheckBox(
this, wxID_ANY,
_(
"All units are interchangeable"), wxDefaultPosition, wxDefaultSize, 0 );
78 m_checkUnitsInterchangeable->SetToolTip(
_(
"Check this option when all symbol units are identical except\nfor pin numbers.") );
80 bSizer17->Add( m_checkUnitsInterchangeable, 0, wxRIGHT|wxLEFT, 5 );
82 m_checkHasAlternateBodyStyle =
new wxCheckBox(
this, wxID_ANY,
_(
"Create symbol with alternate body style (De Morgan)"), wxDefaultPosition, wxDefaultSize, 0 );
83 bSizer17->Add( m_checkHasAlternateBodyStyle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
85 m_checkIsPowerSymbol =
new wxCheckBox(
this, wxID_ANY,
_(
"Create symbol as power symbol"), wxDefaultPosition, wxDefaultSize, 0 );
86 bSizer17->Add( m_checkIsPowerSymbol, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
88 m_excludeFromBomCheckBox =
new wxCheckBox(
this, wxID_ANY,
_(
"Exclude from bill of materials"), wxDefaultPosition, wxDefaultSize, 0 );
89 bSizer17->Add( m_excludeFromBomCheckBox, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
91 m_excludeFromBoardCheckBox =
new wxCheckBox(
this, wxID_ANY,
_(
"Exclude from board"), wxDefaultPosition, wxDefaultSize, 0 );
92 bSizer17->Add( m_excludeFromBoardCheckBox, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
95 bSizerTop->Add( bSizer17, 0, wxBOTTOM|wxEXPAND, 5 );
98 bSizerMain->Add( bSizerTop, 0, wxALL|wxEXPAND, 5 );
100 wxBoxSizer* bSizerBottom;
101 bSizerBottom =
new wxBoxSizer( wxVERTICAL );
103 wxFlexGridSizer* fgSizer4;
104 fgSizer4 =
new wxFlexGridSizer( 0, 3, 6, 6 );
105 fgSizer4->AddGrowableCol( 1 );
106 fgSizer4->SetFlexibleDirection( wxBOTH );
107 fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
109 m_staticPinTextPositionLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Pin name position offset:"), wxDefaultPosition, wxDefaultSize, 0 );
110 m_staticPinTextPositionLabel->Wrap( -1 );
111 fgSizer4->Add( m_staticPinTextPositionLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
113 m_textPinTextPosition =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
114 fgSizer4->Add( m_textPinTextPosition, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
116 m_staticPinTextPositionUnits =
new wxStaticText(
this, wxID_ANY,
_(
"mils"), wxDefaultPosition, wxDefaultSize, 0 );
117 m_staticPinTextPositionUnits->Wrap( -1 );
118 fgSizer4->Add( m_staticPinTextPositionUnits, 0, wxALIGN_CENTER_VERTICAL, 5 );
121 bSizerBottom->Add( fgSizer4, 0, wxALL|wxEXPAND, 5 );
123 wxBoxSizer* bSizer19;
124 bSizer19 =
new wxBoxSizer( wxVERTICAL );
126 m_checkShowPinNumber =
new wxCheckBox(
this, wxID_ANY,
_(
"Show pin number text"), wxDefaultPosition, wxDefaultSize, 0 );
127 m_checkShowPinNumber->SetValue(
true);
128 bSizer19->Add( m_checkShowPinNumber, 0, wxRIGHT|wxLEFT, 5 );
130 m_checkShowPinName =
new wxCheckBox(
this, wxID_ANY,
_(
"Show pin name text"), wxDefaultPosition, wxDefaultSize, 0 );
131 m_checkShowPinName->SetValue(
true);
132 bSizer19->Add( m_checkShowPinName, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
134 m_checkShowPinNameInside =
new wxCheckBox(
this, wxID_ANY,
_(
"Pin name inside"), wxDefaultPosition, wxDefaultSize, 0 );
135 m_checkShowPinNameInside->SetValue(
true);
136 bSizer19->Add( m_checkShowPinNameInside, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
139 bSizerBottom->Add( bSizer19, 0, wxEXPAND, 5 );
142 bSizerMain->Add( bSizerBottom, 1, wxALL|wxEXPAND, 5 );
144 m_sdbSizer =
new wxStdDialogButtonSizer();
145 m_sdbSizerOK =
new wxButton(
this, wxID_OK );
146 m_sdbSizer->AddButton( m_sdbSizerOK );
147 m_sdbSizerCancel =
new wxButton(
this, wxID_CANCEL );
148 m_sdbSizer->AddButton( m_sdbSizerCancel );
149 m_sdbSizer->Realize();
151 bSizerMain->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
154 this->SetSizer( bSizerMain );
156 bSizerMain->Fit(
this );
158 this->Centre( wxBOTH );
Class DIALOG_LIB_NEW_SYMBOL_BASE.
~DIALOG_LIB_NEW_SYMBOL_BASE()
void _wxFB_onPowerCheckBox(wxCommandEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
A modified version of the wxInfoBar class that allows us to: