r540: Improved dialog boxes
authorKevin M. Rosenberg <kevin@rosenberg.net>
Wed, 14 Feb 2001 18:39:47 +0000 (18:39 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Wed, 14 Feb 2001 18:39:47 +0000 (18:39 +0000)
src/ctsim.cpp
src/dialogs.cpp
src/dialogs.h
src/views.cpp

index 5002d486d88026d407d1ac9e53d817861eaebae5..d0f8671fec2d32f607e25369546fafa076794bd7 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ctsim.cpp,v 1.76 2001/02/11 22:28:50 kevin Exp $
+**  $Id: ctsim.cpp,v 1.77 2001/02/14 18:39:47 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
@@ -73,7 +73,7 @@
 #endif
 #endif
 
-static const char* rcsindent = "$Id: ctsim.cpp,v 1.76 2001/02/11 22:28:50 kevin Exp $";
+static const char* rcsindent = "$Id: ctsim.cpp,v 1.77 2001/02/14 18:39:47 kevin Exp $";
 
 struct option CTSimApp::ctsimOptions[] = 
 {
@@ -345,7 +345,7 @@ MainFrame::MainFrame(wxDocManager *manager, wxFrame *frame, wxWindowID id, const
        file_menu->Append(wxID_OPEN, "&Open...\tCtrl-O");
        
        file_menu->AppendSeparator();
-  file_menu->Append (MAINMENU_FILE_PREFERENCES, "Pr&eferences...");
+  file_menu->Append (MAINMENU_FILE_PREFERENCES, "Prefere&nces...");
        file_menu->Append(MAINMENU_FILE_EXIT, "E&xit");
        
        //  history of files visited
index 717135a061b05fd30a6f70e9c9f97282b219ba9a..4681b7c8725b2e7a96d286525c02192f70b9c9b3 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: dialogs.cpp,v 1.31 2001/02/14 16:37:14 kevin Exp $
+**  $Id: dialogs.cpp,v 1.32 2001/02/14 18:39:47 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
 #include "dialogs.h"
 #include "ctsim.h"
 #include "ct.h"
-//#include "ctsupport.h"
-//#include "scanner.h"
-//#include "phantom.h"
-//#include "filter.h"
-//#include "backprojectors.h"
 #include "docs.h"
 #include "views.h"
 #include "imagefile.h"
@@ -77,7 +72,7 @@ StringValueAndTitleListBox::StringValueAndTitleListBox (wxDialog* pParent, int n
   for (int i = 0; i < nChoices; i++)
     psTitle[i] = aszTitle[i];
   
-  Create (pParent, -1, wxDefaultPosition, wxSize(200,-1), nChoices, psTitle, wxLB_SINGLE | wxLB_NEEDED_SB);
+  Create (pParent, -1, wxDefaultPosition, wxSize(-1,-1), nChoices, psTitle, wxLB_SINGLE | wxLB_NEEDED_SB);
   
   m_ppszValues = aszValue;
   delete [] psTitle;
@@ -89,6 +84,24 @@ StringValueAndTitleListBox::getSelectionStringValue () const
   return m_ppszValues[GetSelection()];
 }
 
+StringValueAndTitleRadioBox::StringValueAndTitleRadioBox (wxDialog* pParent, const wxString& strTitle, int nChoices, const char* aszTitle[], const char* aszValue[])
+: wxRadioBox ()
+{
+  wxString* psTitle = new wxString [nChoices];
+  for (int i = 0; i < nChoices; i++)
+    psTitle[i] = aszTitle[i];
+  
+  Create (pParent, -1, strTitle, wxDefaultPosition, wxDefaultSize, nChoices, psTitle, 1, wxRA_SPECIFY_COLS);
+  
+  m_ppszValues = aszValue;
+  delete [] psTitle;
+};
+
+const char*
+StringValueAndTitleRadioBox::getSelectionStringValue () const
+{
+  return m_ppszValues[GetSelection()];
+}
 
 ///////////////////////////////////////////////////////////////////////
 // CLASS IMPLEMENTATION
@@ -104,9 +117,9 @@ DialogGetPhantom::DialogGetPhantom (wxWindow* pParent, int iDefaultPhantom)
   
   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxALL, 5);
   
-  m_pListBoxPhantom = new StringValueAndTitleListBox (this, Phantom::getPhantomCount(), Phantom::getPhantomTitleArray(), Phantom::getPhantomNameArray());
-  m_pListBoxPhantom->SetSelection (iDefaultPhantom);
-  pTopSizer->Add (m_pListBoxPhantom, 0, wxALL | wxALIGN_CENTER | wxEXPAND);
+  m_pRadioBoxPhantom = new StringValueAndTitleRadioBox (this, _T("Phantom"), Phantom::getPhantomCount(), Phantom::getPhantomTitleArray(), Phantom::getPhantomNameArray());
+  m_pRadioBoxPhantom->SetSelection (iDefaultPhantom);
+  pTopSizer->Add (m_pRadioBoxPhantom, 0, wxALL | wxALIGN_CENTER | wxEXPAND);
   
   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
   
@@ -127,7 +140,7 @@ DialogGetPhantom::DialogGetPhantom (wxWindow* pParent, int iDefaultPhantom)
 const char*
 DialogGetPhantom::getPhantom()
 {
-  return m_pListBoxPhantom->getSelectionStringValue();
+  return m_pRadioBoxPhantom->getSelectionStringValue();
 }
 
 
@@ -211,30 +224,15 @@ DialogPreferences::DialogPreferences (wxWindow* pParent, const char* const pszTi
   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);
-#if 1
-  m_pCBAdvancedOptions = new wxCheckBox (this, -1, "Advanced Options", wxDefaultPosition, wxSize(100, 25), 0);
-  m_pCBAdvancedOptions->SetValue (bAdvancedOptions);
-
-  m_pCBAskDeleteNewDocs = new wxCheckBox (this, -1, "Ask Save New Documents Before Closing", wxDefaultPosition, wxSize(100, 25), 0);
-  m_pCBAskDeleteNewDocs->SetValue (bAskDeleteNewDocs);
 
-  pTopSizer->Add (m_pCBAdvancedOptions, 0, wxALIGN_CENTER_VERTICAL);
-  pTopSizer->Add (m_pCBAskDeleteNewDocs, 0, wxALIGN_CENTER_VERTICAL);
-#else  
-  m_pCBAdvancedOptions = new wxCheckBox (this, -1, "", wxDefaultPosition, wxSize(100, 25), 0);
+  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, "", wxDefaultPosition, wxSize(100, 25), 0);
+  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);
 
