X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=src%2Fdialogs.cpp;h=42fe44d8cff8e3006b970550fb7e83bfbbde2740;hp=d620b12f19f6aff22a825d0ae78835af3a549cab;hb=c358b8c8b5649f14e2b8203b999ba8549a244727;hpb=c953cbb6ffc2fd50e736230f4e6976a025983cff diff --git a/src/dialogs.cpp b/src/dialogs.cpp index d620b12..42fe44d 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.44 2001/03/01 07:30:49 kevin Exp $ +** $Id: dialogs.cpp,v 1.45 2001/03/01 20:02:18 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 @@ -1225,9 +1225,10 @@ DialogExportParameters::DialogExportParameters (wxWindow* pParent, int iDefaultF pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxALL, 5); - m_pRadioBoxFormat = new StringValueAndTitleRadioBox (this, _T("Export Type"), ImageFile::getFormatCount(), ImageFile::getFormatTitleArray(), ImageFile::getFormatNameArray()); + m_pRadioBoxFormat = new StringValueAndTitleRadioBox (this, _T("File Type"), + ImageFile::getExportFormatCount(), ImageFile::getExportFormatTitleArray(), ImageFile::getExportFormatNameArray()); m_pRadioBoxFormat->SetSelection (iDefaultFormatID); - pTopSizer->Add (m_pRadioBoxFormat, 0, wxALL | wxALIGN_CENTER | wxEXPAND); + pTopSizer->Add (m_pRadioBoxFormat, 0, wxALL | wxALIGN_CENTER); pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5); @@ -1255,6 +1256,51 @@ DialogExportParameters::getFormatName() } +/////////////////////////////////////////////////////////////////////// +// CLASS IMPLEMENTATION +// DialogImportParameters +/////////////////////////////////////////////////////////////////////// + +DialogImportParameters::DialogImportParameters (wxWindow* pParent, int iDefaultFormatID) +: wxDialog (pParent, -1, "Select ImportParameters", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION) +{ + wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL); + + pTopSizer->Add (new wxStaticText (this, -1, "Select Import Format"), 0, wxALIGN_CENTER | wxALL, 5); + + pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxALL, 5); + + m_pRadioBoxFormat = new StringValueAndTitleRadioBox (this, _T("File Type"), + ImageFile::getImportFormatCount(), ImageFile::getImportFormatTitleArray(), ImageFile::getImportFormatNameArray()); + m_pRadioBoxFormat->SetSelection (iDefaultFormatID); + pTopSizer->Add (m_pRadioBoxFormat, 0, wxALL | wxALIGN_CENTER); + + pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5); + + wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL); + wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay"); + pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10); + wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel"); + pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10); + CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_IMPORT); + pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10); + + pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER); + pButtonOk->SetDefault(); + + SetAutoLayout (true); + SetSizer (pTopSizer); + pTopSizer->Fit (this); + pTopSizer->SetSizeHints (this); +} + +const char* +DialogImportParameters::getFormatName() +{ + return m_pRadioBoxFormat->getSelectionStringValue(); +} + + ///////////////////////////////////////////////////////////////////// // CLASS DiaglogGetXYSize Implementation /////////////////////////////////////////////////////////////////////