19DIALOG_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 )
21 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
23 wxBoxSizer* bSizerMain;
24 bSizerMain =
new wxBoxSizer( wxVERTICAL );
27 m_infoBar->SetShowHideEffects( wxSHOW_EFFECT_NONE, wxSHOW_EFFECT_NONE );
28 m_infoBar->SetEffectDuration( 500 );
31 bSizerMain->Add( m_infoBar, 0, wxBOTTOM|wxEXPAND, 5 );
33 wxBoxSizer* bSizerTop;
34 bSizerTop =
new wxBoxSizer( wxVERTICAL );
36 wxFlexGridSizer* fgSizer31;
37 fgSizer31 =
new wxFlexGridSizer( 0, 2, 6, 6 );
38 fgSizer31->AddGrowableCol( 1 );
39 fgSizer31->SetFlexibleDirection( wxBOTH );
40 fgSizer31->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
42 m_staticTextName =
new wxStaticText(
this, wxID_ANY,
_(
"Symbol name:"), wxDefaultPosition, wxDefaultSize, 0 );
43 m_staticTextName->Wrap( -1 );
44 m_staticTextName->SetToolTip(
_(
"The symbol name in library and also the default\nsymbol value when loaded in the schematic.") );
46 fgSizer31->Add( m_staticTextName, 0, wxALIGN_CENTER_VERTICAL, 5 );
48 m_textName =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
49 fgSizer31->Add( m_textName, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
51 m_staticText5 =
new wxStaticText(
this, wxID_ANY,
_(
"Derive from existing symbol:"), wxDefaultPosition, wxDefaultSize, 0 );
52 m_staticText5->Wrap( -1 );
53 fgSizer31->Add( m_staticText5, 0, wxALIGN_CENTER_VERTICAL, 5 );
55 m_comboInheritanceSelect =
new SYMBOL_FILTER_COMBOBOX(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
56 fgSizer31->Add( m_comboInheritanceSelect, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
58 m_staticTextDes =
new wxStaticText(
this, wxID_ANY,
_(
"Default reference designator:"), wxDefaultPosition, wxDefaultSize, 0 );
59 m_staticTextDes->Wrap( -1 );
60 fgSizer31->Add( m_staticTextDes, 0, wxALIGN_CENTER_VERTICAL, 5 );
62 m_textReference =
new wxTextCtrl(
this, wxID_ANY,
_(
"U"), wxDefaultPosition, wxDefaultSize, 0 );
63 fgSizer31->Add( m_textReference, 0, wxEXPAND, 5 );
65 m_staticTextUnits =
new wxStaticText(
this, wxID_ANY,
_(
"Number of units per package:"), wxDefaultPosition, wxDefaultSize, 0 );
66 m_staticTextUnits->Wrap( -1 );
67 fgSizer31->Add( m_staticTextUnits, 0, wxALIGN_CENTER_VERTICAL, 5 );
69 m_spinPartCount =
new wxSpinCtrl(
this, wxID_ANY, wxT(
"1"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 64, 0 );
70 fgSizer31->Add( m_spinPartCount, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
73 bSizerTop->Add( fgSizer31, 1, wxALL|wxEXPAND, 5 );
76 bSizer17 =
new wxBoxSizer( wxVERTICAL );
78 m_checkUnitsInterchangeable =
new wxCheckBox(
this, wxID_ANY,
_(
"All units are interchangeable"), wxDefaultPosition, wxDefaultSize, 0 );
79 m_checkUnitsInterchangeable->SetToolTip(
_(
"Check this option when all symbol units are identical except\nfor pin numbers.") );
81 bSizer17->Add( m_checkUnitsInterchangeable, 0, wxRIGHT|wxLEFT, 5 );
83 m_checkHasAlternateBodyStyle =
new wxCheckBox(
this, wxID_ANY,
_(
"Create symbol with alternate body style (De Morgan)"), wxDefaultPosition, wxDefaultSize, 0 );
84 bSizer17->Add( m_checkHasAlternateBodyStyle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
86 m_checkIsPowerSymbol =
new wxCheckBox(
this, wxID_ANY,
_(
"Create symbol as power symbol"), wxDefaultPosition, wxDefaultSize, 0 );
87 bSizer17->Add( m_checkIsPowerSymbol, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
89 m_excludeFromBomCheckBox =
new wxCheckBox(
this, wxID_ANY,
_(
"Exclude from bill of materials"), wxDefaultPosition, wxDefaultSize, 0 );
90 bSizer17->Add( m_excludeFromBomCheckBox, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
92 m_excludeFromBoardCheckBox =
new wxCheckBox(
this, wxID_ANY,
_(
"Exclude from board"), wxDefaultPosition, wxDefaultSize, 0 );
93 bSizer17->Add( m_excludeFromBoardCheckBox, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
95 m_checkKeepDatasheet =
new wxCheckBox(
this, wxID_ANY,
_(
"Keep linked datasheet"), wxDefaultPosition, wxDefaultSize, 0 );
96 bSizer17->Add( m_checkKeepDatasheet, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
98 m_checkKeepFootprint =
new wxCheckBox(
this, wxID_ANY,
_(
"Keep linked footprint"), wxDefaultPosition, wxDefaultSize, 0 );
99 bSizer17->Add( m_checkKeepFootprint, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
101 m_checkTransferUserFields =
new wxCheckBox(
this, wxID_ANY,
_(
"Transfer user-defined fields"), wxDefaultPosition, wxDefaultSize, 0 );
102 bSizer17->Add( m_checkTransferUserFields, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
104 m_checkKeepContentUserFields =
new wxCheckBox(
this, wxID_ANY,
_(
"Keep content of user-defined fields"), wxDefaultPosition, wxDefaultSize, 0 );
105 bSizer17->Add( m_checkKeepContentUserFields, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
108 bSizerTop->Add( bSizer17, 0, wxBOTTOM|wxEXPAND, 5 );
111 bSizerMain->Add( bSizerTop, 0, wxALL|wxEXPAND, 5 );
113 wxBoxSizer* bSizerBottom;
114 bSizerBottom =
new wxBoxSizer( wxVERTICAL );
116 wxFlexGridSizer* fgSizer4;
117 fgSizer4 =
new wxFlexGridSizer( 0, 3, 6, 6 );
118 fgSizer4->AddGrowableCol( 1 );
119 fgSizer4->SetFlexibleDirection( wxBOTH );
120 fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
122 m_staticPinTextPositionLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Pin name position offset:"), wxDefaultPosition, wxDefaultSize, 0 );
123 m_staticPinTextPositionLabel->Wrap( -1 );
124 fgSizer4->Add( m_staticPinTextPositionLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
126 m_textPinTextPosition =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
127 fgSizer4->Add( m_textPinTextPosition, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
129 m_staticPinTextPositionUnits =
new wxStaticText(
this, wxID_ANY,
_(
"mils"), wxDefaultPosition, wxDefaultSize, 0 );
130 m_staticPinTextPositionUnits->Wrap( -1 );
131 fgSizer4->Add( m_staticPinTextPositionUnits, 0, wxALIGN_CENTER_VERTICAL, 5 );
134 bSizerBottom->Add( fgSizer4, 0, wxALL|wxEXPAND, 5 );
136 wxBoxSizer* bSizer19;
137 bSizer19 =
new wxBoxSizer( wxVERTICAL );
139 m_checkShowPinNumber =
new wxCheckBox(
this, wxID_ANY,
_(
"Show pin number text"), wxDefaultPosition, wxDefaultSize, 0 );
140 m_checkShowPinNumber->SetValue(
true);
141 bSizer19->Add( m_checkShowPinNumber, 0, wxRIGHT|wxLEFT, 5 );
143 m_checkShowPinName =
new wxCheckBox(
this, wxID_ANY,
_(
"Show pin name text"), wxDefaultPosition, wxDefaultSize, 0 );
144 m_checkShowPinName->SetValue(
true);
145 bSizer19->Add( m_checkShowPinName, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
147 m_checkShowPinNameInside =
new wxCheckBox(
this, wxID_ANY,
_(
"Pin name inside"), wxDefaultPosition, wxDefaultSize, 0 );
148 m_checkShowPinNameInside->SetValue(
true);
149 bSizer19->Add( m_checkShowPinNameInside, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
152 bSizerBottom->Add( bSizer19, 0, wxEXPAND, 5 );
155 bSizerMain->Add( bSizerBottom, 1, wxALL|wxEXPAND, 5 );
157 m_sdbSizer =
new wxStdDialogButtonSizer();
158 m_sdbSizerOK =
new wxButton(
this, wxID_OK );
159 m_sdbSizer->AddButton( m_sdbSizerOK );
160 m_sdbSizerCancel =
new wxButton(
this, wxID_CANCEL );
161 m_sdbSizer->AddButton( m_sdbSizerCancel );
162 m_sdbSizer->Realize();
164 bSizerMain->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
167 this->SetSizer( bSizerMain );
169 bSizerMain->Fit(
this );
171 this->Centre( wxBOTH );
Class DIALOG_LIB_NEW_SYMBOL_BASE.
~DIALOG_LIB_NEW_SYMBOL_BASE()
void _wxFB_onPowerCheckBox(wxCommandEvent &event)
void _wxFB_onCheckTransferUserFields(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: