+/////////////////////////////////////////////////////////////////////
+// CLASS DiaglogPreferences Implementation
+/////////////////////////////////////////////////////////////////////
+
+DialogPreferences::DialogPreferences (wxWindow* pParent, const char* const pszTitle,
+ bool bAdvancedOptions, bool bAskDeleteNewDocs, bool bVerboseLogging, bool bStartupTips, bool bUseBackgroundTasks)
+: wxDialog (pParent, -1, pszTitle, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
+{
+ wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
+
+ pTopSizer->Add (new wxStaticText (this, -1, pszTitle), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
+
+ pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
+
+ m_pCBAdvancedOptions = new wxCheckBox (this, -1, "Advanced Options", wxDefaultPosition, wxSize(250, 25), 0);
+ m_pCBAdvancedOptions->SetValue (bAdvancedOptions);
+ pTopSizer->Add (m_pCBAdvancedOptions, 0, wxALIGN_CENTER_VERTICAL);
+
+ m_pCBAskDeleteNewDocs = new wxCheckBox (this, -1, "Ask \"Save New Documents\" Before Closing", wxDefaultPosition, wxSize(250, 25), 0);
+ m_pCBAskDeleteNewDocs->SetValue (bAskDeleteNewDocs);
+ pTopSizer->Add (m_pCBAskDeleteNewDocs, 0, wxALIGN_CENTER_VERTICAL);
+
+ m_pCBVerboseLogging = new wxCheckBox (this, -1, "Verbose Logging", wxDefaultPosition, wxSize(250, 25), 0);
+ m_pCBVerboseLogging->SetValue (bVerboseLogging);
+ pTopSizer->Add (m_pCBVerboseLogging, 0, wxALIGN_CENTER_VERTICAL);
+
+ m_pCBStartupTips = new wxCheckBox (this, -1, "Show Tips at Start", wxDefaultPosition, wxSize(250, 25), 0);
+ m_pCBStartupTips->SetValue (bStartupTips);
+ pTopSizer->Add (m_pCBStartupTips, 0, wxALIGN_CENTER_VERTICAL);
+
+#ifdef HAVE_WXTHREADS
+ m_pCBUseBackgroundTasks = new wxCheckBox (this, -1, "Put Tasks in Background", wxDefaultPosition, wxSize(250, 25), 0);
+ m_pCBUseBackgroundTasks->SetValue (bUseBackgroundTasks);
+ pTopSizer->Add (m_pCBUseBackgroundTasks, 0, wxALIGN_CENTER_VERTICAL);
+#endif
+
+ pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
+
+ wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
+ wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
+ pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
+ wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
+ pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
+ CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_PREFERENCES);
+ pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
+
+ pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
+ pButtonOk->SetDefault();
+
+ SetAutoLayout (true);
+ SetSizer (pTopSizer);
+ pTopSizer->Fit (this);
+ pTopSizer->SetSizeHints (this);
+}
+
+DialogPreferences::~DialogPreferences ()
+{
+}
+
+bool
+DialogPreferences::getAdvancedOptions ()
+{
+ return static_cast<bool>(m_pCBAdvancedOptions->GetValue());
+}
+
+bool
+DialogPreferences::getAskDeleteNewDocs ()
+{
+ return static_cast<bool>(m_pCBAskDeleteNewDocs->GetValue());
+}
+
+bool
+DialogPreferences::getVerboseLogging ()
+{
+ return static_cast<bool>(m_pCBVerboseLogging->GetValue());
+}
+
+bool
+DialogPreferences::getStartupTips ()
+{
+ return static_cast<bool>(m_pCBStartupTips->GetValue());
+}
+
+bool
+DialogPreferences::getUseBackgroundTasks ()
+{
+#ifdef HAVE_WXTHREADS
+ return static_cast<bool>(m_pCBUseBackgroundTasks->GetValue());
+#else
+ return false;
+#endif
+}
+
+