X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fdialogs.cpp;h=21b6f197ba2ca3936371e1dc3e4af6c7e24a8955;hb=e081109a4a541c8780aaa253b874acada5957200;hp=f25952c9db6b7c4b5ceca36375d15c5dbc165475;hpb=21362871030affef16ed3f135ac36349476416b5;p=ctsim.git diff --git a/src/dialogs.cpp b/src/dialogs.cpp index f25952c..21b6f19 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.36 2001/02/19 20:23:17 kevin Exp $ +** $Id: dialogs.cpp,v 1.41 2001/02/22 15:00:20 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 @@ -222,7 +217,7 @@ DialogGetComparisonImage::getMakeDifferenceImage() ///////////////////////////////////////////////////////////////////// DialogPreferences::DialogPreferences (wxWindow* pParent, const char* const pszTitle, - bool bAdvancedOptions, bool bAskDeleteNewDocs) + 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); @@ -239,6 +234,18 @@ DialogPreferences::DialogPreferences (wxWindow* pParent, const char* const pszTi 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); + + 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); @@ -274,6 +281,24 @@ DialogPreferences::getAskDeleteNewDocs () return static_cast(m_pCBAskDeleteNewDocs->GetValue()); } +bool +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 @@ -1303,17 +1328,9 @@ DialogGetConvertPolarParameters::DialogGetConvertPolarParameters (wxWindow* pPar wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL); - pTopSizer->Add (new wxStaticText (this, -1, pszTitle), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5); - + 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); - std::ostringstream os; - os << iDefaultXSize; - m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0); - std::ostringstream osYSize; - osYSize << iDefaultYSize; - m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0); - wxFlexGridSizer* pGridSizer = new wxFlexGridSizer (1); m_pRadioBoxInterpolation = new StringValueAndTitleRadioBox (this, _T("Interpolation"), Projections::getInterpCount(), Projections::getInterpTitleArray(), Projections::getInterpNameArray()); @@ -1321,8 +1338,14 @@ DialogGetConvertPolarParameters::DialogGetConvertPolarParameters (wxWindow* pPar pGridSizer->Add (m_pRadioBoxInterpolation, 0, wxALL | wxALIGN_CENTER); wxFlexGridSizer* pTextGridSizer = new wxFlexGridSizer (2); + std::ostringstream os; + os << iDefaultXSize; + m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0); pTextGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); pTextGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL); + std::ostringstream osYSize; + osYSize << iDefaultYSize; + m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0); pTextGridSizer->Add (new wxStaticText (this, -1, "Y Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); pTextGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL); #ifdef DEBUG