NewSimulationDialog.h

Go to the documentation of this file.
00001 
00011 #ifndef __NEWSIMULATIONDIALOG__H__
00012 #define __NEWSIMULATIONDIALOG__H__
00013 
00014 #include <wx/wx.h>
00015 #include <wx/spinctrl.h>
00016 
00017 #include "../common.h"
00018 #include "../Conversions.h"
00019 #include "../Matrix.h"
00020 
00021 // A part of the GUI
00022 namespace GUI {
00023 
00029 class NewSimulationDialog: public wxDialog {
00030 public:
00031         // Handlers
00032         void OnOkButton(wxCommandEvent & event);
00033         void OnCancelButton(wxCommandEvent & event);
00034 
00035         DECLARE_EVENT_TABLE()
00036 
00037 public:
00042         NewSimulationDialog(wxWindow * parent);
00043 
00047         virtual ~NewSimulationDialog();
00048 
00049 
00053         string GetSimulationName() const {
00054                 assert(simulationName != 0);
00055                 return Conversions::wxString2string(simulationName->GetValue());
00056         }
00057 
00061         Matrix::SizeType GetSceneWidth() const {
00062                 assert(sceneWidth != 0);
00063                 return sceneWidth->GetValue();
00064         }
00065 
00069         Matrix::SizeType GetSceneHeight() const {
00070                 assert(sceneHeight != 0);
00071                 return sceneHeight->GetValue();
00072         }
00073 
00074 private:
00078         void CreateBasicForm();
00079 
00083         void CreateSceneSpins();
00084 
00088         void CreateButtons();
00089 
00090 private:
00092         wxBoxSizer * sizerTop;
00094         wxGridSizer * gridSizer;
00096         wxTextCtrl * simulationName;
00098         wxSpinCtrl * sceneWidth;
00100         wxSpinCtrl * sceneHeight;
00101 
00102         // Size constants
00103         static const int GRIDER_BASIC_FORM_COLS = 2;
00104         static const int MAIN_SIZER_BORDER_SIZE = 5;
00105         static const wxSize FORM_TEXT_BOX_SIZE;
00106 };
00107 
00108 } /* namespace GUI */
00109 
00110 #endif /* #ifndef __NEWSIMULATIONDIALOG__H__ */
00111 
00112 /* End of file NewSimulationDialog.h */

Generated on Sun Apr 29 11:46:10 2007 for IPP/ICP2007 by  doxygen 1.4.7