+\r
+///////////////////////////////////////////////////////////////////////\r
+// CLASS IMPLEMENTATION\r
+// DialogExportParameters\r
+///////////////////////////////////////////////////////////////////////\r
+\r
+DialogExportParameters::DialogExportParameters (wxFrame* pParent, int iDefaultFormatID)\r
+: wxDialog (pParent, -1, "Select ExportParameters", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)\r
+{\r
+ wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);\r
+ \r
+ pTopSizer->Add (new wxStaticText (this, -1, "Select Export Format"), 0, wxALIGN_CENTER | wxALL, 5);\r
+ \r
+ pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxALL, 5);\r
+ \r
+ m_pListBoxFormat = new StringValueAndTitleListBox (this, ImageFile::getFormatCount(), ImageFile::getFormatTitleArray(), ImageFile::getFormatNameArray());\r
+ m_pListBoxFormat->SetSelection (iDefaultFormatID);\r
+ pTopSizer->Add (m_pListBoxFormat, 0, wxALL | wxALIGN_CENTER | wxEXPAND);\r
+ \r
+ pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);\r
+ \r
+ wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);\r
+ wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");\r
+ wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");\r
+ pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);\r
+ pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);\r
+ \r
+ pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);\r
+ \r
+ SetAutoLayout (true);\r
+ SetSizer (pTopSizer);\r
+ pTopSizer->Fit (this);\r
+ pTopSizer->SetSizeHints (this);\r
+}\r
+\r
+const char*\r
+DialogExportParameters::getFormatName(void)\r
+{\r
+ return m_pListBoxFormat->getSelectionStringValue();\r
+}\r
+\r
+\r
+/////////////////////////////////////////////////////////////////////\r
+// CLASS DiaglogGetXYSize Implementation\r
+/////////////////////////////////////////////////////////////////////\r
+\r
+DialogGetXYSize::DialogGetXYSize (wxFrame* pParent, const char* const pszTitle, int iDefaultXSize, int iDefaultYSize)\r
+: wxDialog (pParent, -1, pszTitle, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)\r
+{\r
+ m_iDefaultXSize = iDefaultXSize;\r
+ m_iDefaultYSize = iDefaultYSize;\r
+\r
+ wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);\r
+ \r
+ pTopSizer->Add (new wxStaticText (this, -1, pszTitle), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);\r
+ \r
+ pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);\r
+ \r
+ std::ostringstream os;\r
+ os << iDefaultXSize;\r
+ m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);\r
+ std::ostringstream osYSize;\r
+ osYSize << iDefaultYSize;\r
+ m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);\r
+ \r
+ wxFlexGridSizer *pGridSizer = new wxFlexGridSizer (2);\r
+ pGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);\r
+ pGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_CENTER_VERTICAL);\r
+ pGridSizer->Add (new wxStaticText (this, -1, "Y Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);\r
+ pGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_CENTER_VERTICAL);\r
+ pTopSizer->Add (pGridSizer, 1, wxALL, 10);\r
+ \r
+ pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);\r
+ \r
+ wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);\r
+ wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");\r
+ wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");\r
+ pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);\r
+ pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);\r
+ \r
+ pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);\r
+ \r
+ SetAutoLayout (true);\r
+ SetSizer (pTopSizer);\r
+ pTopSizer->Fit (this);\r
+ pTopSizer->SetSizeHints (this);\r
+}\r
+\r
+DialogGetXYSize::~DialogGetXYSize (void)\r
+{\r
+}\r
+\r
+unsigned int\r
+DialogGetXYSize::getXSize (void)\r
+{\r
+ wxString strCtrl = m_pTextCtrlXSize->GetValue();\r
+ long lValue;\r
+ if (strCtrl.ToLong (&lValue))\r
+ return lValue;\r
+ else\r
+ return (m_iDefaultXSize);\r
+}\r
+\r
+unsigned int\r
+DialogGetXYSize::getYSize (void)\r
+{\r
+ wxString strCtrl = m_pTextCtrlYSize->GetValue();\r
+ long lValue;\r
+ if (strCtrl.ToLong (&lValue))\r
+ return lValue;\r
+ else\r
+ return (m_iDefaultYSize);\r
+}\r
+\r