KiCad PCB EDA Suite
dialog_sim_command.cpp
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2016-2022 CERN
5 * Copyright (C) 2016-2022 KiCad Developers, see AUTHORS.txt for contributors.
6 * @author Maciej Suminski <[email protected]>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 3
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, you may find one here:
20 * https://www.gnu.org/licenses/gpl-3.0.html
21 * or you may search the http://www.gnu.org website for the version 3 license,
22 * or you may write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24 */
25
26#include "dialog_sim_command.h"
28#include <sim/ngspice.h>
29
30#include <confirm.h>
31
32#include <wx/tokenzr.h>
33
34#include <vector>
35#include <utility>
36
38//so there are a few tabs missing (e.g. pole-zero, distortion, sensitivity)
39
40// Helper function to shorten conditions
41static bool empty( const wxTextEntryBase* aCtrl )
42{
43 return aCtrl->GetValue().IsEmpty();
44}
45
46
47static void setStringSelection( wxChoice* aCtrl, const wxString& aStr )
48{
49 aCtrl->SetSelection( aCtrl->FindString( aStr ) );
50}
51
52
53static wxString getStringSelection( const wxChoice* aCtrl )
54{
55 return aCtrl->GetString( aCtrl->GetSelection() );
56}
57
58
60 std::shared_ptr<NGSPICE_CIRCUIT_MODEL> aCircuitModel,
61 std::shared_ptr<SPICE_SIMULATOR_SETTINGS>& aSettings ) :
62 DIALOG_SIM_COMMAND_BASE( aParent ),
63 m_circuitModel( aCircuitModel ),
64 m_settings( aSettings ),
65 m_spiceEmptyValidator( true )
66{
67 m_posIntValidator.SetMin( 1 );
68
69 m_acPointsNumber->SetValidator( m_posIntValidator );
70 m_acFreqStart->SetValidator( m_spiceValidator );
71 m_acFreqStop->SetValidator( m_spiceValidator );
72
73 m_dcStart1->SetValidator( m_spiceValidator );
74 m_dcStop1->SetValidator( m_spiceValidator );
75 m_dcIncr1->SetValidator( m_spiceValidator );
76
77 m_dcStart2->SetValidator( m_spiceValidator );
78 m_dcStop2->SetValidator( m_spiceValidator );
79 m_dcIncr2->SetValidator( m_spiceValidator );
80
82 m_noiseFreqStart->SetValidator( m_spiceValidator );
83 m_noiseFreqStop->SetValidator( m_spiceValidator );
84
85 m_transStep->SetValidator( m_spiceValidator );
86 m_transFinal->SetValidator( m_spiceValidator );
88
90
91 // Hide pages that aren't fully implemented yet
92 // wxPanel::Hide() isn't enough on some platforms
93 m_simPages->RemovePage( m_simPages->FindPage( m_pgDistortion ) );
94 m_simPages->RemovePage( m_simPages->FindPage( m_pgNoise ) );
95 m_simPages->RemovePage( m_simPages->FindPage( m_pgPoleZero ) );
96 m_simPages->RemovePage( m_simPages->FindPage( m_pgSensitivity ) );
97 m_simPages->RemovePage( m_simPages->FindPage( m_pgTransferFunction ) );
98
99 if( !dynamic_cast<NGSPICE_SIMULATOR_SETTINGS*>( aSettings.get() ) )
100 m_compatibilityMode->Show( false );
101
103}
104
105wxString DIALOG_SIM_COMMAND::evaluateDCControls( wxChoice* aDcSource, wxTextCtrl* aDcStart,
106 wxTextCtrl* aDcStop, wxTextCtrl* aDcIncr )
107{
108 wxString dcSource;
109 wxWindow* ctrlWithError = nullptr;
110
111 if( aDcSource->GetSelection() >= 0 )
112 dcSource = aDcSource->GetString( aDcSource->GetSelection() );
113
114 if( dcSource.IsEmpty() )
115 {
116 DisplayError( this, _( "You need to select DC source" ) );
117 ctrlWithError = aDcSource;
118 }
120 // hence try..catch below
121 else if( !aDcStart->Validate() )
122 ctrlWithError = aDcStart;
123 else if( !aDcStop->Validate() )
124 ctrlWithError = aDcStop;
125 else if( !aDcIncr->Validate() )
126 ctrlWithError = aDcIncr;
127
128 if( ctrlWithError )
129 {
130 ctrlWithError->SetFocus();
131 return wxEmptyString;
132 }
133
134 try
135 {
136 // pick device name from exporter when something different than temperature is selected
137 if( dcSource.Cmp( "TEMP" ) )
138 dcSource = m_circuitModel->GetItemName( std::string( dcSource.ToUTF8() ) );
139
140 return wxString::Format( "%s %s %s %s", dcSource,
141 SPICE_VALUE( aDcStart->GetValue() ).ToSpiceString(),
142 SPICE_VALUE( aDcStop->GetValue() ).ToSpiceString(),
143 SPICE_VALUE( aDcIncr->GetValue() ).ToSpiceString() );
144 }
145 catch( std::exception& e )
146 {
147 DisplayError( this, e.what() );
148 return wxEmptyString;
149 }
150 catch( const KI_PARAM_ERROR& e )
151 {
152 DisplayError( this, e.What() );
153 return wxEmptyString;
154 }
155 catch( ... )
156 {
157 return wxEmptyString;
158 }
159}
160
161
163{
164 if( !wxDialog::TransferDataFromWindow() )
165 return false;
166
167 // The simulator dependent settings always get transferred.
168 NGSPICE_SIMULATOR_SETTINGS* ngspiceSettings =
169 dynamic_cast<NGSPICE_SIMULATOR_SETTINGS*>( m_settings.get() );
170
171 if( ngspiceSettings )
172 {
173 switch( m_compatibilityModeChoice->GetSelection() )
174 {
175 case 0: ngspiceSettings->SetModelMode( NGSPICE_MODEL_MODE::USER_CONFIG ); break;
176 case 1: ngspiceSettings->SetModelMode( NGSPICE_MODEL_MODE::NGSPICE ); break;
177 case 2: ngspiceSettings->SetModelMode( NGSPICE_MODEL_MODE::PSPICE ); break;
178 case 3: ngspiceSettings->SetModelMode( NGSPICE_MODEL_MODE::LTSPICE ); break;
179 case 4: ngspiceSettings->SetModelMode( NGSPICE_MODEL_MODE::LT_PSPICE ); break;
180 case 5: ngspiceSettings->SetModelMode( NGSPICE_MODEL_MODE::HSPICE ); break;
181 }
182 }
183
184 wxString previousSimCommand = m_simCommand;
185 wxWindow* page = m_simPages->GetCurrentPage();
186
187 if( page == m_pgAC ) // AC analysis
188 {
189 if( !m_pgAC->Validate() )
190 return false;
191
192 m_simCommand.Printf( ".ac %s %s %s %s",
193 scaleToString( m_acScale->GetSelection() ),
194 m_acPointsNumber->GetValue(),
195 SPICE_VALUE( m_acFreqStart->GetValue() ).ToSpiceString(),
196 SPICE_VALUE( m_acFreqStop->GetValue() ).ToSpiceString() );
197 }
198 else if( page == m_pgDC ) // DC transfer analysis
199 {
200 wxString simCmd = wxString( ".dc " );
201
203
204 if( src1.IsEmpty() )
205 return false;
206 else
207 simCmd += src1;
208
209 if( m_dcEnable2->IsChecked() )
210 {
212
213 if( src2.IsEmpty() )
214 return false;
215 else
216 simCmd += " " + src2;
217
218 if( m_dcSource1->GetStringSelection() == m_dcSource2->GetStringSelection() )
219 {
220 DisplayError( this, _( "Source 1 and Source 2 must be different" ) );
221 return false;
222 }
223 }
224
225 m_simCommand = simCmd;
226 }
227 else if( page == m_pgNoise ) // Noise analysis
228 {
229 /*const std::map<wxString, int>& netMap = m_circuitModel->GetNetIndexMap();
230
231 if( empty( m_noiseMeas ) || empty( m_noiseSrc ) || empty( m_noisePointsNumber )
232 || empty( m_noiseFreqStart ) || empty( m_noiseFreqStop ) )
233 {
234 return false;
235 }
236
237 wxString ref;
238
239 if( !empty( m_noiseRef ) )
240 ref = wxString::Format( ", %d", netMap.at( m_noiseRef->GetValue() ) );
241
242 wxString noiseSource = m_circuitModel->GetSpiceDevice( m_noiseSrc->GetValue() );
243
244 // Add voltage source prefix if needed
245 if( noiseSource[0] != 'v' && noiseSource[0] != 'V' )
246 noiseSource += 'v' + noiseSource;
247
248 m_simCommand.Printf( ".noise v(%d%s) %s %s %s %s %s",
249 netMap.at( m_noiseMeas->GetValue() ), ref,
250 noiseSource, scaleToString( m_noiseScale->GetSelection() ),
251 m_noisePointsNumber->GetValue(),
252 SPICE_VALUE( m_noiseFreqStart->GetValue() ).ToSpiceString(),
253 SPICE_VALUE( m_noiseFreqStop->GetValue() ).ToSpiceString() );*/
254 }
255 else if( page == m_pgOP ) // DC operating point analysis
256 {
257 m_simCommand = wxString( ".op" );
258 }
259 else if( page == m_pgTransient ) // Transient analysis
260 {
261 if( !m_pgTransient->Validate() )
262 return false;
263
264 wxString initial;
265
266 if( !empty( m_transInitial ) )
267 initial = SPICE_VALUE( m_transInitial->GetValue() ).ToSpiceString();
268
269 m_simCommand.Printf( ".tran %s %s %s",
270 SPICE_VALUE( m_transStep->GetValue() ).ToSpiceString(),
271 SPICE_VALUE( m_transFinal->GetValue() ).ToSpiceString(),
272 initial );
273 }
274 else if( page == m_pgCustom ) // Custom directives
275 {
276 m_simCommand = m_customTxt->GetValue();
277 }
278 else
279 {
280 if( m_simCommand.IsEmpty() )
281 {
282 KIDIALOG dlg( this, _( "No valid simulation is configured." ), _( "Warning" ),
283 wxOK | wxCANCEL | wxICON_EXCLAMATION | wxCENTER );
284
285 dlg.SetExtendedMessage( _( "A valid simulation can be configured by selecting a "
286 "simulation tab, setting the simulation parameters and "
287 "clicking the OK button with the tab selected." ) );
289 wxMessageDialog::ButtonLabel( _( "Exit Without Valid Simulation" ) ),
290 wxMessageDialog::ButtonLabel( _( "Configure Valid Simulation" ) ) );
291 dlg.DoNotShowCheckbox( __FILE__, __LINE__ );
292
293 if( dlg.ShowModal() == wxID_OK )
294 return true;
295 }
296
297 return false;
298 }
299
300 if( previousSimCommand != m_simCommand )
301 m_simCommand.Trim();
302
303 m_settings->SetFixIncludePaths( m_fixIncludePaths->GetValue() );
304
305 return true;
306}
307
308
310{
312 if( empty( m_customTxt ) )
314
315 m_fixIncludePaths->SetValue( m_settings->GetFixIncludePaths() );
316
317 NGSPICE_SIMULATOR_SETTINGS* ngspiceSettings =
318 dynamic_cast<NGSPICE_SIMULATOR_SETTINGS*>( m_settings.get() );
319
320 if( ngspiceSettings )
321 {
322 switch( ngspiceSettings->GetModelMode() )
323 {
324 case NGSPICE_MODEL_MODE::USER_CONFIG: m_compatibilityModeChoice->SetSelection( 0 ); break;
325 case NGSPICE_MODEL_MODE::NGSPICE: m_compatibilityModeChoice->SetSelection( 1 ); break;
326 case NGSPICE_MODEL_MODE::PSPICE: m_compatibilityModeChoice->SetSelection( 2 ); break;
327 case NGSPICE_MODEL_MODE::LTSPICE: m_compatibilityModeChoice->SetSelection( 3 ); break;
328 case NGSPICE_MODEL_MODE::LT_PSPICE: m_compatibilityModeChoice->SetSelection( 4 ); break;
329 case NGSPICE_MODEL_MODE::HSPICE: m_compatibilityModeChoice->SetSelection( 5 ); break;
330 default:
331 wxFAIL_MSG( wxString::Format( "Unknown NGSPICE_MODEL_MODE %d.",
332 ngspiceSettings->GetModelMode() ) );
333 break;
334 }
335 }
336
337 if( !m_dcSource1->GetCount() )
338 {
339 wxChar type1 = getStringSelection( m_dcSourceType1 ).Upper().GetChar( 0 );
341 }
342
343 if( !m_dcSource2->GetCount() )
344 {
345 wxChar type2 = getStringSelection( m_dcSourceType2 ).Upper().GetChar( 0 );
347 }
348
349 if( m_simCommand.IsEmpty() && !empty( m_customTxt ) )
350 return parseCommand( m_customTxt->GetValue() );
351
352 return true;
353}
354
355
357{
358 // Fill out comboboxes that allows one to select nets
359 // Map comoboxes to their current values
360 std::map<wxComboBox*, wxString> cmbNet = {
361 { m_noiseMeas, m_noiseMeas->GetStringSelection() },
362 { m_noiseRef, m_noiseRef->GetStringSelection() }
363 };
364
365 for( const std::pair<wxComboBox* const, wxString>& c : cmbNet )
366 c.first->Clear();
367
368 for( const std::string& net : m_circuitModel->GetNets() )
369 {
370 for( const std::pair<wxComboBox* const, wxString>& c : cmbNet )
371 c.first->Append( net );
372 }
373
374 // Try to restore the previous selection, if possible
375 for( const std::pair<wxComboBox* const, wxString>& c : cmbNet )
376 {
377 int idx = c.first->FindString( c.second );
378
379 if( idx != wxNOT_FOUND )
380 c.first->SetSelection( idx );
381 }
382
383 return DIALOG_SIM_COMMAND_BASE::ShowModal();
384}
385
386
387void DIALOG_SIM_COMMAND::updateDCSources( wxChar aType, wxChoice* aSource )
388{
389 wxString prevSelection;
390
391 if( !aSource->IsEmpty() )
392 prevSelection = aSource->GetString( aSource->GetSelection() );
393
394 std::set<wxString> sourcesList;
395 bool enableSrcSelection = true;
396
397 if( aType != 'T' )
398 {
399 for( const SPICE_ITEM& item : m_circuitModel->GetItems() )
400 {
401 if( ( aType == 'R' && item.model->GetDeviceType() == SIM_MODEL::DEVICE_T::R )
402 || ( aType == 'V' && item.model->GetDeviceType() == SIM_MODEL::DEVICE_T::V )
403 || ( aType == 'I' && item.model->GetDeviceType() == SIM_MODEL::DEVICE_T::I ) )
404 {
405 sourcesList.insert( item.refName );
406 }
407 }
408
409 if( aSource == m_dcSource2 && !m_dcEnable2->IsChecked() )
410 enableSrcSelection = false;
411 }
412 else
413 {
414 prevSelection = wxT( "TEMP" );
415 sourcesList.insert( prevSelection );
416 enableSrcSelection = false;
417 }
418
419 aSource->Enable( enableSrcSelection );
420
421 aSource->Clear();
422
423 for( const wxString& src : sourcesList )
424 aSource->Append( src );
425
426 // Try to restore the previous selection, if possible
427 aSource->SetStringSelection( prevSelection );
428}
429
430
431bool DIALOG_SIM_COMMAND::parseCommand( const wxString& aCommand )
432{
433 if( aCommand.IsEmpty() )
434 return false;
435
436 wxStringTokenizer tokenizer( aCommand, " " );
437 wxString tkn = tokenizer.GetNextToken().Lower();
438
439 try
440 {
441 if( tkn == ".ac" )
442 {
443 m_simPages->SetSelection( m_simPages->FindPage( m_pgAC ) );
444
445 tkn = tokenizer.GetNextToken().Lower();
446
447 if( tkn == "dec" )
448 m_acScale->SetSelection( 0 );
449 else if( tkn == "oct" )
450 m_acScale->SetSelection( 1 );
451 else if( tkn == "lin" )
452 m_acScale->SetSelection( 2 );
453 else
454 return false;
455
456 // If the fields below are empty, it will be caught by the exception handler
457 m_acPointsNumber->SetValue( tokenizer.GetNextToken() );
458 m_acFreqStart->SetValue( SPICE_VALUE( tokenizer.GetNextToken() ).ToSpiceString() );
459 m_acFreqStop->SetValue( SPICE_VALUE( tokenizer.GetNextToken() ).ToSpiceString() );
460 }
461 else if( tkn == ".dc" )
462 {
463 m_simPages->SetSelection( m_simPages->FindPage( m_pgDC ) );
464
465 SPICE_DC_PARAMS src1, src2;
466 src2.m_vincrement = SPICE_VALUE( -1 );
467
468 if( !m_circuitModel->ParseDCCommand( aCommand, &src1, &src2 ) )
469 return false;
470
471 if( src1.m_source.IsSameAs( wxT( "TEMP" ), false ) )
472 setStringSelection( m_dcSourceType1, wxT( "TEMP" ) );
473 else
474 setStringSelection( m_dcSourceType1, src1.m_source.GetChar( 0 ) );
475
476 updateDCSources( src1.m_source.GetChar( 0 ), m_dcSource1 );
477 m_dcSource1->SetStringSelection( src1.m_source );
478 m_dcStart1->SetValue( src1.m_vstart.ToSpiceString() );
479 m_dcStop1->SetValue( src1.m_vend.ToSpiceString() );
480 m_dcIncr1->SetValue( src1.m_vincrement.ToSpiceString() );
481
482 if( src2.m_vincrement.ToDouble() != -1 )
483 {
484 if( src2.m_source.IsSameAs( wxT( "TEMP" ), false ) )
485 setStringSelection( m_dcSourceType2, wxT( "TEMP" ) );
486 else
487 setStringSelection( m_dcSourceType2, src2.m_source.GetChar( 0 ) );
488
489 updateDCSources( src2.m_source.GetChar( 0 ), m_dcSource2 );
490 m_dcSource2->SetStringSelection( src2.m_source );
491 m_dcStart2->SetValue( src2.m_vstart.ToSpiceString() );
492 m_dcStop2->SetValue( src2.m_vend.ToSpiceString() );
493 m_dcIncr2->SetValue( src2.m_vincrement.ToSpiceString() );
494
495 m_dcEnable2->SetValue( true );
496 }
497
499 }
500 else if( tkn == ".tran" )
501 {
502 m_simPages->SetSelection( m_simPages->FindPage( m_pgTransient ) );
503
504 // If the fields below are empty, it will be caught by the exception handler
505 m_transStep->SetValue( SPICE_VALUE( tokenizer.GetNextToken() ).ToSpiceString() );
506 m_transFinal->SetValue( SPICE_VALUE( tokenizer.GetNextToken() ).ToSpiceString() );
507
508 // Initial time is an optional field
509 tkn = tokenizer.GetNextToken();
510
511 if( !tkn.IsEmpty() )
512 m_transInitial->SetValue( SPICE_VALUE( tkn ).ToSpiceString() );
513 }
514 else if( tkn == ".op" )
515 {
516 m_simPages->SetSelection( m_simPages->FindPage( m_pgOP ) );
517 }
518 else if( !empty( m_customTxt ) ) // Custom directives
519 {
520 m_simPages->SetSelection( m_simPages->FindPage( m_pgCustom ) );
521 }
522 }
523 catch( ... )
524 {
525 // Nothing really bad has happened
526 return false;
527 }
528
529 return true;
530}
531
532
533void DIALOG_SIM_COMMAND::onSwapDCSources( wxCommandEvent& event )
534{
535 std::vector<std::pair<wxTextEntry*, wxTextEntry*>> textCtrl = { { m_dcStart1, m_dcStart2 },
536 { m_dcStop1, m_dcStop2 },
537 { m_dcIncr1, m_dcIncr2 } };
538
539 for( auto& couple : textCtrl )
540 {
541 wxString tmp = couple.first->GetValue();
542 couple.first->SetValue( couple.second->GetValue() );
543 couple.second->SetValue( tmp );
544 }
545
546 int src1 = m_dcSource1->GetSelection();
547 int src2 = m_dcSource2->GetSelection();
548
549 int sel = m_dcSourceType1->GetSelection();
550 m_dcSourceType1->SetSelection( m_dcSourceType2->GetSelection() );
551 m_dcSourceType2->SetSelection( sel );
552
553 wxChar type1 = getStringSelection( m_dcSourceType1 ).Upper().GetChar( 0 );
555 wxChar type2 = getStringSelection( m_dcSourceType2 ).Upper().GetChar( 0 );
557
558 m_dcSource1->SetSelection( src2 );
559 m_dcSource2->SetSelection( src1 );
560
563}
564
565
567{
568 bool is2ndSrcEnabled = m_dcEnable2->IsChecked();
569 wxChar type = getStringSelection( m_dcSourceType2 ).Upper().GetChar( 0 );
570
571 m_dcSourceType2->Enable( is2ndSrcEnabled );
572 m_dcSource2->Enable( is2ndSrcEnabled && type != 'T' );
573 m_dcStart2->Enable( is2ndSrcEnabled );
574 m_dcStop2->Enable( is2ndSrcEnabled );
575 m_dcIncr2->Enable( is2ndSrcEnabled );
576}
577
578
579void DIALOG_SIM_COMMAND::updateDCUnits( wxChar aType, wxChoice* aSource,
580 wxStaticText* aStartValUnit, wxStaticText* aEndValUnit,
581 wxStaticText* aStepUnit )
582{
583 wxString unit;
584
585 switch( aType )
586 {
587 case 'V': unit = _( "Volts" ); break;
588 case 'I': unit = _( "Amperes" ); break;
589 case 'R': unit = _( "Ohms" ); break;
590 case 'T': unit = wxT( "\u00B0C" ); break;
591 }
592
593 aStartValUnit->SetLabel( unit );
594 aEndValUnit->SetLabel( unit );
595 aStepUnit->SetLabel( unit );
596
597 m_pgDC->Refresh();
598}
599
600
602{
603 if( m_circuitModel )
604 m_customTxt->SetValue( m_circuitModel->GetSchTextSimCommand() );
605}
606
607
void SetupStandardButtons(std::map< int, wxString > aLabels={})
Class DIALOG_SIM_COMMAND_BASE.
wxString evaluateDCControls(wxChoice *aDcSource, wxTextCtrl *aDcStart, wxTextCtrl *aDcStop, wxTextCtrl *aDcIncr)
Read values from one DC sweep source to form a part of simulation command.
void onSwapDCSources(wxCommandEvent &event) override
static wxString scaleToString(int aOption)
std::shared_ptr< NGSPICE_CIRCUIT_MODEL > m_circuitModel
wxIntegerValidator< int > m_posIntValidator
bool TransferDataFromWindow() override
std::shared_ptr< SPICE_SIMULATOR_SETTINGS > m_settings
void updateDCSources(wxChar aType, wxChoice *aSource)
Update DC sweep source with symbols from schematic.
DIALOG_SIM_COMMAND(wxWindow *aParent, std::shared_ptr< NGSPICE_CIRCUIT_MODEL > aCircuitModel, std::shared_ptr< SPICE_SIMULATOR_SETTINGS > &aSettings)
SPICE_VALIDATOR m_spiceValidator
void onDCEnableSecondSource(wxCommandEvent &event) override
bool TransferDataToWindow() override
void updateDCUnits(wxChar aType, wxChoice *aSource, wxStaticText *aStartValUnit, wxStaticText *aEndValUnit, wxStaticText *aStepUnit)
Update units on labels depending on selected source.
bool parseCommand(const wxString &aCommand)
Parse a Spice directive.
SPICE_VALIDATOR m_spiceEmptyValidator
Helper class to create more flexible dialogs, including 'do not show again' checkbox handling.
Definition: confirm.h:46
void DoNotShowCheckbox(wxString file, int line)
Checks the 'do not show again' setting for the dialog.
Definition: confirm.cpp:76
bool SetOKCancelLabels(const ButtonLabel &ok, const ButtonLabel &cancel) override
Shows the 'do not show again' checkbox.
Definition: confirm.h:56
int ShowModal() override
Definition: confirm.cpp:120
Hold a translatable error message and may be used when throwing exceptions containing a translated er...
Definition: ki_exception.h:45
Container for Ngspice simulator settings.
void SetModelMode(NGSPICE_MODEL_MODE aMode)
NGSPICE_MODEL_MODE GetModelMode() const
Helper class to recognize Spice formatted values.
Definition: spice_value.h:56
wxString ToSpiceString() const
Return string value in Spice format (e.g.
double ToDouble() const
void DisplayError(wxWindow *aParent, const wxString &aText, int aDisplayTime)
Display an error or warning message box with aMessage.
Definition: confirm.cpp:300
This file is part of the common library.
static void setStringSelection(wxChoice *aCtrl, const wxString &aStr)
static wxString getStringSelection(const wxChoice *aCtrl)
static bool empty(const wxTextEntryBase *aCtrl)
#define _(s)
#define I(x, y, z)
Definition: md5_hash.cpp:18
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200