-  wxFlexGridSizer *pGridSizer = new wxFlexGridSizer (2);
-  pGridSizer->Add (m_pCBAdvancedOptions, 0, wxALIGN_CENTER_VERTICAL);
-  pGridSizer->Add (new wxStaticText (this, -1, "Show Advanced Options"), 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
-  pGridSizer->Add (m_pCBAskDeleteNewDocs, 0, wxALIGN_CENTER_VERTICAL);
-  pGridSizer->Add (new wxStaticText (this, -1, "Ask Save New Documents Before Closing"), 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
-  pTopSizer->Add (pGridSizer, 1, wxALL, 10);
-  
-#endif
   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
   
   wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
@@ -351,14 +349,11 @@ DialogAutoScaleParameters::DialogAutoScaleParameters (wxWindow *pParent, double
   
   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
   
-  wxString asTitle[3];
-  asTitle[0] = "Median";
-  asTitle[1] = "Mode";
-  asTitle[2] = "Mean";
+  wxString asTitle[] = {"Median", "Mode", "Mean"};
   
-  m_pListBoxCenter = new wxListBox (this, -1, wxDefaultPosition, wxDefaultSize, 3, asTitle, wxLB_SINGLE | wxLB_NEEDED_SB);
-  m_pListBoxCenter->SetSelection (0);
-  pTopSizer->Add (m_pListBoxCenter, 0, wxALL | wxALIGN_CENTER | wxEXPAND);
+  m_pRadioBoxCenter = new wxRadioBox (this, -1, _T("Center"), wxDefaultPosition, wxDefaultSize, 3, asTitle, 1, wxRA_SPECIFY_COLS);
+  m_pRadioBoxCenter->SetSelection (0);
+  pTopSizer->Add (m_pRadioBoxCenter, 0, wxALL | wxALIGN_CENTER | wxEXPAND);
   
   wxGridSizer *pGridSizer = new wxGridSizer (2);
   pGridSizer->Add (new wxStaticText (this, -1, "Standard Deviation Factor"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
@@ -387,7 +382,7 @@ DialogAutoScaleParameters::DialogAutoScaleParameters (wxWindow *pParent, double
 bool
 DialogAutoScaleParameters::getMinMax (double* pMin, double* pMax)
 {
-  int iCenter = m_pListBoxCenter->GetSelection();
+  int iCenter = m_pRadioBoxCenter->GetSelection();
   double dCenter = m_dMedian;
   if (iCenter == 1)
     dCenter = m_dMode;
@@ -557,55 +552,60 @@ DialogGetProjectionParameters::DialogGetProjectionParameters
   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
     
   wxFlexGridSizer* pGridSizer = new wxFlexGridSizer (2);
-  pGridSizer->Add (new wxStaticText (this, -1, "Scanner Geometry"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-  m_pListBoxGeometry = new StringValueAndTitleListBox (this, Scanner::getGeometryCount(), Scanner::getGeometryTitleArray(), Scanner::getGeometryNameArray());
-  m_pListBoxGeometry->SetSelection (iDefaultGeometry);
+  m_pRadioBoxGeometry = new StringValueAndTitleRadioBox (this, _T("Geometry"), Scanner::getGeometryCount(), Scanner::getGeometryTitleArray(), Scanner::getGeometryNameArray());
+  m_pRadioBoxGeometry->SetSelection (iDefaultGeometry);
   
-  pGridSizer->Add (m_pListBoxGeometry, 0, wxALL | wxALIGN_CENTER | wxEXPAND);
+  pGridSizer->Add (m_pRadioBoxGeometry, 0, wxALL | wxALIGN_CENTER | wxEXPAND);
   
+  m_pRadioBoxTrace = new StringValueAndTitleRadioBox (this, _T("Trace Level"), Trace::getTraceCount(), Trace::getTraceTitleArray(), Trace::getTraceNameArray());
+  m_pRadioBoxTrace->SetSelection (iDefaultTrace);
+  pGridSizer->Add (m_pRadioBoxTrace, 0, wxALL | wxALIGN_CENTER | wxEXPAND);
+
+         wxFlexGridSizer* pText1Sizer = new wxFlexGridSizer(2);
   std::ostringstream os;
   os << iDefaultNDet;
   m_pTextCtrlNDet = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
-  pGridSizer->Add (new wxStaticText (this, -1, "Detectors"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-  pGridSizer->Add (m_pTextCtrlNDet, 0, wxALIGN_CENTER_VERTICAL);
+  pText1Sizer->Add (new wxStaticText (this, -1, "Detectors"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+  pText1Sizer->Add (m_pTextCtrlNDet, 0, wxALIGN_CENTER_VERTICAL);
   std::ostringstream osNView;
   osNView << iDefaultNView;
   m_pTextCtrlNView = new wxTextCtrl (this, -1, osNView.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
-  pGridSizer->Add (new wxStaticText (this, -1, "Views"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-  pGridSizer->Add (m_pTextCtrlNView, 0, wxALIGN_CENTER_VERTICAL);
+  pText1Sizer->Add (new wxStaticText (this, -1, "Views"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+  pText1Sizer->Add (m_pTextCtrlNView, 0, wxALIGN_CENTER_VERTICAL);
   std::ostringstream osNSamples;
   osNSamples << iDefaultNSamples;
   m_pTextCtrlNSamples = new wxTextCtrl (this, -1, osNSamples.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
-  pGridSizer->Add (new wxStaticText (this, -1, "Samples per Detector"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-  pGridSizer->Add (m_pTextCtrlNSamples, 0, wxALIGN_CENTER_VERTICAL);
-  if (theApp->getAdvancedOptions()) {
-    std::ostringstream osRotAngle;
-    osRotAngle << dDefaultRotAngle;
-    m_pTextCtrlRotAngle = new wxTextCtrl (this, -1, osRotAngle.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
-    pGridSizer->Add (new wxStaticText (this, -1, "Rotation Angle (PI units)"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-    pGridSizer->Add (m_pTextCtrlRotAngle, 0, wxALIGN_CENTER_VERTICAL);
-  }
-  std::ostringstream osFocalLength;
-  osFocalLength << dDefaultFocalLength;
-  m_pTextCtrlFocalLength = new wxTextCtrl (this, -1, osFocalLength.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
-  pGridSizer->Add (new wxStaticText (this, -1, "Focal Length Ratio"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-  pGridSizer->Add (m_pTextCtrlFocalLength, 0, wxALIGN_CENTER_VERTICAL);
+  pText1Sizer->Add (new wxStaticText (this, -1, "Samples per Detector"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+  pText1Sizer->Add (m_pTextCtrlNSamples, 0, wxALIGN_CENTER_VERTICAL);
+
+  pGridSizer->Add (pText1Sizer);
+
+  wxFlexGridSizer* pText2Sizer = new wxFlexGridSizer(2);
   std::ostringstream osViewRatio;
   osViewRatio << dDefaultViewRatio;
   m_pTextCtrlViewRatio = new wxTextCtrl (this, -1, osViewRatio.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
-  pGridSizer->Add (new wxStaticText (this, -1, "View Ratio"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-  pGridSizer->Add (m_pTextCtrlViewRatio, 0, wxALIGN_CENTER_VERTICAL);
+  pText2Sizer->Add (new wxStaticText (this, -1, "View Ratio"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+  pText2Sizer->Add (m_pTextCtrlViewRatio, 0, wxALIGN_CENTER_VERTICAL);
   std::ostringstream osScanRatio;
   osScanRatio << dDefaultScanRatio;
   m_pTextCtrlScanRatio = new wxTextCtrl (this, -1, osScanRatio.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
-  pGridSizer->Add (new wxStaticText (this, -1, "Scan Ratio"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-  pGridSizer->Add (m_pTextCtrlScanRatio, 0, wxALIGN_CENTER_VERTICAL);
-  
-  m_pListBoxTrace = new StringValueAndTitleListBox (this, Trace::getTraceCount(), Trace::getTraceTitleArray(), Trace::getTraceNameArray());
-  m_pListBoxTrace->SetSelection (iDefaultTrace);
+  pText2Sizer->Add (new wxStaticText (this, -1, "Scan Ratio"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+  pText2Sizer->Add (m_pTextCtrlScanRatio, 0, wxALIGN_CENTER_VERTICAL);
+  std::ostringstream osFocalLength;
+  osFocalLength << dDefaultFocalLength;
+  m_pTextCtrlFocalLength = new wxTextCtrl (this, -1, osFocalLength.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
+  pText2Sizer->Add (new wxStaticText (this, -1, "Focal Length Ratio"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+  pText2Sizer->Add (m_pTextCtrlFocalLength, 0, wxALIGN_CENTER_VERTICAL);
   
-  pGridSizer->Add (new wxStaticText (this, -1, "Trace Level"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-  pGridSizer->Add (m_pListBoxTrace, 0, wxALL | wxALIGN_CENTER | wxEXPAND);
+  if (theApp->getAdvancedOptions()) {
+    std::ostringstream osRotAngle;
+    osRotAngle << dDefaultRotAngle;
+    m_pTextCtrlRotAngle = new wxTextCtrl (this, -1, osRotAngle.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
+    pText2Sizer->Add (new wxStaticText (this, -1, "Rotation Angle (PI units)"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+    pText2Sizer->Add (m_pTextCtrlRotAngle, 0, wxALIGN_CENTER_VERTICAL);
+  }
+  pGridSizer->Add (pText2Sizer);
+
   pTopSizer->Add (pGridSizer, 1, wxALL, 10);
   
   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
@@ -674,7 +674,7 @@ DialogGetProjectionParameters::getRotAngle ()
     else
       return (m_dDefaultRotAngle);
   } else {
-    if (Scanner::convertGeometryNameToID (m_pListBoxGeometry->getSelectionStringValue()) == 
+    if (Scanner::convertGeometryNameToID (m_pRadioBoxGeometry->getSelectionStringValue()) == 
           Scanner::GEOMETRY_PARALLEL)
       return (PI);
     else
@@ -718,13 +718,13 @@ DialogGetProjectionParameters::getScanRatio ()
 const char*
 DialogGetProjectionParameters::getGeometry ()
 {
-  return m_pListBoxGeometry->getSelectionStringValue();
+  return m_pRadioBoxGeometry->getSelectionStringValue();
 }
 
 int
 DialogGetProjectionParameters::getTrace ()
 {
-  return Trace::convertTraceNameToID(m_pListBoxTrace->getSelectionStringValue());
+  return Trace::convertTraceNameToID(m_pRadioBoxTrace->getSelectionStringValue());
 }
 
 
@@ -737,7 +737,7 @@ DialogGetProjectionParameters::getTrace ()
 
 
 DialogGetReconstructionParameters::DialogGetReconstructionParameters (wxWindow* pParent, int iDefaultXSize, 
-                     int iDefaultYSize, int iDefaultFilterID, double dDefaultFilterParam,  
+                     int iDefaultYSize, int iDefaultFilterID, double dDefaultHammingParam,  
                      int iDefaultFilterMethodID, int iDefaultFilterGenerationID, int iDefaultZeropad, 
                      int iDefaultInterpID, int iDefaultInterpParam, int iDefaultBackprojectID, int iTrace)
 : wxDialog (pParent, -1, "Set Reconstruction Parameters", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
@@ -745,73 +745,72 @@ DialogGetReconstructionParameters::DialogGetReconstructionParameters (wxWindow*
   wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
   
   pTopSizer->Add (new wxStaticText (this, -1, "Set Reconstruction Parameters"), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
-  
   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
   
-  wxFlexGridSizer* pGridSizer = new wxFlexGridSizer (6);
-  pGridSizer->Add (new wxStaticText (this, -1, "Filter"), 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, 5);
+  wxFlexGridSizer* pGridSizer = NULL;
+  if (theApp->getAdvancedOptions())
+    pGridSizer = new wxFlexGridSizer (4);
+  else
+    pGridSizer = new wxFlexGridSizer (3);
 
   if (theApp->getAdvancedOptions())
-    m_pListBoxFilter = new StringValueAndTitleListBox (this, SignalFilter::getFilterCount(), SignalFilter::getFilterTitleArray(), SignalFilter::getFilterNameArray());
+    m_pRadioBoxFilter = new StringValueAndTitleRadioBox (this, _T("Filter"), SignalFilter::getFilterCount(), SignalFilter::getFilterTitleArray(), SignalFilter::getFilterNameArray());
   else
-    m_pListBoxFilter = new StringValueAndTitleListBox (this, SignalFilter::getReconstructFilterCount(), SignalFilter::getFilterTitleArray(), SignalFilter::getFilterNameArray());
-  m_pListBoxFilter->SetSelection (iDefaultFilterID);
-  pGridSizer->Add (m_pListBoxFilter, 0, wxALL | wxALIGN_LEFT | wxEXPAND);
+    m_pRadioBoxFilter = new StringValueAndTitleRadioBox (this, _T("Filter"), SignalFilter::getReconstructFilterCount(), SignalFilter::getFilterTitleArray(), SignalFilter::getFilterNameArray());
+  m_pRadioBoxFilter->SetSelection (iDefaultFilterID);
+  pGridSizer->Add (m_pRadioBoxFilter, 0, wxALL | wxALIGN_LEFT | wxEXPAND);
   
-  m_pListBoxFilterMethod = new StringValueAndTitleListBox (this, ProcessSignal::getFilterMethodCount(), ProcessSignal::getFilterMethodTitleArray(), ProcessSignal::getFilterMethodNameArray());
-  m_pListBoxFilterMethod->SetSelection (iDefaultFilterMethodID);
-  pGridSizer->Add (new wxStaticText (this, -1, "Filter Method"), 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, 5);
-  pGridSizer->Add (m_pListBoxFilterMethod, 0, wxALL | wxALIGN_LEFT | wxEXPAND);
+  m_pRadioBoxFilterMethod = new StringValueAndTitleRadioBox (this, _T("Filter Method"), ProcessSignal::getFilterMethodCount(), ProcessSignal::getFilterMethodTitleArray(), ProcessSignal::getFilterMethodNameArray());
+  m_pRadioBoxFilterMethod->SetSelection (iDefaultFilterMethodID);
+  pGridSizer->Add (m_pRadioBoxFilterMethod, 0, wxALL | wxALIGN_LEFT | wxEXPAND);
   
   if (theApp->getAdvancedOptions()) {
-    m_pListBoxFilterGeneration = new StringValueAndTitleListBox (this, ProcessSignal::getFilterGenerationCount(), ProcessSignal::getFilterGenerationTitleArray(), ProcessSignal::getFilterGenerationNameArray());
-    m_pListBoxFilterGeneration->SetSelection (iDefaultFilterGenerationID);
-    pGridSizer->Add (new wxStaticText (this, -1, "Filter Generation"), 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, 5);
-    pGridSizer->Add (m_pListBoxFilterGeneration, 0, wxALL | wxALIGN_LEFT | wxEXPAND);
-  
-    m_pListBoxBackproject = new StringValueAndTitleListBox (this, Backprojector::getBackprojectCount(), Backprojector::getBackprojectTitleArray(), Backprojector::getBackprojectNameArray());
-    m_pListBoxBackproject->SetSelection (iDefaultBackprojectID);
-    pGridSizer->Add (new wxStaticText (this, -1, "Backprojection"), 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, 5);
-    pGridSizer->Add (m_pListBoxBackproject, 0, wxALL | wxALIGN_RIGHT | wxEXPAND);
+    m_pRadioBoxFilterGeneration = new StringValueAndTitleRadioBox (this, _T("Filter Generation"), ProcessSignal::getFilterGenerationCount(), ProcessSignal::getFilterGenerationTitleArray(), ProcessSignal::getFilterGenerationNameArray());
+    m_pRadioBoxFilterGeneration->SetSelection (iDefaultFilterGenerationID);
+    pGridSizer->Add (m_pRadioBoxFilterGeneration, 0, wxALL | wxALIGN_LEFT | wxEXPAND);
+  
+    m_pRadioBoxBackproject = new StringValueAndTitleRadioBox (this, _T("Backprojection"), Backprojector::getBackprojectCount(), Backprojector::getBackprojectTitleArray(), Backprojector::getBackprojectNameArray());
+    m_pRadioBoxBackproject->SetSelection (iDefaultBackprojectID);
+    pGridSizer->Add (m_pRadioBoxBackproject, 0, wxALL | wxALIGN_RIGHT | wxEXPAND);
   }
 
-  m_pListBoxInterp = new StringValueAndTitleListBox (this, Backprojector::getInterpCount(), Backprojector::getInterpTitleArray(), Backprojector::getInterpNameArray());
-  m_pListBoxInterp->SetSelection (iDefaultInterpID);
-  pGridSizer->Add (new wxStaticText (this, -1, "Interpolation"), 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, 5);
-  pGridSizer->Add (m_pListBoxInterp, 0, wxALL | wxALIGN_RIGHT | wxEXPAND);
+  m_pRadioBoxInterp = new StringValueAndTitleRadioBox (this, _T("Interpolation"), Backprojector::getInterpCount(), Backprojector::getInterpTitleArray(), Backprojector::getInterpNameArray());
+  m_pRadioBoxInterp->SetSelection (iDefaultInterpID);
+  pGridSizer->Add (m_pRadioBoxInterp, 0, wxALL | wxALIGN_RIGHT | wxEXPAND);
   
-  
-  pGridSizer->Add (new wxStaticText (this, -1, "Trace Level"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
   static const char* aszTraceTitle[] = {"None", "Full"};
   static const char* aszTraceName[] = {"none", "full"};
-  m_pListBoxTrace = new StringValueAndTitleListBox (this, 2, aszTraceTitle, aszTraceName);
+  m_pRadioBoxTrace = new StringValueAndTitleRadioBox (this, _T("Trace Level"), 2, aszTraceTitle, aszTraceName);
   iTrace = clamp(iTrace, 0, 1);
-  m_pListBoxTrace->SetSelection (iTrace);
-  pGridSizer->Add (m_pListBoxTrace);
-  
-  std::ostringstream osHammingParam;
-  osHammingParam << dDefaultFilterParam;
-  m_pTextCtrlFilterParam = new wxTextCtrl (this, -1, osHammingParam.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
-  pGridSizer->Add (new wxStaticText (this, -1, "Hamming Parameter"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-  pGridSizer->Add (m_pTextCtrlFilterParam, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
+  m_pRadioBoxTrace->SetSelection (iTrace);
+  pGridSizer->Add (m_pRadioBoxTrace);
+
+  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);
-  pGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-  pGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
+  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);
-  pGridSizer->Add (new wxStaticText (this, -1, "Y Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-  pGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
+  pTextGridSizer->Add (new wxStaticText (this, -1, "Y Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+  pTextGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
+
+  std::ostringstream osHammingParam;
+  osHammingParam << dDefaultHammingParam;
+  m_pTextCtrlFilterParam = new wxTextCtrl (this, -1, osHammingParam.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
+  pTextGridSizer->Add (new wxStaticText (this, -1, "Hamming Parameter"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+  pTextGridSizer->Add (m_pTextCtrlFilterParam, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
 
   if (theApp->getAdvancedOptions()) {
     std::ostringstream osZeropad;
     osZeropad << iDefaultZeropad;
     m_pTextCtrlZeropad = new wxTextCtrl (this, -1, osZeropad.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
-    pGridSizer->Add (new wxStaticText (this, -1, "Zeropad"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-    pGridSizer->Add (m_pTextCtrlZeropad, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
+    pTextGridSizer->Add (new wxStaticText (this, -1, "Zeropad"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+    pTextGridSizer->Add (m_pTextCtrlZeropad, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
   }
+  pGridSizer->Add (pTextGridSizer);
 
 #if HAVE_FREQ_PREINTERP
   std::ostringstream osInterpParam;
@@ -911,26 +910,26 @@ DialogGetReconstructionParameters::getFilterParam ()
 const char*
 DialogGetReconstructionParameters::getFilterName ()
 {
-  return m_pListBoxFilter->getSelectionStringValue();
+  return m_pRadioBoxFilter->getSelectionStringValue();
 }
 
 const char*
 DialogGetReconstructionParameters::getFilterMethodName ()
 {
-  return m_pListBoxFilterMethod->getSelectionStringValue();
+  return m_pRadioBoxFilterMethod->getSelectionStringValue();
 }
 
 const char*
 DialogGetReconstructionParameters::getInterpName ()
 {
-  return m_pListBoxInterp->getSelectionStringValue();
+  return m_pRadioBoxInterp->getSelectionStringValue();
 }
 
 int
 DialogGetReconstructionParameters::getTrace ()
 {
   int iTrace = 0;
-  if (strcmp("full", m_pListBoxTrace->getSelectionStringValue()) == 0)
+  if (strcmp("full", m_pRadioBoxTrace->getSelectionStringValue()) == 0)
     iTrace = Trace::TRACE_PLOT;
   return iTrace;
 }
@@ -939,7 +938,7 @@ const char*
 DialogGetReconstructionParameters::getBackprojectName ()
 {
   if (theApp->getAdvancedOptions()) {
-    return m_pListBoxBackproject->getSelectionStringValue();
+    return m_pRadioBoxBackproject->getSelectionStringValue();
   } else
     return "idiff";
 }
@@ -948,9 +947,9 @@ const char*
 DialogGetReconstructionParameters::getFilterGenerationName ()
 {
   if (theApp->getAdvancedOptions()) {
-    return m_pListBoxFilterGeneration->getSelectionStringValue();
+    return m_pRadioBoxFilterGeneration->getSelectionStringValue();
   } else {
-    if (ProcessSignal::convertFilterMethodNameToID(m_pListBoxFilterMethod->getSelectionStringValue())
+    if (ProcessSignal::convertFilterMethodNameToID(m_pRadioBoxFilterMethod->getSelectionStringValue())
         == ProcessSignal::FILTER_METHOD_CONVOLUTION)
       return "direct";
     else
@@ -972,50 +971,52 @@ DialogGetFilterParameters::DialogGetFilterParameters (wxWindow* pParent, int iDe
 {
   wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
   
-  pTopSizer->Add (new wxStaticText (this, -1, "Set Filter Parameters"), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
-  
+  pTopSizer->Add (new wxStaticText (this, -1, "Set Filter Parameters"), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5); 
   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
   
+  wxFlexGridSizer* pGridSizer = new wxFlexGridSizer (2);
+
+  m_pRadioBoxFilter = new StringValueAndTitleRadioBox (this, _T("Filter"), SignalFilter::getFilterCount(), SignalFilter::getFilterTitleArray(), SignalFilter::getFilterNameArray());
+  m_pRadioBoxFilter->SetSelection (iDefaultFilterID);
+  pGridSizer->Add (m_pRadioBoxFilter, 0, wxALL | wxALIGN_LEFT | wxEXPAND);
+  
+  m_pRadioBoxDomain = new StringValueAndTitleRadioBox (this, _T("Domain"), SignalFilter::getDomainCount(), SignalFilter::getDomainTitleArray(), SignalFilter::getDomainNameArray());
+  m_pRadioBoxDomain->SetSelection (iDefaultDomainID);
+  pGridSizer->Add (m_pRadioBoxDomain, 0, wxALL | wxALIGN_LEFT | wxEXPAND);
+  
   std::ostringstream os;
   os << iDefaultXSize;
   m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
+  pGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+  pGridSizer->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);
+  pGridSizer->Add (new wxStaticText (this, -1, "Y Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+  pGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
+
   std::ostringstream osFilterParam;
   osFilterParam << dDefaultFilterParam;
   m_pTextCtrlFilterParam = new wxTextCtrl (this, -1, osFilterParam.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
+  pGridSizer->Add (new wxStaticText (this, -1, "Filter Parameter"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+  pGridSizer->Add (m_pTextCtrlFilterParam, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
+
   std::ostringstream osBandwidth;
   osBandwidth << dDefaultBandwidth;
   m_pTextCtrlBandwidth = new wxTextCtrl (this, -1, osBandwidth.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
+  pGridSizer->Add (new wxStaticText (this, -1, "Bandwidth"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+  pGridSizer->Add (m_pTextCtrlBandwidth, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
+
   std::ostringstream osInputScale;
   osInputScale << dDefaultInputScale;
   m_pTextCtrlInputScale = new wxTextCtrl (this, -1, osInputScale.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
+  pGridSizer->Add (new wxStaticText (this, -1, "Axis (input) Scale"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+  pGridSizer->Add (m_pTextCtrlInputScale, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
+
   std::ostringstream osOutputScale;
   osOutputScale << dDefaultOutputScale;
   m_pTextCtrlOutputScale = new wxTextCtrl (this, -1, osOutputScale.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
-  
-  wxFlexGridSizer* pGridSizer = new wxFlexGridSizer (2);
-  pGridSizer->Add (new wxStaticText (this, -1, "Filter"), 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, 5);
-  m_pListBoxFilter = new StringValueAndTitleListBox (this, SignalFilter::getFilterCount(), SignalFilter::getFilterTitleArray(), SignalFilter::getFilterNameArray());
-  m_pListBoxFilter->SetSelection (iDefaultFilterID);
-  pGridSizer->Add (m_pListBoxFilter, 0, wxALL | wxALIGN_LEFT | wxEXPAND);
-  
-  m_pListBoxDomain = new StringValueAndTitleListBox (this, SignalFilter::getDomainCount(), SignalFilter::getDomainTitleArray(), SignalFilter::getDomainNameArray());
-  m_pListBoxDomain->SetSelection (iDefaultDomainID);
-  pGridSizer->Add (new wxStaticText (this, -1, "Domain"), 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, 5);
-  pGridSizer->Add (m_pListBoxDomain, 0, wxALL | wxALIGN_LEFT | wxEXPAND);
-  
-  pGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-  pGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
-  pGridSizer->Add (new wxStaticText (this, -1, "Y Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-  pGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
-  pGridSizer->Add (new wxStaticText (this, -1, "Filter Parameter"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-  pGridSizer->Add (m_pTextCtrlFilterParam, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
-  pGridSizer->Add (new wxStaticText (this, -1, "Bandwidth"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-  pGridSizer->Add (m_pTextCtrlBandwidth, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
-  pGridSizer->Add (new wxStaticText (this, -1, "Axis (input) Scale"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-  pGridSizer->Add (m_pTextCtrlInputScale, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
   pGridSizer->Add (new wxStaticText (this, -1, "Filter Output Scale"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
   pGridSizer->Add (m_pTextCtrlOutputScale, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
   
@@ -1112,13 +1113,13 @@ DialogGetFilterParameters::getOutputScale ()
 const char*
 DialogGetFilterParameters::getFilterName ()
 {
-  return m_pListBoxFilter->getSelectionStringValue();
+  return m_pRadioBoxFilter->getSelectionStringValue();
 }
 
 const char*
 DialogGetFilterParameters::getDomainName ()
 {
-  return m_pListBoxDomain->getSelectionStringValue();
+  return m_pRadioBoxDomain->getSelectionStringValue();
 }
 
 
@@ -1136,9 +1137,9 @@ DialogExportParameters::DialogExportParameters (wxWindow* pParent, int iDefaultF
   
   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxALL, 5);
   
-  m_pListBoxFormat = new StringValueAndTitleListBox (this, ImageFile::getFormatCount(), ImageFile::getFormatTitleArray(), ImageFile::getFormatNameArray());
-  m_pListBoxFormat->SetSelection (iDefaultFormatID);
-  pTopSizer->Add (m_pListBoxFormat, 0, wxALL | wxALIGN_CENTER | wxEXPAND);
+  m_pRadioBoxFormat = new StringValueAndTitleRadioBox (this, _T("Export Type"), ImageFile::getFormatCount(), ImageFile::getFormatTitleArray(), ImageFile::getFormatNameArray());
+  m_pRadioBoxFormat->SetSelection (iDefaultFormatID);
+  pTopSizer->Add (m_pRadioBoxFormat, 0, wxALL | wxALIGN_CENTER | wxEXPAND);
   
   pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
   
@@ -1159,7 +1160,7 @@ DialogExportParameters::DialogExportParameters (wxWindow* pParent, int iDefaultF
 const char*
 DialogExportParameters::getFormatName()
 {
-  return m_pListBoxFormat->getSelectionStringValue();
+  return m_pRadioBoxFormat->getSelectionStringValue();
 }
 
 
@@ -1266,10 +1267,9 @@ DialogGetConvertPolarParameters::DialogGetConvertPolarParameters (wxWindow* pPar
   
   wxFlexGridSizer* pGridSizer = new wxFlexGridSizer (2);
   
-  m_pListBoxInterpolation = new StringValueAndTitleListBox (this, Projections::getInterpCount(), Projections::getInterpTitleArray(), Projections::getInterpNameArray());
-  m_pListBoxInterpolation->SetSelection (iDefaultInterpolationID);
-  pGridSizer->Add (new wxStaticText (this, -1, "Interpolation"), 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, 5);
-  pGridSizer->Add (m_pListBoxInterpolation, 0, wxALL | wxALIGN_LEFT | wxEXPAND);
+  m_pRadioBoxInterpolation = new StringValueAndTitleRadioBox (this, _T("Interpolation"), Projections::getInterpCount(), Projections::getInterpTitleArray(), Projections::getInterpNameArray());
+  m_pRadioBoxInterpolation->SetSelection (iDefaultInterpolationID);
+  pGridSizer->Add (m_pRadioBoxInterpolation, 0, wxALL | wxALIGN_LEFT | wxEXPAND);
   
   pGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
   pGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
@@ -1344,6 +1344,6 @@ DialogGetConvertPolarParameters::getZeropad ()
 const char*
 DialogGetConvertPolarParameters::getInterpolationName ()
 {
-  return m_pListBoxInterpolation->getSelectionStringValue();
+  return m_pRadioBoxInterpolation->getSelectionStringValue();
 }
 
index 92ba70ce67f9a5b256c19e2ebb45dbb4b8d20aec..0bb051043e71e45e96e2d748ab7ddbc960a94362 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: dialogs.h,v 1.25 2001/02/11 21:57:08 kevin Exp $
+**  $Id: dialogs.h,v 1.26 2001/02/14 18:39:47 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
@@ -56,6 +56,18 @@ class StringValueAndTitleListBox : public wxListBox
 };
 
 
+class StringValueAndTitleRadioBox : public wxRadioBox
+{
+ public:
+  StringValueAndTitleRadioBox (wxDialog* pParent, const wxString& strTitle, int nChoices, const char* aszTitle[], const char* aszValue[]);
+
+  const char* getSelectionStringValue () const;
+
+ private:
+  const char** m_ppszValues;
+};
+
+
 class DialogGetPhantom : public wxDialog
 {
  public:
@@ -65,7 +77,7 @@ class DialogGetPhantom : public wxDialog
     const char* getPhantom ();
 
  private:
-    StringValueAndTitleListBox* m_pListBoxPhantom;
+    StringValueAndTitleRadioBox* m_pRadioBoxPhantom;
 };
 
 
@@ -175,8 +187,8 @@ class DialogGetProjectionParameters : public wxDialog
     wxTextCtrl* m_pTextCtrlFocalLength;
     wxTextCtrl* m_pTextCtrlViewRatio;
     wxTextCtrl* m_pTextCtrlScanRatio;
-    StringValueAndTitleListBox* m_pListBoxGeometry;
-    StringValueAndTitleListBox* m_pListBoxTrace;
+    StringValueAndTitleRadioBox* m_pRadioBoxGeometry;
+    StringValueAndTitleRadioBox* m_pRadioBoxTrace;
 
     int m_iDefaultNDet;
     int m_iDefaultNView;
@@ -222,12 +234,12 @@ class DialogGetReconstructionParameters : public wxDialog
     wxTextCtrl* m_pTextCtrlFilterParam;
     wxTextCtrl* m_pTextCtrlInterpParam;
 
-    StringValueAndTitleListBox* m_pListBoxFilter;
-    StringValueAndTitleListBox* m_pListBoxFilterMethod;
-    StringValueAndTitleListBox* m_pListBoxFilterGeneration;
-    StringValueAndTitleListBox* m_pListBoxInterp;
-    StringValueAndTitleListBox* m_pListBoxBackproject;
-    StringValueAndTitleListBox* m_pListBoxTrace;
+    StringValueAndTitleRadioBox* m_pRadioBoxFilter;
+    StringValueAndTitleRadioBox* m_pRadioBoxFilterMethod;
+    StringValueAndTitleRadioBox* m_pRadioBoxFilterGeneration;
+    StringValueAndTitleRadioBox* m_pRadioBoxInterp;
+    StringValueAndTitleRadioBox* m_pRadioBoxBackproject;
+    StringValueAndTitleRadioBox* m_pRadioBoxTrace;
 
     int m_iDefaultXSize;
     int m_iDefaultYSize;
@@ -261,8 +273,8 @@ class DialogGetFilterParameters : public wxDialog
     wxTextCtrl* m_pTextCtrlInputScale;
     wxTextCtrl* m_pTextCtrlBandwidth;
 
-    StringValueAndTitleListBox* m_pListBoxFilter;
-    StringValueAndTitleListBox* m_pListBoxDomain;
+    StringValueAndTitleRadioBox* m_pRadioBoxFilter;
+    StringValueAndTitleRadioBox* m_pRadioBoxDomain;
 
     int m_iDefaultXSize;
     int m_iDefaultYSize;
@@ -282,7 +294,7 @@ class DialogExportParameters : public wxDialog
     const char* getFormatName();
 
  private:
-    StringValueAndTitleListBox* m_pListBoxFormat;
+    StringValueAndTitleRadioBox* m_pRadioBoxFormat;
 };
 
 class DialogAutoScaleParameters : public wxDialog
@@ -301,7 +313,7 @@ class DialogAutoScaleParameters : public wxDialog
        const double m_dStdDev;
 
     wxTextCtrl* m_pTextCtrlStdDevFactor;
-    wxListBox* m_pListBoxCenter;
+    wxRadioBox* m_pRadioBoxCenter;
 };
 
 class DialogGetXYSize : public wxDialog
@@ -340,7 +352,7 @@ class DialogGetConvertPolarParameters : public wxDialog
     wxTextCtrl* m_pTextCtrlYSize;
     wxTextCtrl* m_pTextCtrlZeropad;
 
-    StringValueAndTitleListBox* m_pListBoxInterpolation;
+    StringValueAndTitleRadioBox* m_pRadioBoxInterpolation;
 
     int m_iDefaultXSize;
     int m_iDefaultYSize;
index 2743605f22dc2be82f6d1349a21062766f7b4de2..a9b97815d62e2e72ae9ab39b66c38c570165421b 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: views.cpp,v 1.103 2001/02/11 21:57:08 kevin Exp $
+**  $Id: views.cpp,v 1.104 2001/02/14 18:39:47 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
@@ -844,7 +844,7 @@ ImageFileView::CreateChildFrame(wxDocument *doc, wxView *view)
   m_pFileMenu->Append(wxID_PREVIEW, "Print Preview");
 #ifdef CTSIM_MDI
   m_pFileMenu->AppendSeparator();
-  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, "Pr&eferences...");
+  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, "Prefere&nces...");
   m_pFileMenu->Append(MAINMENU_FILE_EXIT, "E&xit");
 #endif
   GetDocumentManager()->FileHistoryAddFilesToMenu(m_pFileMenu);
@@ -2079,7 +2079,7 @@ PhantomFileView::CreateChildFrame(wxDocument *doc, wxView *view)
   m_pFileMenu->Append(wxID_PREVIEW, "Print Pre&view");
 #ifdef CTSIM_MDI
   m_pFileMenu->AppendSeparator();
-  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, "Pr&eferences...");
+  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, "Prefere&nces...");
   m_pFileMenu->Append(MAINMENU_FILE_EXIT, "E&xit");
 #endif
   GetDocumentManager()->FileHistoryAddFilesToMenu(m_pFileMenu);
@@ -2494,7 +2494,7 @@ ProjectionFileView::CreateChildFrame(wxDocument *doc, wxView *view)
   m_pFileMenu->Append(wxID_PREVIEW, "Print Pre&view");
 #ifdef CTSIM_MDI
   m_pFileMenu->AppendSeparator();
-  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, "Pr&eferences...");
+  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, "Prefere&nces...");
   m_pFileMenu->Append(MAINMENU_FILE_EXIT, "E&xit");
 #endif
   GetDocumentManager()->FileHistoryAddFilesToMenu(m_pFileMenu);
@@ -2825,7 +2825,7 @@ PlotFileView::CreateChildFrame(wxDocument *doc, wxView *view)
   m_pFileMenu->Append(wxID_PREVIEW, "Print Pre&view");
 #ifdef CTSIM_MDI
   m_pFileMenu->AppendSeparator();
-  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, "Pr&eferences...");
+  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, "Prefere&nces...");
   m_pFileMenu->Append(MAINMENU_FILE_EXIT, "E&xit");
 #endif
   GetDocumentManager()->FileHistoryAddFilesToMenu(m_pFileMenu);
@@ -3083,7 +3083,7 @@ TextFileView::CreateChildFrame (wxDocument *doc, wxView *view)
   m_pFileMenu->Append(wxID_PREVIEW, "Print Pre&view");
 #ifdef CTSIM_MDI
   m_pFileMenu->AppendSeparator();
-  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, "Pr&eferences...");
+  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, "Prefere&nces...");
   m_pFileMenu->Append(MAINMENU_FILE_EXIT, "E&xit");
 #endif
   GetDocumentManager()->FileHistoryAddFilesToMenu(m_pFileMenu);