16DIALOG_SIM_MODEL_BASE::DIALOG_SIM_MODEL_BASE( wxWindow* parent, wxWindowID
id,
const wxString& title,
const wxPoint& pos,
const wxSize& size,
long style ) :
DIALOG_SHIM( parent, id, title, pos, size, style )
18 this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
20 wxBoxSizer* bSizerMain;
21 bSizerMain =
new wxBoxSizer( wxVERTICAL );
24 m_infoBar->SetShowHideEffects( wxSHOW_EFFECT_NONE, wxSHOW_EFFECT_NONE );
28 bSizerMain->Add(
m_infoBar, 0, wxEXPAND, 5 );
30 m_notebook =
new wxNotebook(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
32 wxBoxSizer* bSizerPanel;
33 bSizerPanel =
new wxBoxSizer( wxVERTICAL );
35 wxBoxSizer* bSizerMargins;
36 bSizerMargins =
new wxBoxSizer( wxVERTICAL );
38 m_rbLibraryModel =
new wxRadioButton(
m_modelPanel, wxID_ANY,
_(
"SPICE model from file (*.lib, *.sub or *.ibs)"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
41 wxGridBagSizer* gbSizer1;
42 gbSizer1 =
new wxGridBagSizer( 3, 5 );
43 gbSizer1->SetFlexibleDirection( wxBOTH );
44 gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
48 gbSizer1->Add(
m_pathLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
51 bSizer7 =
new wxBoxSizer( wxHORIZONTAL );
57 bSizer7->Add(
m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
60 gbSizer1->Add( bSizer7, wxGBPosition( 0, 1 ), wxGBSpan( 1, 2 ), wxEXPAND, 5 );
64 gbSizer1->Add(
m_modelNameLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxTOP, 4 );
67 bSizer9 =
new wxBoxSizer( wxVERTICAL );
80 gbSizer1->Add( bSizer9, wxGBPosition( 1, 1 ), wxGBSpan( 1, 2 ), wxEXPAND, 5 );
83 gbSizer1->Add( 0, 0, wxGBPosition( 1, 3 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
87 gbSizer1->Add(
m_pinLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
89 m_pinCombobox =
new wxComboBox(
m_modelPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxTE_PROCESS_ENTER );
90 gbSizer1->Add(
m_pinCombobox, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxTOP|wxBOTTOM, 2 );
93 gbSizer1->Add(
m_differentialCheckbox, wxGBPosition( 2, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 40 );
97 gbSizer1->Add(
m_pinModelLabel, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
100 gbSizer1->Add(
m_pinModelCombobox, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 1 );
104 gbSizer1->Add(
m_waveformLabel, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
106 wxArrayString m_waveformChoiceChoices;
109 gbSizer1->Add(
m_waveformChoice, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 2 );
112 gbSizer1->AddGrowableCol( 1 );
113 gbSizer1->AddGrowableRow( 1 );
115 bSizerMargins->Add( gbSizer1, 1, wxEXPAND|wxLEFT, 28 );
118 bSizerMargins->Add( 0, 18, 0, wxEXPAND, 5 );
123 wxFlexGridSizer* fgSizer16;
124 fgSizer16 =
new wxFlexGridSizer( 0, 2, 8, 0 );
125 fgSizer16->AddGrowableCol( 1 );
126 fgSizer16->SetFlexibleDirection( wxBOTH );
127 fgSizer16->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
131 fgSizer16->Add(
m_deviceLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
133 wxArrayString m_deviceChoiceChoices;
136 fgSizer16->Add(
m_deviceChoice, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 10 );
142 wxArrayString m_deviceSubtypeChoiceChoices;
148 bSizerMargins->Add( fgSizer16, 0, wxEXPAND|wxLEFT|wxRESERVE_SPACE_EVEN_IF_HIDDEN, 24 );
151 bSizerMargins->Add( 0, 10, 0, wxEXPAND, 5 );
157 wxBoxSizer* bSizer12;
158 bSizer12 =
new wxBoxSizer( wxVERTICAL );
160 m_paramGridMgr =
new wxPropertyGridManager(
m_parametersPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxPGMAN_DEFAULT_STYLE|wxPG_SPLITTER_AUTO_CENTER);
161 m_paramGridMgr->SetExtraStyle( wxPG_EX_MODE_BUTTONS|wxPG_EX_NATIVE_DOUBLE_BUFFERING );
175 bSizer5 =
new wxBoxSizer( wxVERTICAL );
193 m_codePreview->SetFoldFlags( wxSTC_FOLDFLAG_LINEBEFORE_CONTRACTED | wxSTC_FOLDFLAG_LINEAFTER_CONTRACTED );
196 m_codePreview->MarkerDefine( wxSTC_MARKNUM_FOLDER, wxSTC_MARK_BOXPLUS );
197 m_codePreview->MarkerSetBackground( wxSTC_MARKNUM_FOLDER, wxColour( wxT(
"BLACK") ) );
198 m_codePreview->MarkerSetForeground( wxSTC_MARKNUM_FOLDER, wxColour( wxT(
"WHITE") ) );
199 m_codePreview->MarkerDefine( wxSTC_MARKNUM_FOLDEROPEN, wxSTC_MARK_BOXMINUS );
200 m_codePreview->MarkerSetBackground( wxSTC_MARKNUM_FOLDEROPEN, wxColour( wxT(
"BLACK") ) );
201 m_codePreview->MarkerSetForeground( wxSTC_MARKNUM_FOLDEROPEN, wxColour( wxT(
"WHITE") ) );
202 m_codePreview->MarkerDefine( wxSTC_MARKNUM_FOLDERSUB, wxSTC_MARK_EMPTY );
203 m_codePreview->MarkerDefine( wxSTC_MARKNUM_FOLDEREND, wxSTC_MARK_BOXPLUS );
204 m_codePreview->MarkerSetBackground( wxSTC_MARKNUM_FOLDEREND, wxColour( wxT(
"BLACK") ) );
205 m_codePreview->MarkerSetForeground( wxSTC_MARKNUM_FOLDEREND, wxColour( wxT(
"WHITE") ) );
206 m_codePreview->MarkerDefine( wxSTC_MARKNUM_FOLDEROPENMID, wxSTC_MARK_BOXMINUS );
207 m_codePreview->MarkerSetBackground( wxSTC_MARKNUM_FOLDEROPENMID, wxColour( wxT(
"BLACK") ) );
208 m_codePreview->MarkerSetForeground( wxSTC_MARKNUM_FOLDEROPENMID, wxColour( wxT(
"WHITE") ) );
209 m_codePreview->MarkerDefine( wxSTC_MARKNUM_FOLDERMIDTAIL, wxSTC_MARK_EMPTY );
210 m_codePreview->MarkerDefine( wxSTC_MARKNUM_FOLDERTAIL, wxSTC_MARK_EMPTY );
211 m_codePreview->SetSelBackground(
true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) );
212 m_codePreview->SetSelForeground(
true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHTTEXT ) );
227 bSizerMargins->Add( 0, 2, 0, wxEXPAND, 5 );
230 bSizerPanel->Add( bSizerMargins, 1, wxEXPAND, 5 );
238 wxBoxSizer* bSizer10;
239 bSizer10 =
new wxBoxSizer( wxVERTICAL );
280 m_subckt->SetBackSpaceUnIndents(
true );
282 m_subckt->SetViewWhiteSpace(
false );
284 m_subckt->SetIndentationGuides(
true );
286 m_subckt->SetMarginType( 1, wxSTC_MARGIN_SYMBOL );
287 m_subckt->SetMarginMask( 1, wxSTC_MASK_FOLDERS );
289 m_subckt->SetMarginSensitive( 1,
true );
290 m_subckt->SetProperty( wxT(
"fold"), wxT(
"1") );
291 m_subckt->SetFoldFlags( wxSTC_FOLDFLAG_LINEBEFORE_CONTRACTED | wxSTC_FOLDFLAG_LINEAFTER_CONTRACTED );
292 m_subckt->SetMarginType( 0, wxSTC_MARGIN_NUMBER );
293 m_subckt->SetMarginWidth( 0,
m_subckt->TextWidth( wxSTC_STYLE_LINENUMBER, wxT(
"_99999") ) );
294 m_subckt->MarkerDefine( wxSTC_MARKNUM_FOLDER, wxSTC_MARK_BOXPLUS );
295 m_subckt->MarkerSetBackground( wxSTC_MARKNUM_FOLDER, wxColour( wxT(
"BLACK") ) );
296 m_subckt->MarkerSetForeground( wxSTC_MARKNUM_FOLDER, wxColour( wxT(
"WHITE") ) );
297 m_subckt->MarkerDefine( wxSTC_MARKNUM_FOLDEROPEN, wxSTC_MARK_BOXMINUS );
298 m_subckt->MarkerSetBackground( wxSTC_MARKNUM_FOLDEROPEN, wxColour( wxT(
"BLACK") ) );
299 m_subckt->MarkerSetForeground( wxSTC_MARKNUM_FOLDEROPEN, wxColour( wxT(
"WHITE") ) );
300 m_subckt->MarkerDefine( wxSTC_MARKNUM_FOLDERSUB, wxSTC_MARK_EMPTY );
301 m_subckt->MarkerDefine( wxSTC_MARKNUM_FOLDEREND, wxSTC_MARK_BOXPLUS );
302 m_subckt->MarkerSetBackground( wxSTC_MARKNUM_FOLDEREND, wxColour( wxT(
"BLACK") ) );
303 m_subckt->MarkerSetForeground( wxSTC_MARKNUM_FOLDEREND, wxColour( wxT(
"WHITE") ) );
304 m_subckt->MarkerDefine( wxSTC_MARKNUM_FOLDEROPENMID, wxSTC_MARK_BOXMINUS );
305 m_subckt->MarkerSetBackground( wxSTC_MARKNUM_FOLDEROPENMID, wxColour( wxT(
"BLACK") ) );
306 m_subckt->MarkerSetForeground( wxSTC_MARKNUM_FOLDEROPENMID, wxColour( wxT(
"WHITE") ) );
307 m_subckt->MarkerDefine( wxSTC_MARKNUM_FOLDERMIDTAIL, wxSTC_MARK_EMPTY );
308 m_subckt->MarkerDefine( wxSTC_MARKNUM_FOLDERTAIL, wxSTC_MARK_EMPTY );
309 m_subckt->SetSelBackground(
true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) );
310 m_subckt->SetSelForeground(
true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHTTEXT ) );
311 bSizer10->Add(
m_subckt, 1, wxEXPAND | wxALL, 5 );
319 bSizerMain->Add(
m_notebook, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
321 wxBoxSizer* bSizerBottom;
322 bSizerBottom =
new wxBoxSizer( wxHORIZONTAL );
325 bSizerBottom->Add( 30, 0, 1, wxEXPAND, 5 );
334 bSizerBottom->Add(
m_sdbSizer1, 0, wxEXPAND|wxALL, 5 );
337 bSizerMain->Add( bSizerBottom, 0, wxEXPAND|wxTOP|wxLEFT, 5 );
340 this->SetSizer( bSizerMain );
342 bSizerMain->Fit(
this );
344 this->Centre( wxBOTH );
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
virtual void onLibraryPathTextEnter(wxCommandEvent &event)
virtual void onDeviceTypeLabelUpdate(wxUpdateUIEvent &event)
virtual void onModelNameChoice(wxCommandEvent &event)
virtual void onPinAssignmentsGridSize(wxSizeEvent &event)
wxNotebook * m_modelNotebook
virtual void onWaveformChoice(wxCommandEvent &event)
wxStaticText * m_subcktLabel
virtual void onTypeChoice(wxCommandEvent &event)
virtual void onModelNameComboboxKillFocus(wxFocusEvent &event)
virtual void onTypeLabelUpdate(wxUpdateUIEvent &event)
virtual void onDeviceTypeChoiceUpdate(wxUpdateUIEvent &event)
wxStaticText * m_modelNameLabel
wxPropertyGridManager * m_paramGridMgr
wxStaticText * m_pathLabel
wxRadioButton * m_rbBuiltinModel
virtual void onRadioButton(wxCommandEvent &event)
wxStdDialogButtonSizer * m_sdbSizer1
virtual void onOverrideCheckboxUpdate(wxUpdateUIEvent &event)
wxListBox * m_modelListBox
virtual void onLibraryPathTextKillFocus(wxFocusEvent &event)
virtual void onModelNameComboboxUpdate(wxUpdateUIEvent &event)
virtual void onIbisPinLabelUpdate(wxUpdateUIEvent &event)
wxComboBox * m_pinCombobox
virtual void onBrowseButtonUpdate(wxUpdateUIEvent &event)
virtual void onBrowseButtonClick(wxCommandEvent &event)
virtual void onPinModelCombobox(wxCommandEvent &event)
virtual void onLibraryPathLabelUpdate(wxUpdateUIEvent &event)
virtual void onPinAssignmentsGridCellChange(wxGridEvent &event)
DIALOG_SIM_MODEL_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Simulation Model Editor"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void onFilterCharHook(wxKeyEvent &event)
wxChoice * m_deviceSubtypeChoice
virtual void onIbisModelLabelUpdate(wxUpdateUIEvent &event)
wxSearchCtrl * m_modelFilter
wxStaticText * m_waveformLabel
virtual void onLibraryPathText(wxCommandEvent &event)
wxTextCtrl * m_libraryPathText
wxButton * m_sdbSizer1Cancel
virtual void onPageChanging(wxNotebookEvent &event)
wxStaticText * m_pinLabel
virtual void onPinCombobox(wxCommandEvent &event)
virtual void onSizeParamGrid(wxSizeEvent &event)
virtual void onModelNameLabelUpdate(wxUpdateUIEvent &event)
virtual void onDifferentialCheckbox(wxCommandEvent &event)
wxChoice * m_deviceChoice
wxComboBox * m_pinModelCombobox
wxRadioButton * m_rbLibraryModel
virtual void onDeviceTypeChoice(wxCommandEvent &event)
virtual void onModelFilter(wxCommandEvent &event)
wxChoice * m_waveformChoice
wxStaticText * m_deviceLabel
WX_GRID * m_pinAssignmentsGrid
virtual void onPinModelComboboxTextEnter(wxCommandEvent &event)
wxStaticText * m_pinModelLabel
wxPanel * m_parametersPanel
wxStaticText * m_deviceSubtypeLabel
wxCheckBox * m_saveInValueCheckbox
STD_BITMAP_BUTTON * m_browseButton
wxStyledTextCtrl * m_subckt
wxPropertyGridPage * m_paramGrid
virtual void onPinComboboxTextEnter(wxCommandEvent &event)
wxPanel * m_pinAssignmentsPanel
wxCheckBox * m_differentialCheckbox
wxStyledTextCtrl * m_codePreview
void SetColLabelSize(int aHeight)
Hide wxGrid's SetColLabelSize() method with one which makes sure the size is tall enough for the syst...
A modified version of the wxInfoBar class that allows us to: