00001 00011 #ifndef __EDITATIONWINDOWCANVAS__H__ 00012 #define __EDITATIONWINDOWCANVAS__H__ 00013 00014 #include <wx/wx.h> 00015 00016 #include "../common.h" 00017 #include "../Conversions.h" 00018 #include "../configs/ConfigCanvas.h" 00019 #include "../gui/EditationWindowBase.h" 00020 00021 // A part of the GUI 00022 namespace GUI { 00023 00027 class EditationWindowCanvas: public EditationWindowBase { 00029 enum { 00030 ID_SimulationName = 13000, 00031 ID_SimulationNameText, 00032 }; 00033 00034 public: 00035 // Event handlers 00036 virtual void OnOkButton(wxCommandEvent & event); 00037 00038 DECLARE_EVENT_TABLE() 00039 00040 public: 00047 EditationWindowCanvas(wxWindow * parent, 00048 ConfigCanvas & editedConfig, 00049 const string & windowTitle = "Simulation settings"); 00050 00051 protected: 00055 virtual void CreateBasicForm(); 00056 00061 virtual bool SaveConfig(); 00062 00066 string GetSimulationName() const { 00067 assert(simulationName != 0); 00068 return Conversions::wxString2string(simulationName->GetValue()); 00069 } 00070 00071 private: 00073 ConfigCanvas & config; 00074 00076 wxTextCtrl * simulationName; 00077 }; 00078 00079 } /* namespace GUI */ 00080 00081 #endif /* #ifndef __EDITATIONWINDOWCANVAS__H__ */ 00082 00083 /* End of file EditationWindowCanvas.h */