DlgPrefs.cpp
19.7 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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
//**************************************************************************************************
// DlgPrefs.cpp *
// -------------- *
// Started : 2006-10-17 *
// Last Update : 2016-11-09 *
// 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. *
// *
//**************************************************************************************************
#include "DlgPrefs.hpp"
//**************************************************************************************************
// Implement an event table.
wxBEGIN_EVENT_TABLE( DlgPrefs, wxDialog )
EVT_BUTTON( DlgPrefs::ID_BTN_OK , DlgPrefs::OnBtnOk )
EVT_BUTTON( DlgPrefs::ID_BTN_CANCEL, DlgPrefs::OnBtnCancel )
wxEND_EVENT_TABLE( )
//**************************************************************************************************
// Constructor.
//
// Argument List :
// poWin - A pointer to the dialog parent window
DlgPrefs::DlgPrefs( wxWindow * poWin ) :
wxDialog( poWin, -1, wxT(""), wxDefaultPosition, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE, wxDialogNameStr )
{
// Construct the display objects
Initialize( );
// Clear object attributes
bClear( );
}
//**************************************************************************************************
// Destructor.
DlgPrefs::~DlgPrefs( )
{
}
//**************************************************************************************************
// Initialize object attributes.
void DlgPrefs::Initialize( void )
{
SetTitle( wxT(" Preferences") );
// Call all the initialization functions
Create( );
ToolTips( );
// Layout the of the display objects
DoLayout( );
}
//**************************************************************************************************
// Create the display objects.
void DlgPrefs::Create( void )
{
wxPanel * poPnlPrefs, * poPnlBtns;
// wxPanel * poPnlLHS, * poPnlRHS;
wxSize oSizeCbx;
int iWdName=170, iWdValue=130;
// Create the various underlying panel objects
poPnlPrefs = new wxPanel( this );
// poPnlLHS = new wxPanel( this );
// poPnlRHS = new wxPanel( this );
poPnlBtns = new wxPanel( this );
// Create the waveform viewer choice control
// m_oChoSchemEdit.bCreate( poPnlPrefs, ID_CHO_SCHEMEDIT , iWdName, iWdValue );
// m_oChoSchemEdit.m_oLblName.SetLabel( wxT("Schematic Editor") );
// m_oChoSchemEdit.m_oChoice.Append( wxT("gschem") );
// m_oChoSchemEdit.m_oChoice.Append( wxT("eeschema") );
// Create the waveform viewer choice control
m_oChoDataViewer.bCreate( poPnlPrefs, ID_CHO_DATAVIEWER, iWdName, iWdValue );
m_oChoDataViewer.m_oLblName.SetLabel( wxT("Waveform data viewer") );
m_oChoDataViewer.m_oChoice.Append( rosEnumVwrToStr( eVIEW_GAW ) );
m_oChoDataViewer.m_oChoice.Append( rosEnumVwrToStr( eVIEW_GWAVE ) );
// Create the temporary file management strategy choice control
m_oChoTmpFileMgt.bCreate( poPnlPrefs, ID_CHO_TMPFILEMGT, iWdName, iWdValue );
m_oChoTmpFileMgt.m_oLblName.SetLabel( wxT("Temporary files") );
m_oChoTmpFileMgt.m_oChoice.Append( wxT("Delete") );
m_oChoTmpFileMgt.m_oChoice.Append( wxT("Prompt") );
m_oChoTmpFileMgt.m_oChoice.Append( wxT("Keep") );
// Create the main frame layout choice control
m_oChoFrmLayout.bCreate( poPnlPrefs, ID_CHO_FRMLAYOUT , iWdName, iWdValue );
m_oChoFrmLayout.m_oLblName.SetLabel( wxT("Main frame layout") );
m_oChoFrmLayout.m_oChoice.Append( wxT("Long Probes") );
m_oChoFrmLayout.m_oChoice.Append( wxT("Wide Console") );
// Create the phase / angle units choice control
m_oChoPhaseUnits.bCreate( poPnlPrefs, ID_CHO_PHASEUNITS, iWdName, iWdValue );
m_oChoPhaseUnits.m_oLblName.SetLabel( wxT("Phase / angle units") );
m_oChoPhaseUnits.m_oChoice.Append( wxT("Degrees") );
m_oChoPhaseUnits.m_oChoice.Append( wxT("Radians") );
// Create the results precision choice control
m_oChoPrecision.bCreate( poPnlPrefs, ID_CHO_PRECISION , iWdName, iWdValue );
m_oChoPrecision.m_oLblName.SetLabel( wxT("Results precision") );
m_oChoPrecision.m_oChoice.Append( wxT("%3.1E") );
m_oChoPrecision.m_oChoice.Append( wxT("%4.2E") );
m_oChoPrecision.m_oChoice.Append( wxT("%5.3E") );
m_oChoPrecision.m_oChoice.Append( wxT("%6.4E") );
m_oChoPrecision.m_oChoice.Append( wxT("%7.5E") );
m_oChoPrecision.m_oChoice.Append( wxT("%8.6E") );
// Create the Guile procedure choice control
m_oChoGuileProc.bCreate( poPnlPrefs, ID_CHO_GUILEPROC , iWdName, iWdValue );
m_oChoGuileProc.m_oLblName.SetLabel( wxT("gnetlist Guile backend") );
m_oChoGuileProc.m_oChoice.Append( PrcGNetList::roasGetGuileProcs( ) );
m_oChoGuileProc.m_oChoice.Delete( 0 ); // The first item is an empty string
// Create the wxNotebook maximum line PnlValue control
m_oPnlNbkMaxLns.bCreate( poPnlPrefs, ID_VAL_NBKMAXLNS , iWdName, iWdValue-45, 45,
wxDefaultPosition, PnlValue::eSHOW_LBL );
m_oPnlNbkMaxLns.bSetName( wxT("Max text control size") );
m_oPnlNbkMaxLns.bSetValueType( eVALUE_INT );
m_oPnlNbkMaxLns.bSetDefValue( TXT_LNSDEF );
m_oPnlNbkMaxLns.bSetSpnRange( TXT_LNSMIN, TXT_LNSMAX );
m_oPnlNbkMaxLns.bSetSpnIncSz( 10, 10000 );
m_oPnlNbkMaxLns.bSetUnits( wxT("Lines") );
// Create the spin control period PnlValue control
m_oPnlSpnPeriod.bCreate( poPnlPrefs, ID_VAL_SPINPERIOD , iWdName, iWdValue-45, 45,
wxDefaultPosition, PnlValue::eSHOW_LBL );
m_oPnlSpnPeriod.bSetName( wxT("Spin control period") );
m_oPnlSpnPeriod.bSetValueType( eVALUE_INT );
m_oPnlSpnPeriod.bSetDefValue( SPN_PERIOD_DEF );
m_oPnlSpnPeriod.bSetSpnRange( SPN_PERIOD_MIN, SPN_PERIOD_MAX );
m_oPnlSpnPeriod.bSetSpnIncSz( 1, 10 );
m_oPnlSpnPeriod.bSetUnits( wxT("mSec") );
// Create the spin control period PnlValue control
m_oPnlToolTipDly.bCreate( poPnlPrefs, ID_VAL_TOOLTIPDLY, iWdName, iWdValue-45, 45,
wxDefaultPosition, PnlValue::eSHOW_LBL );
m_oPnlToolTipDly.bSetName( wxT("Tool tip delay") );
m_oPnlToolTipDly.bSetValueType( eVALUE_INT );
m_oPnlToolTipDly.bSetDefValue( CFG_DEF_TOOLTIPDLY );
m_oPnlToolTipDly.bSetSpnRange( 0, 2000 );
m_oPnlToolTipDly.bSetSpnIncSz( 100, 100 );
m_oPnlToolTipDly.bSetUnits( wxT("mSec") );
// Set height of check box controls according to size of PnlValue object
oSizeCbx = m_oPnlNbkMaxLns.GetSize( );
oSizeCbx.SetWidth( 250 );
// Create the tool tips check box
#if wxCHECK_VERSION( 3,0,0 )
m_oCbxToolTips .Create( poPnlPrefs, ID_CBX_TOOLTIPS , wxT("Show tool tips \t\t\t"),
wxDefaultPosition, oSizeCbx , wxALIGN_RIGHT );
#else
m_oCbxToolTips .Create( poPnlPrefs, ID_CBX_TOOLTIPS , wxT("Show tool tips \t\t\t\t"),
wxDefaultPosition, oSizeCbx , wxALIGN_RIGHT );
#endif
// Create the synchronize sweep sources check box
m_oCbxSyncSwpSrcs.Create( poPnlPrefs, ID_CBX_SYNCSWPSRCS, wxT("Sync. sweep sources\t\t"),
wxDefaultPosition, oSizeCbx, wxALIGN_RIGHT );
m_oCbxSyncTemps .Create( poPnlPrefs, ID_CBX_SYNCTEMPS , wxT("Sync. temperatures\t\t"),
wxDefaultPosition, oSizeCbx, wxALIGN_RIGHT );
// Create the synchronize sweep sources check box
m_oCbxKeepNetLst .Create( poPnlPrefs, ID_CBX_KEEPNETLST , wxT("Keep the netlist file\t\t"),
wxDefaultPosition, oSizeCbx, wxALIGN_RIGHT );
// Create the include model files check box
m_oCbxVerboseMode.Create( poPnlPrefs, ID_CBX_VERBOSEMODE, wxT("gnetlist verbose mode\t\t"),
wxDefaultPosition, oSizeCbx, wxALIGN_RIGHT );
// Create the include model files check box
m_oCbxIncludeMode.Create( poPnlPrefs, ID_CBX_INCLUDEMODE, wxT("Include model defs.\t\t"),
wxDefaultPosition, oSizeCbx, wxALIGN_RIGHT );
// Create the include model files check box
m_oCbxEmbedMode .Create( poPnlPrefs, ID_CBX_EMBEDMODE , wxT("Embed include files\t\t"),
wxDefaultPosition, oSizeCbx, wxALIGN_RIGHT );
// Create the include model files check box
m_oCbxNoMungeMode.Create( poPnlPrefs, ID_CBX_NOMUNGEMODE, wxT("Fix component prefixes\t\t"),
wxDefaultPosition, oSizeCbx, wxALIGN_RIGHT );
// Create the application path text controls
// m_oTxtGschem .bCreate( poPnlRight, ID_TXT_GSCHEM , 80, 250 );
// m_oTxtGnetlst.bCreate( poPnlRight, ID_TXT_GNETLST, 80, 250 );
// m_oTxtNgspice.bCreate( poPnlRight, ID_TXT_NGSPICE, 80, 250 );
// m_oTxtGnucap .bCreate( poPnlRight, ID_TXT_GNUCAP , 80, 250 );
// m_oTxtGaw .bCreate( poPnlRight, ID_TXT_GAW , 80, 250 );
// m_oTxtGwave .bCreate( poPnlRight, ID_TXT_GWAVE , 80, 250 );
// m_oTxtCalc .bCreate( poPnlRight, ID_TXT_CALC , 80, 250 );
// m_oTxtGschem .m_oLblName.SetLabel( wxT("Gschem") );
// m_oTxtGnetlst.m_oLblName.SetLabel( wxT("Gnetlist") );
// m_oTxtNgspice.m_oLblName.SetLabel( wxT("NG-Spice") );
// m_oTxtGnucap .m_oLblName.SetLabel( wxT("GNU-Cap") );
// m_oTxtGaw .m_oLblName.SetLabel( wxT("Gaw") );
// m_oTxtGwave .m_oLblName.SetLabel( wxT("Gwave") );
// m_oTxtCalc .m_oLblName.SetLabel( wxT("Calculator") );
// Create the buttons
m_oBtnOk .Create( poPnlBtns, ID_BTN_OK, wxT("OK") );
m_oBtnCancel.Create( poPnlBtns, ID_BTN_CANCEL, wxT("Cancel") );
}
//**************************************************************************************************
// Initialize the tool tips.
void DlgPrefs::ToolTips( void )
{
// m_oChoSchemEdit .SetToolTip( wxT(" The schematic capture / editor program to be used (gEDA/GAF or KiCAD) ") );
m_oChoDataViewer .SetToolTip( wxT(" The waveform data viewing utility ") );
m_oChoTmpFileMgt .SetToolTip( wxT(" The temporary file management strategy ") );
m_oChoFrmLayout .SetToolTip( wxT(" The main frame layout ") );
m_oChoPhaseUnits .SetToolTip( wxT(" The phase / angle units ") );
m_oChoPrecision .SetToolTip( wxT(" The precision of the analysis results ") );
m_oChoGuileProc .SetToolTip( wxT(" The gnetlist Guile procedure for backend processing ") );
m_oPnlNbkMaxLns .SetToolTip( wxT(" The maximum number of lines that can be displayed in a text control ") );
m_oPnlSpnPeriod .SetToolTip( wxT(" The period between successive spin button control updates ") );
m_oPnlToolTipDly .SetToolTip( wxT(" The delay before a tool tip is displayed ") );
m_oCbxToolTips .SetToolTip( wxT(" Enable tool tips ") );
m_oCbxSyncSwpSrcs.SetToolTip( wxT(" Synchronize sweep sources between analysis pages " ) );
m_oCbxSyncTemps .SetToolTip( wxT(" Synchronize temperature values between analysis pages ") );
m_oCbxKeepNetLst .SetToolTip( wxT(" Exclude the netlist file from the list of temporary files ") );
m_oCbxVerboseMode.SetToolTip( wxT(" Enable gnetlist verbose mode ") );
m_oCbxIncludeMode.SetToolTip( wxT(" Include model file contents in netlist file (gnetlist include_mode) ") );
m_oCbxEmbedMode .SetToolTip( wxT(" Embed file contents in netlist file when .INCLUDE encountered (gnetlist embedd_mode) ") );
m_oCbxNoMungeMode.SetToolTip( wxT(" Automatically test and fix incorrect component label prefixes (gnetlist nomunge_mode) ") );
//m_oTxtGschem .SetToolTip( wxT(" The path to the binary for gschem (schematic capture application) ") );
//m_oTxtGnetlst .SetToolTip( wxT(" The path to the binary for gnetlist (schematic to netlist converter) ") );
//m_oTxtNgspice .SetToolTip( wxT(" The path to the binary for NG-Spice (simulation engine) ") );
//m_oTxtGnucap .SetToolTip( wxT(" The path to the binary for GNU-Cap (simulation engine) ") );
//m_oTxtGaw .SetToolTip( wxT(" The path to the binary for Gaw (waveform viewer) ") );
//m_oTxtGwave .SetToolTip( wxT(" The path to the binary for Gwave (waveform viewer) ") );
//m_oTxtCalc .SetToolTip( wxT(" The path to the binary for the calculator utility ") );
}
//**************************************************************************************************
// Layout the display objects within the dialog.
void DlgPrefs::DoLayout( void )
{
wxBoxSizer * poSzrDlg;
wxPanel * poPnlPrefs, * poPnlBtns;
wxBoxSizer * poSzrPrefs, * poSzrBtns;
wxSizerFlags oFlags;
// Get pointers to the various panels
poPnlPrefs = (wxPanel *) m_oPnlNbkMaxLns .GetParent( );
poPnlBtns = (wxPanel *) m_oBtnOk .GetParent( );
// Create sizers to associate with the panels
poSzrDlg = new wxBoxSizer ( wxVERTICAL );
poSzrPrefs = new wxStaticBoxSizer( wxVERTICAL, poPnlPrefs, wxT("") );
poSzrBtns = new wxBoxSizer ( wxHORIZONTAL );
// Set the sizers to the panels
SetSizer( poSzrDlg );
poPnlPrefs->SetSizer( poSzrPrefs );
poPnlBtns ->SetSizer( poSzrBtns );
// Layout the preferences controls
oFlags.Align( wxALIGN_LEFT );
oFlags.Border( wxLEFT | wxRIGHT | wxTOP, 10 );
poSzrPrefs->Add( &m_oChoDataViewer , oFlags );
oFlags.Border( wxLEFT , 10 );
poSzrPrefs->Add( &m_oChoTmpFileMgt , oFlags );
poSzrPrefs->Add( &m_oChoFrmLayout , oFlags );
poSzrPrefs->Add( &m_oChoPhaseUnits , oFlags );
poSzrPrefs->Add( &m_oChoPrecision , oFlags );
poSzrPrefs->Add( &m_oChoGuileProc , oFlags );
poSzrPrefs->Add( &m_oPnlNbkMaxLns , oFlags );
poSzrPrefs->Add( &m_oPnlSpnPeriod , oFlags );
poSzrPrefs->Add( &m_oPnlToolTipDly , oFlags );
oFlags.Border( wxLEFT , 7 );
poSzrPrefs->Add( &m_oCbxToolTips , oFlags );
poSzrPrefs->Add( &m_oCbxSyncSwpSrcs, oFlags );
poSzrPrefs->Add( &m_oCbxSyncTemps , oFlags );
poSzrPrefs->Add( &m_oCbxKeepNetLst , oFlags );
poSzrPrefs->Add( &m_oCbxVerboseMode, oFlags );
poSzrPrefs->Add( &m_oCbxIncludeMode, oFlags );
poSzrPrefs->Add( &m_oCbxEmbedMode , oFlags );
oFlags.Border( wxLEFT | wxBOTTOM , 7 );
poSzrPrefs->Add( &m_oCbxNoMungeMode, oFlags );
// Layout the buttons
oFlags.Border( wxTOP | wxBOTTOM, 10 );
oFlags.Align( wxALIGN_RIGHT );
poSzrBtns->Add( &m_oBtnOk , oFlags );
poSzrBtns->AddSpacer( 10 );
oFlags.Align( wxALIGN_LEFT );
poSzrBtns->Add( &m_oBtnCancel, oFlags );
// Layout the underlying dialog
oFlags.Border( wxALL, 15 );
poSzrDlg->Add( poPnlPrefs, oFlags );
oFlags.Align( wxALIGN_CENTER );
oFlags.Border( wxBOTTOM, 15 );
poSzrDlg->Add( poPnlBtns , oFlags );
// Set dialogues minimum size and initial size as calculated by the sizer
poSzrPrefs->SetSizeHints( poPnlPrefs );
poSzrBtns ->SetSizeHints( poPnlBtns );
poSzrDlg ->SetSizeHints( this );
}
//**************************************************************************************************
// Load the values into the display controls from the configuration file.
void DlgPrefs::Load( void )
{
SetEvtHandlerEnabled( false );
// m_oChoSchemEdit .m_oChoice.SetStringSelection( g_oConfig.rosGetSchemEdit( ) );
m_oChoDataViewer .m_oChoice.SetSelection( (int) g_oConfig.eGetDataViewer ( ) );
m_oChoTmpFileMgt .m_oChoice.SetSelection( (int) g_oConfig.eGetTmpFileMgt ( ) );
m_oChoFrmLayout .m_oChoice.SetSelection( (int) g_oConfig.uiGetFrmLayout ( ) );
m_oChoPhaseUnits .m_oChoice.SetSelection( (int) g_oConfig.eGetPhaseUnits ( ) );
m_oChoPrecision .m_oChoice.SetSelection( (int) g_oConfig.uiGetPrecision ( ) - 1 );
m_oChoGuileProc .m_oChoice.SetStringSelection( g_oConfig.rosGetGuileProc( ) );
m_oPnlNbkMaxLns .bSetValue( (long) g_oConfig.uiGetNbkMaxLns ( ) );
m_oPnlSpnPeriod .bSetValue( (double) g_oConfig.uiGetSpnPeriod ( ), -3 );
m_oPnlToolTipDly .bSetValue( (double) g_oConfig.uiGetToolTipDly( ), -3 );
m_oCbxToolTips .SetValue( g_oConfig.bGetToolTips ( ) );
m_oCbxSyncSwpSrcs.SetValue( g_oConfig.bGetSyncSwpSrcs( ) );
m_oCbxSyncTemps .SetValue( g_oConfig.bGetSyncTemps ( ) );
m_oCbxKeepNetLst .SetValue( g_oConfig.bGetKeepNetLst ( ) );
m_oCbxVerboseMode.SetValue( g_oConfig.bGetVerboseMode( ) );
m_oCbxIncludeMode.SetValue( g_oConfig.bGetIncludeMode( ) );
m_oCbxEmbedMode .SetValue( g_oConfig.bGetEmbedMode ( ) );
m_oCbxNoMungeMode.SetValue( ! g_oConfig.bGetNoMungeMode( ) );
SetEvtHandlerEnabled( true );
}
//**************************************************************************************************
// Save the values in the display controls in the configuration file.
void DlgPrefs::Save( void )
{
SetEvtHandlerEnabled( false );
//g_oConfig.bSetSchemEdit ( m_oChoSchemEdit .m_oChoice.GetStringSelection( ) );
g_oConfig.bSetDataViewer ( (eTypeViewer) m_oChoDataViewer.m_oChoice.GetSelection( ) );
g_oConfig.bSetTmpFileMgt ( (eTypeTmpFileMgt) m_oChoTmpFileMgt.m_oChoice.GetSelection( ) );
g_oConfig.bSetFrmLayout ( m_oChoFrmLayout .m_oChoice.GetSelection( ) );
g_oConfig.bSetPhaseUnits ( (eTypeUnits) m_oChoPhaseUnits.m_oChoice.GetSelection( ) );
g_oConfig.bSetPrecision ( m_oChoPrecision .m_oChoice.GetSelection( ) + 1 );
g_oConfig.bSetGuileProc ( m_oChoGuileProc .m_oChoice.GetStringSelection( ) );
g_oConfig.bSetNbkMaxLns ( (uint) m_oPnlNbkMaxLns .liGetValue( ) );
g_oConfig.bSetSpnPeriod ( (uint) (1000.0 * m_oPnlSpnPeriod .dfGetValue( )) );
g_oConfig.bSetToolTipDly ( (uint) (1000.0 * m_oPnlToolTipDly.dfGetValue( )) );
g_oConfig.bSetToolTips ( m_oCbxToolTips .IsChecked( ) );
g_oConfig.bSetSyncSwpSrcs( m_oCbxSyncSwpSrcs.IsChecked( ) );
g_oConfig.bSetSyncTemps ( m_oCbxSyncTemps .IsChecked( ) );
g_oConfig.bSetKeepNetLst ( m_oCbxKeepNetLst .IsChecked( ) );
g_oConfig.bSetVerboseMode( m_oCbxVerboseMode.IsChecked( ) );
g_oConfig.bSetIncludeMode( m_oCbxIncludeMode.IsChecked( ) );
g_oConfig.bSetEmbedMode ( m_oCbxEmbedMode .IsChecked( ) );
g_oConfig.bSetNoMungeMode( ! m_oCbxNoMungeMode.IsChecked( ) );
g_oConfig.bFlush( );
SetEvtHandlerEnabled( true );
}
//**************************************************************************************************
// Reset all dialog settings to defaults.
//
// Return Values :
// true - Success
// false - Failure
bool DlgPrefs::bClear( void )
{
Load( );
return( true );
}
//**************************************************************************************************
// Event Handlers *
//**************************************************************************************************
// Ok button event handler.
//
// Argument List :
// roEvtCmd - An object holding information about the event (not used)
void DlgPrefs::OnBtnOk( wxCommandEvent & roEvtCmd )
{
Save( );
EndModal( wxID_OK );
}
//**************************************************************************************************
// Cancel button event handler.
//
// Argument List :
// roEvtCmd - An object holding information about the event (not used)
void DlgPrefs::OnBtnCancel( wxCommandEvent & roEvtCmd )
{
Load( );
EndModal( wxID_CANCEL );
}
//**************************************************************************************************