KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_sim_model_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9#include "widgets/wx_grid.h"
10#include "widgets/wx_infobar.h"
11
13
15
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 )
17{
18 this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
19
20 wxBoxSizer* bSizerMain;
21 bSizerMain = new wxBoxSizer( wxVERTICAL );
22
23 m_infoBar = new WX_INFOBAR( this );
24 m_infoBar->SetShowHideEffects( wxSHOW_EFFECT_NONE, wxSHOW_EFFECT_NONE );
25 m_infoBar->SetEffectDuration( 500 );
26 m_infoBar->Hide();
27
28 bSizerMain->Add( m_infoBar, 0, wxEXPAND, 5 );
29
30 m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
31 m_modelPanel = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
32 wxBoxSizer* bSizerPanel;
33 bSizerPanel = new wxBoxSizer( wxVERTICAL );
34
35 wxBoxSizer* bSizerMargins;
36 bSizerMargins = new wxBoxSizer( wxVERTICAL );
37
38 m_rbLibraryModel = new wxRadioButton( m_modelPanel, wxID_ANY, _("SPICE model from file (*.lib, *.sub or *.ibs)"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
39 bSizerMargins->Add( m_rbLibraryModel, 0, wxLEFT, 5 );
40
41 wxGridBagSizer* gbSizer1;
42 gbSizer1 = new wxGridBagSizer( 3, 5 );
43 gbSizer1->SetFlexibleDirection( wxBOTH );
44 gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
45
46 m_pathLabel = new wxStaticText( m_modelPanel, wxID_ANY, _("File:"), wxDefaultPosition, wxDefaultSize, 0 );
47 m_pathLabel->Wrap( -1 );
48 gbSizer1->Add( m_pathLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
49
50 wxBoxSizer* bSizer7;
51 bSizer7 = new wxBoxSizer( wxHORIZONTAL );
52
53 m_libraryPathText = new wxTextCtrl( m_modelPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
54 bSizer7->Add( m_libraryPathText, 1, wxALIGN_CENTER_VERTICAL, 3 );
55
56 m_browseButton = new STD_BITMAP_BUTTON( m_modelPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
57 bSizer7->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
58
59
60 gbSizer1->Add( bSizer7, wxGBPosition( 0, 1 ), wxGBSpan( 1, 2 ), wxEXPAND, 5 );
61
62 m_modelNameLabel = new wxStaticText( m_modelPanel, wxID_ANY, _("Model:"), wxDefaultPosition, wxDefaultSize, 0 );
63 m_modelNameLabel->Wrap( -1 );
64 gbSizer1->Add( m_modelNameLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxTOP, 4 );
65
66 wxBoxSizer* bSizer9;
67 bSizer9 = new wxBoxSizer( wxVERTICAL );
68
69 m_modelFilter = new wxSearchCtrl( m_modelPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
70 #ifndef __WXMAC__
71 m_modelFilter->ShowSearchButton( true );
72 #endif
73 m_modelFilter->ShowCancelButton( false );
74 bSizer9->Add( m_modelFilter, 0, wxEXPAND|wxRIGHT, 5 );
75
76 m_modelListBox = new wxListBox( m_modelPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
77 bSizer9->Add( m_modelListBox, 1, wxEXPAND|wxRIGHT, 5 );
78
79
80 gbSizer1->Add( bSizer9, wxGBPosition( 1, 1 ), wxGBSpan( 1, 2 ), wxEXPAND, 5 );
81
82
83 gbSizer1->Add( 0, 0, wxGBPosition( 1, 3 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
84
85 m_pinLabel = new wxStaticText( m_modelPanel, wxID_ANY, _("Pin:"), wxDefaultPosition, wxDefaultSize, 0 );
86 m_pinLabel->Wrap( -1 );
87 gbSizer1->Add( m_pinLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
88
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 );
91
92 m_differentialCheckbox = new wxCheckBox( m_modelPanel, wxID_ANY, _("Differential"), wxDefaultPosition, wxDefaultSize, 0 );
93 gbSizer1->Add( m_differentialCheckbox, wxGBPosition( 2, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 40 );
94
95 m_pinModelLabel = new wxStaticText( m_modelPanel, wxID_ANY, _("Pin model:"), wxDefaultPosition, wxDefaultSize, 0 );
96 m_pinModelLabel->Wrap( -1 );
97 gbSizer1->Add( m_pinModelLabel, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
98
99 m_pinModelCombobox = new wxComboBox( m_modelPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxTE_PROCESS_ENTER );
100 gbSizer1->Add( m_pinModelCombobox, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 1 );
101
102 m_waveformLabel = new wxStaticText( m_modelPanel, wxID_ANY, _("Waveform:"), wxDefaultPosition, wxDefaultSize, 0 );
103 m_waveformLabel->Wrap( -1 );
104 gbSizer1->Add( m_waveformLabel, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
105
106 wxArrayString m_waveformChoiceChoices;
107 m_waveformChoice = new wxChoice( m_modelPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_waveformChoiceChoices, 0 );
108 m_waveformChoice->SetSelection( 0 );
109 gbSizer1->Add( m_waveformChoice, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 2 );
110
111
112 gbSizer1->AddGrowableCol( 1 );
113 gbSizer1->AddGrowableRow( 1 );
114
115 bSizerMargins->Add( gbSizer1, 1, wxEXPAND|wxLEFT, 28 );
116
117
118 bSizerMargins->Add( 0, 18, 0, wxEXPAND, 5 );
119
120 m_rbBuiltinModel = new wxRadioButton( m_modelPanel, wxID_ANY, _("Built-in SPICE model"), wxDefaultPosition, wxDefaultSize, 0 );
121 bSizerMargins->Add( m_rbBuiltinModel, 0, wxBOTTOM|wxLEFT, 5 );
122
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 );
128
129 m_deviceLabel = new wxStaticText( m_modelPanel, wxID_ANY, _("Device:"), wxDefaultPosition, wxDefaultSize, 0 );
130 m_deviceLabel->Wrap( -1 );
131 fgSizer16->Add( m_deviceLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
132
133 wxArrayString m_deviceChoiceChoices;
134 m_deviceChoice = new wxChoice( m_modelPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_deviceChoiceChoices, 0 );
135 m_deviceChoice->SetSelection( 0 );
136 fgSizer16->Add( m_deviceChoice, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 10 );
137
138 m_deviceSubtypeLabel = new wxStaticText( m_modelPanel, wxID_ANY, _("Device type:"), wxDefaultPosition, wxDefaultSize, 0 );
139 m_deviceSubtypeLabel->Wrap( -1 );
140 fgSizer16->Add( m_deviceSubtypeLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
141
142 wxArrayString m_deviceSubtypeChoiceChoices;
143 m_deviceSubtypeChoice = new wxChoice( m_modelPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_deviceSubtypeChoiceChoices, 0 );
144 m_deviceSubtypeChoice->SetSelection( 0 );
145 fgSizer16->Add( m_deviceSubtypeChoice, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 10 );
146
147
148 bSizerMargins->Add( fgSizer16, 0, wxEXPAND|wxLEFT|wxRESERVE_SPACE_EVEN_IF_HIDDEN, 24 );
149
150
151 bSizerMargins->Add( 0, 10, 0, wxEXPAND, 5 );
152
153 m_modelNotebook = new wxNotebook( m_modelPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
154 m_parametersPanel = new wxPanel( m_modelNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
155 m_parametersPanel->SetMinSize( wxSize( 500,-1 ) );
156
157 wxBoxSizer* bSizer12;
158 bSizer12 = new wxBoxSizer( wxVERTICAL );
159
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 );
162 m_paramGridMgr->SetMinSize( wxSize( 500,-1 ) );
163
164
165 m_paramGrid = m_paramGridMgr->AddPage( _("Page"), wxNullBitmap );
166 bSizer12->Add( m_paramGridMgr, 1, wxALL|wxEXPAND, 5 );
167
168
169 m_parametersPanel->SetSizer( bSizer12 );
170 m_parametersPanel->Layout();
171 bSizer12->Fit( m_parametersPanel );
172 m_modelNotebook->AddPage( m_parametersPanel, _("Parameters"), true );
173 m_codePanel = new wxPanel( m_modelNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
174 wxBoxSizer* bSizer5;
175 bSizer5 = new wxBoxSizer( wxVERTICAL );
176
177 m_codePreview = new wxStyledTextCtrl( m_codePanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, wxEmptyString );
178 m_codePreview->SetUseTabs( true );
179 m_codePreview->SetTabWidth( 4 );
180 m_codePreview->SetIndent( 4 );
181 m_codePreview->SetTabIndents( true );
182 m_codePreview->SetBackSpaceUnIndents( true );
183 m_codePreview->SetViewEOL( false );
184 m_codePreview->SetViewWhiteSpace( false );
185 m_codePreview->SetMarginWidth( 2, 0 );
186 m_codePreview->SetIndentationGuides( true );
187 m_codePreview->SetReadOnly( false );
188 m_codePreview->SetMarginType( 1, wxSTC_MARGIN_SYMBOL );
189 m_codePreview->SetMarginMask( 1, wxSTC_MASK_FOLDERS );
190 m_codePreview->SetMarginWidth( 1, 16);
191 m_codePreview->SetMarginSensitive( 1, true );
192 m_codePreview->SetProperty( wxT("fold"), wxT("1") );
193 m_codePreview->SetFoldFlags( wxSTC_FOLDFLAG_LINEBEFORE_CONTRACTED | wxSTC_FOLDFLAG_LINEAFTER_CONTRACTED );
194 m_codePreview->SetMarginType( 0, wxSTC_MARGIN_NUMBER );
195 m_codePreview->SetMarginWidth( 0, m_codePreview->TextWidth( wxSTC_STYLE_LINENUMBER, wxT("_99999") ) );
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 ) );
213 bSizer5->Add( m_codePreview, 1, wxEXPAND | wxALL, 5 );
214
215
216 m_codePanel->SetSizer( bSizer5 );
217 m_codePanel->Layout();
218 bSizer5->Fit( m_codePanel );
219 m_modelNotebook->AddPage( m_codePanel, _("Code"), false );
220
221 bSizerMargins->Add( m_modelNotebook, 1, wxEXPAND|wxALL, 5 );
222
223 m_saveInValueCheckbox = new wxCheckBox( m_modelPanel, wxID_ANY, _("Save {} in Value field as \"{}\""), wxDefaultPosition, wxDefaultSize, 0 );
224 bSizerMargins->Add( m_saveInValueCheckbox, 0, wxALL, 6 );
225
226
227 bSizerMargins->Add( 0, 2, 0, wxEXPAND, 5 );
228
229
230 bSizerPanel->Add( bSizerMargins, 1, wxEXPAND, 5 );
231
232
233 m_modelPanel->SetSizer( bSizerPanel );
234 m_modelPanel->Layout();
235 bSizerPanel->Fit( m_modelPanel );
236 m_notebook->AddPage( m_modelPanel, _("Model"), true );
237 m_pinAssignmentsPanel = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
238 wxBoxSizer* bSizer10;
239 bSizer10 = new wxBoxSizer( wxVERTICAL );
240
241 m_pinAssignmentsGrid = new WX_GRID( m_pinAssignmentsPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
242
243 // Grid
244 m_pinAssignmentsGrid->CreateGrid( 0, 2 );
245 m_pinAssignmentsGrid->EnableEditing( true );
246 m_pinAssignmentsGrid->EnableGridLines( true );
247 m_pinAssignmentsGrid->EnableDragGridSize( false );
248 m_pinAssignmentsGrid->SetMargins( 0, 0 );
249
250 // Columns
251 m_pinAssignmentsGrid->SetColSize( 0, 160 );
252 m_pinAssignmentsGrid->SetColSize( 1, 160 );
253 m_pinAssignmentsGrid->EnableDragColMove( false );
254 m_pinAssignmentsGrid->EnableDragColSize( true );
255 m_pinAssignmentsGrid->SetColLabelValue( 0, _("Symbol Pin") );
256 m_pinAssignmentsGrid->SetColLabelValue( 1, _("Model Pin") );
258 m_pinAssignmentsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
259
260 // Rows
261 m_pinAssignmentsGrid->EnableDragRowSize( false );
262 m_pinAssignmentsGrid->SetRowLabelSize( 0 );
263 m_pinAssignmentsGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
264
265 // Label Appearance
266
267 // Cell Defaults
268 m_pinAssignmentsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
269 bSizer10->Add( m_pinAssignmentsGrid, 1, wxALL|wxEXPAND, 5 );
270
271 m_subcktLabel = new wxStaticText( m_pinAssignmentsPanel, wxID_ANY, _("Reference"), wxDefaultPosition, wxDefaultSize, 0 );
272 m_subcktLabel->Wrap( -1 );
273 bSizer10->Add( m_subcktLabel, 0, wxTOP|wxRIGHT|wxLEFT, 8 );
274
275 m_subckt = new wxStyledTextCtrl( m_pinAssignmentsPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, wxEmptyString );
276 m_subckt->SetUseTabs( true );
277 m_subckt->SetTabWidth( 4 );
278 m_subckt->SetIndent( 4 );
279 m_subckt->SetTabIndents( true );
280 m_subckt->SetBackSpaceUnIndents( true );
281 m_subckt->SetViewEOL( false );
282 m_subckt->SetViewWhiteSpace( false );
283 m_subckt->SetMarginWidth( 2, 0 );
284 m_subckt->SetIndentationGuides( true );
285 m_subckt->SetReadOnly( false );
286 m_subckt->SetMarginType( 1, wxSTC_MARGIN_SYMBOL );
287 m_subckt->SetMarginMask( 1, wxSTC_MASK_FOLDERS );
288 m_subckt->SetMarginWidth( 1, 16);
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 );
312
313
314 m_pinAssignmentsPanel->SetSizer( bSizer10 );
315 m_pinAssignmentsPanel->Layout();
316 bSizer10->Fit( m_pinAssignmentsPanel );
317 m_notebook->AddPage( m_pinAssignmentsPanel, _("Pin Assignments"), false );
318
319 bSizerMain->Add( m_notebook, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
320
321 wxBoxSizer* bSizerBottom;
322 bSizerBottom = new wxBoxSizer( wxHORIZONTAL );
323
324
325 bSizerBottom->Add( 30, 0, 1, wxEXPAND, 5 );
326
327 m_sdbSizer1 = new wxStdDialogButtonSizer();
328 m_sdbSizer1OK = new wxButton( this, wxID_OK );
329 m_sdbSizer1->AddButton( m_sdbSizer1OK );
330 m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
331 m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
332 m_sdbSizer1->Realize();
333
334 bSizerBottom->Add( m_sdbSizer1, 0, wxEXPAND|wxALL, 5 );
335
336
337 bSizerMain->Add( bSizerBottom, 0, wxEXPAND|wxTOP|wxLEFT, 5 );
338
339
340 this->SetSizer( bSizerMain );
341 this->Layout();
342 bSizerMain->Fit( this );
343
344 this->Centre( wxBOTH );
345
346 // Connect Events
347 m_rbLibraryModel->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onRadioButton ), NULL, this );
348 m_pathLabel->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onLibraryPathLabelUpdate ), NULL, this );
349 m_libraryPathText->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_SIM_MODEL_BASE::onLibraryPathTextKillFocus ), NULL, this );
350 m_libraryPathText->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onLibraryPathText ), NULL, this );
351 m_libraryPathText->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onLibraryPathTextEnter ), NULL, this );
352 m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onBrowseButtonClick ), NULL, this );
353 m_browseButton->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onBrowseButtonUpdate ), NULL, this );
354 m_modelNameLabel->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onModelNameLabelUpdate ), NULL, this );
355 m_modelFilter->Connect( wxEVT_CHAR_HOOK, wxKeyEventHandler( DIALOG_SIM_MODEL_BASE::onFilterCharHook ), NULL, this );
356 m_modelFilter->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onModelFilter ), NULL, this );
357 m_modelListBox->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onModelNameChoice ), NULL, this );
358 m_pinLabel->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onIbisPinLabelUpdate ), NULL, this );
359 m_pinCombobox->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onPinCombobox ), NULL, this );
360 m_pinCombobox->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_SIM_MODEL_BASE::onModelNameComboboxKillFocus ), NULL, this );
361 m_pinCombobox->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onPinComboboxTextEnter ), NULL, this );
362 m_pinCombobox->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onModelNameComboboxUpdate ), NULL, this );
363 m_differentialCheckbox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onDifferentialCheckbox ), NULL, this );
364 m_differentialCheckbox->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onOverrideCheckboxUpdate ), NULL, this );
365 m_pinModelLabel->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onIbisModelLabelUpdate ), NULL, this );
366 m_pinModelCombobox->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onPinModelCombobox ), NULL, this );
367 m_pinModelCombobox->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_SIM_MODEL_BASE::onModelNameComboboxKillFocus ), NULL, this );
368 m_pinModelCombobox->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onPinModelComboboxTextEnter ), NULL, this );
369 m_pinModelCombobox->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onModelNameComboboxUpdate ), NULL, this );
370 m_waveformChoice->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onWaveformChoice ), NULL, this );
371 m_rbBuiltinModel->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onRadioButton ), NULL, this );
372 m_deviceLabel->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onDeviceTypeLabelUpdate ), NULL, this );
373 m_deviceChoice->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onDeviceTypeChoice ), NULL, this );
374 m_deviceChoice->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onDeviceTypeChoiceUpdate ), NULL, this );
375 m_deviceSubtypeLabel->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onTypeLabelUpdate ), NULL, this );
376 m_deviceSubtypeChoice->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onTypeChoice ), NULL, this );
377 m_modelNotebook->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, wxNotebookEventHandler( DIALOG_SIM_MODEL_BASE::onPageChanging ), NULL, this );
378 m_paramGridMgr->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_SIM_MODEL_BASE::onSizeParamGrid ), NULL, this );
379 m_pinAssignmentsGrid->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_SIM_MODEL_BASE::onPinAssignmentsGridCellChange ), NULL, this );
380 m_pinAssignmentsGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_SIM_MODEL_BASE::onPinAssignmentsGridSize ), NULL, this );
381}
382
384{
385 // Disconnect Events
386 m_rbLibraryModel->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onRadioButton ), NULL, this );
387 m_pathLabel->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onLibraryPathLabelUpdate ), NULL, this );
388 m_libraryPathText->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_SIM_MODEL_BASE::onLibraryPathTextKillFocus ), NULL, this );
389 m_libraryPathText->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onLibraryPathText ), NULL, this );
390 m_libraryPathText->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onLibraryPathTextEnter ), NULL, this );
391 m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onBrowseButtonClick ), NULL, this );
392 m_browseButton->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onBrowseButtonUpdate ), NULL, this );
393 m_modelNameLabel->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onModelNameLabelUpdate ), NULL, this );
394 m_modelFilter->Disconnect( wxEVT_CHAR_HOOK, wxKeyEventHandler( DIALOG_SIM_MODEL_BASE::onFilterCharHook ), NULL, this );
395 m_modelFilter->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onModelFilter ), NULL, this );
396 m_modelListBox->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onModelNameChoice ), NULL, this );
397 m_pinLabel->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onIbisPinLabelUpdate ), NULL, this );
398 m_pinCombobox->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onPinCombobox ), NULL, this );
399 m_pinCombobox->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_SIM_MODEL_BASE::onModelNameComboboxKillFocus ), NULL, this );
400 m_pinCombobox->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onPinComboboxTextEnter ), NULL, this );
401 m_pinCombobox->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onModelNameComboboxUpdate ), NULL, this );
402 m_differentialCheckbox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onDifferentialCheckbox ), NULL, this );
403 m_differentialCheckbox->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onOverrideCheckboxUpdate ), NULL, this );
404 m_pinModelLabel->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onIbisModelLabelUpdate ), NULL, this );
405 m_pinModelCombobox->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onPinModelCombobox ), NULL, this );
406 m_pinModelCombobox->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_SIM_MODEL_BASE::onModelNameComboboxKillFocus ), NULL, this );
407 m_pinModelCombobox->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onPinModelComboboxTextEnter ), NULL, this );
408 m_pinModelCombobox->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onModelNameComboboxUpdate ), NULL, this );
409 m_waveformChoice->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onWaveformChoice ), NULL, this );
410 m_rbBuiltinModel->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onRadioButton ), NULL, this );
411 m_deviceLabel->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onDeviceTypeLabelUpdate ), NULL, this );
412 m_deviceChoice->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onDeviceTypeChoice ), NULL, this );
413 m_deviceChoice->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onDeviceTypeChoiceUpdate ), NULL, this );
414 m_deviceSubtypeLabel->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onTypeLabelUpdate ), NULL, this );
415 m_deviceSubtypeChoice->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onTypeChoice ), NULL, this );
416 m_modelNotebook->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, wxNotebookEventHandler( DIALOG_SIM_MODEL_BASE::onPageChanging ), NULL, this );
417 m_paramGridMgr->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_SIM_MODEL_BASE::onSizeParamGrid ), NULL, this );
418 m_pinAssignmentsGrid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_SIM_MODEL_BASE::onPinAssignmentsGridCellChange ), NULL, this );
419 m_pinAssignmentsGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_SIM_MODEL_BASE::onPinAssignmentsGridSize ), NULL, this );
420
421}
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:88
virtual void onLibraryPathTextEnter(wxCommandEvent &event)
virtual void onDeviceTypeLabelUpdate(wxUpdateUIEvent &event)
virtual void onModelNameChoice(wxCommandEvent &event)
virtual void onPinAssignmentsGridSize(wxSizeEvent &event)
virtual void onWaveformChoice(wxCommandEvent &event)
virtual void onTypeChoice(wxCommandEvent &event)
virtual void onModelNameComboboxKillFocus(wxFocusEvent &event)
virtual void onTypeLabelUpdate(wxUpdateUIEvent &event)
virtual void onDeviceTypeChoiceUpdate(wxUpdateUIEvent &event)
wxPropertyGridManager * m_paramGridMgr
wxRadioButton * m_rbBuiltinModel
virtual void onRadioButton(wxCommandEvent &event)
wxStdDialogButtonSizer * m_sdbSizer1
virtual void onOverrideCheckboxUpdate(wxUpdateUIEvent &event)
virtual void onLibraryPathTextKillFocus(wxFocusEvent &event)
virtual void onModelNameComboboxUpdate(wxUpdateUIEvent &event)
virtual void onIbisPinLabelUpdate(wxUpdateUIEvent &event)
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)
virtual void onIbisModelLabelUpdate(wxUpdateUIEvent &event)
virtual void onLibraryPathText(wxCommandEvent &event)
virtual void onPageChanging(wxNotebookEvent &event)
virtual void onPinCombobox(wxCommandEvent &event)
virtual void onSizeParamGrid(wxSizeEvent &event)
virtual void onModelNameLabelUpdate(wxUpdateUIEvent &event)
virtual void onDifferentialCheckbox(wxCommandEvent &event)
wxRadioButton * m_rbLibraryModel
virtual void onDeviceTypeChoice(wxCommandEvent &event)
virtual void onModelFilter(wxCommandEvent &event)
virtual void onPinModelComboboxTextEnter(wxCommandEvent &event)
wxStaticText * m_deviceSubtypeLabel
STD_BITMAP_BUTTON * m_browseButton
wxStyledTextCtrl * m_subckt
wxPropertyGridPage * m_paramGrid
virtual void onPinComboboxTextEnter(wxCommandEvent &event)
wxStyledTextCtrl * m_codePreview
A bitmap button widget that behaves like a standard dialog button except with an icon.
void SetColLabelSize(int aHeight)
Hide wxGrid's SetColLabelSize() method with one which makes sure the size is tall enough for the syst...
Definition: wx_grid.cpp:249
A modified version of the wxInfoBar class that allows us to:
Definition: wx_infobar.h:76
#define _(s)