X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=src%2Fdialogs.cpp;h=7b4d7d141c2b514080456913d1d45ead0de750ad;hp=2fadb35695214e41ca02d7215b73dbe271185fac;hb=9776c9a12ba53419d34563a5ec57c90e3d6798f4;hpb=f1303ea0f1188b0a89846c67b5783f596e7ba1b7 diff --git a/src/dialogs.cpp b/src/dialogs.cpp index 2fadb35..7b4d7d1 100644 --- a/src/dialogs.cpp +++ b/src/dialogs.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: dialogs.cpp,v 1.38 2001/02/21 20:13:03 kevin Exp $ +** $Id: dialogs.cpp,v 1.42 2001/02/22 18:22:40 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -29,13 +29,8 @@ // #pragma implementation #endif -// For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - #ifndef WX_PRECOMP #include "wx/wx.h" #endif @@ -65,7 +60,7 @@ // StringValueAndTitleListBox /////////////////////////////////////////////////////////////////////// -StringValueAndTitleListBox::StringValueAndTitleListBox (wxDialog* pParent, int nChoices, const char* aszTitle[], const char* aszValue[]) +StringValueAndTitleListBox::StringValueAndTitleListBox (wxDialog* pParent, int nChoices, const char* const aszTitle[], const char* const aszValue[]) : wxListBox () { wxString* psTitle = new wxString [nChoices]; @@ -84,7 +79,7 @@ StringValueAndTitleListBox::getSelectionStringValue () const return m_ppszValues[GetSelection()]; } -StringValueAndTitleRadioBox::StringValueAndTitleRadioBox (wxDialog* pParent, const wxString& strTitle, int nChoices, const char* aszTitle[], const char* aszValue[]) +StringValueAndTitleRadioBox::StringValueAndTitleRadioBox (wxDialog* pParent, const wxString& strTitle, int nChoices, const char* const aszTitle[], const char* const aszValue[]) : wxRadioBox () { wxString* psTitle = new wxString [nChoices]; @@ -222,7 +217,7 @@ DialogGetComparisonImage::getMakeDifferenceImage() ///////////////////////////////////////////////////////////////////// DialogPreferences::DialogPreferences (wxWindow* pParent, const char* const pszTitle, - bool bAdvancedOptions, bool bAskDeleteNewDocs, bool bVerboseLogging) + 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); @@ -243,6 +238,14 @@ DialogPreferences::DialogPreferences (wxWindow* pParent, const char* const pszTi 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); + + m_pCBUseBackgroundTasks = new wxCheckBox (this, -1, "Put Tasks in Background", wxDefaultPosition, wxSize(250, 25), 0); + m_pCBUseBackgroundTasks->SetValue (bStartupTips); + pTopSizer->Add (m_pCBUseBackgroundTasks, 0, wxALIGN_CENTER_VERTICAL); + pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5); wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL); @@ -284,6 +287,18 @@ DialogPreferences::getVerboseLogging () return static_cast(m_pCBVerboseLogging->GetValue()); } +bool +DialogPreferences::getStartupTips () +{ + return static_cast(m_pCBStartupTips->GetValue()); +} + +bool +DialogPreferences::getUseBackgroundTasks () +{ + return static_cast(m_pCBUseBackgroundTasks->GetValue()); +} + ///////////////////////////////////////////////////////////////////// // CLASS DiaglogGetMinMax Implementation