DlgNgsCfgOPT.hpp
5.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
//**************************************************************************************************
// DlgNgsCfgOPT.hpp *
// ------------------ *
// Description : This dialogue is used to enter values associated with the NG-Spice OPTIONS *
// command. *
// Started : 2006-03-03 *
// Last Update : 2016-11-10 *
// Copyright : (C) 2006-2016 MSWaters *
//**************************************************************************************************
//**************************************************************************************************
// *
// This program is free software; you can redistribute it and/or modify it under the *
// terms of the GNU General Public License as published by the Free Software Foundation; *
// either version 3 of the License, or (at your option) any later version. *
// *
//**************************************************************************************************
#ifndef DLGNGSCFGOPT_HPP
#define DLGNGSCFGOPT_HPP
// Application Includes
#include "TypeDefs.hpp"
#include "Config.hpp"
#include "utility/PnlValue.hpp"
#include "utility/PnlLblCho.hpp"
#include "ngspice/commands/CmdNgSpiceOPT.hpp"
#include "base/NbkSimEngBase.hpp"
// wxWidgets Includes
#include <wx/tokenzr.h>
//**************************************************************************************************
class DlgNgsCfgOPT : public wxDialog
{
private :
// Value panel controls (for float values)
PnlValue m_oPnlABSTOL;
PnlValue m_oPnlCHGTOL;
PnlValue m_oPnlCONVABSS;
PnlValue m_oPnlCONVSTEP;
PnlValue m_oPnlDEFL;
PnlValue m_oPnlDEFW;
PnlValue m_oPnlDEFAD;
PnlValue m_oPnlDEFAS;
PnlValue m_oPnlGMIN;
PnlValue m_oPnlPIVREL;
PnlValue m_oPnlPIVTOL;
PnlValue m_oPnlRAMPTIME;
PnlValue m_oPnlRELTOL;
PnlValue m_oPnlRSERIES;
PnlValue m_oPnlRSHUNT;
PnlValue m_oPnlTEMP;
PnlValue m_oPnlTNOM;
PnlValue m_oPnlTRTOL;
PnlValue m_oPnlVNTOL;
// Value panel controls (for integer values)
PnlValue m_oPnlGMINSTEP;
PnlValue m_oPnlITL1;
PnlValue m_oPnlITL2;
PnlValue m_oPnlITL3;
PnlValue m_oPnlITL4;
PnlValue m_oPnlITL5;
PnlValue m_oPnlITL6;
PnlValue m_oPnlMAXEVIT;
PnlValue m_oPnlMAXOPALT;
PnlValue m_oPnlMAXORD;
PnlValue m_oPnlMAXWARNS;
PnlValue m_oPnlSRCSTEPS;
// Value panel controls (for string values)
PnlLblCho m_oChoMETHOD;
// Value panel controls (for boolean values)
wxCheckBox m_oCbxBADMOS3;
wxCheckBox m_oCbxINTERP;
wxCheckBox m_oCbxNOOPAC;
wxCheckBox m_oCbxNOOPALT;
wxCheckBox m_oCbxOPTS;
wxCheckBox m_oCbxTRYTOCOM;
wxCheckBox m_oCbxWARN;
// Button controls
wxButton m_oBtnOk;
wxButton m_oBtnCancel;
wxButton m_oBtnDefaults;
// Storage for validated OPTION values
CmdNgSpiceOPT m_oCmdOPT;
// Object initialization functions
void Initialize( void );
void Create ( void );
void ToolTips ( void );
void DoLayout ( void );
PnlValue * poGetPanel( int iPnlID );
void SetValues( CmdNgSpiceOPT & roCmdOPT );
void GetValues( CmdNgSpiceOPT & roCmdOPT );
public :
DlgNgsCfgOPT( wxWindow * poWin );
~DlgNgsCfgOPT( );
bool bClear( void );
bool bSetValues( CmdNgSpiceOPT & roCmdOPT );
bool bGetValues( CmdNgSpiceOPT & roCmdOPT );
bool bSetValue( int iPnlID, const wxString & rosValue );
const wxString & rosGetValue( int iPnlID );
// Event handlers
void OnBtnOk ( wxCommandEvent & roEvtCmd );
void OnBtnDefaults( wxCommandEvent & roEvtCmd );
void OnBtnCancel ( wxCommandEvent & roEvtCmd );
// In order to be able to react to a menu command, it must be given a
// unique identifier such as a const or an enum.
enum eDlgItemID
{
ID_PNL_ABSTOL = 0,
ID_PNL_CHGTOL ,
ID_PNL_CONVABSS,
ID_PNL_CONVSTEP,
ID_PNL_DEFL ,
ID_PNL_DEFW ,
ID_PNL_DEFAD ,
ID_PNL_DEFAS ,
ID_PNL_GMIN ,
ID_PNL_GMINSTEP,
ID_PNL_ITL1 ,
ID_PNL_ITL2 ,
ID_PNL_ITL3 ,
ID_PNL_ITL4 ,
ID_PNL_ITL5 ,
ID_PNL_ITL6 ,
ID_PNL_MAXEVIT ,
ID_PNL_MAXOPALT,
ID_PNL_MAXORD ,
ID_PNL_MAXWARNS,
ID_PNL_PIVREL ,
ID_PNL_PIVTOL ,
ID_PNL_RAMPTIME,
ID_PNL_RELTOL ,
ID_PNL_RSERIES ,
ID_PNL_RSHUNT ,
ID_PNL_SRCSTEPS,
ID_PNL_TEMP ,
ID_PNL_TNOM ,
ID_PNL_TRTOL ,
ID_PNL_VNTOL ,
ID_CHO_METHOD ,
ID_CBX_BADMOS3 ,
ID_CBX_INTERP ,
ID_CBX_NOOPAC ,
ID_CBX_NOOPALT ,
ID_CBX_OPTS ,
ID_CBX_TRYTOCOM,
ID_CBX_WARN ,
ID_BTN_OK ,
ID_BTN_DEFAULTS,
ID_BTN_CANCEL ,
ID_UNUSED , // Assigned to controls for which events are not used
ID_FST = ID_PNL_ABSTOL,
ID_LST = ID_BTN_CANCEL
};
// Leave this as the last line as private access is envoked by macro
wxDECLARE_EVENT_TABLE( );
};
//**************************************************************************************************
#endif // DLGNGSCFGOPT_HPP