** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: dialogs.cpp,v 1.15 2000/12/16 06:12:47 kevin Exp $
+** $Id: dialogs.cpp,v 1.17 2000/12/17 19:30:02 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 "wx/statline.h"
#include "wx/sizer.h"
#include "dialogs.h"
-#include <sstream>
#include "ctsupport.h"
#include "ctsim.h"
#include "scanner.h"
#include "filter.h"
#include "backprojectors.h"
+#if defined(MSVC) || HAVE_SSTREAM\r
+#include <sstream>\r
+#else\r
+#include <sstream_subst>\r
+#endif\r
+\r
StringValueAndTitleListBox::StringValueAndTitleListBox (wxDialog* pParent, int nChoices, const char* aszTitle[], const char* aszValue[])
: wxListBox ()
osInterpParam << iDefaultInterpParam;
m_pTextCtrlInterpParam = new wxTextCtrl (this, -1, osInterpParam.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
- wxFlexGridSizer* pGridSizer = new wxFlexGridSizer (2);
+ wxFlexGridSizer* pGridSizer = new wxFlexGridSizer (6);
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);
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);
-
+\r
+
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_pListBoxInterp, 0, wxALL | wxALIGN_RIGHT | wxEXPAND);
+ pGridSizer->Add (new wxStaticText (this, -1, "Trace Level"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);\r
+ static const char* aszTraceTitle[] = {"None", "Full"};\r
+ static const char* aszTraceName[] = {"none", "full"};\r
+ m_pListBoxTrace = new StringValueAndTitleListBox (this, 2, aszTraceTitle, aszTraceName);\r
+ iTrace = clamp(iTrace, 0, 1);\r
+ m_pListBoxTrace->SetSelection (iTrace);\r
+ pGridSizer->Add (m_pListBoxTrace);\r
+\r
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 (new wxStaticText (this, -1, "Interpolation Parameter"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
pGridSizer->Add (m_pTextCtrlInterpParam, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
- 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);
- iTrace = clamp(iTrace, 0, 1);
- m_pListBoxTrace->SetSelection (iTrace);
- pGridSizer->Add (m_pListBoxTrace);
-
pTopSizer->Add (pGridSizer, 1, wxALL, 3);
pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);