00001 00011 #ifndef __CONFIGCANVAS__H__ 00012 #define __CONFIGCANVAS__H__ 00013 00014 #include "../common.h" 00015 #include "../tinyxml/tinyxml.h" 00016 #include "EditableInWindowConfig.h" 00017 00021 class ConfigCanvas: public EditableInWindowConfig { 00022 public: 00029 explicit ConfigCanvas(string name = DEFAULT_SIMULATION_NAME, 00030 int cellSize = DEFAULT_CELL_SIZE, long interval = DEFAULT_INTERVAL): 00031 startingCellSize(cellSize), startingInterval(interval), simulationName(name) {} 00032 00036 explicit ConfigCanvas(TiXmlElement * node); 00037 00041 virtual ~ConfigCanvas() {} 00042 00048 virtual void ShowEditationWindow(wxWindow * parent, bool waitUntilClosed = true); 00049 00053 virtual TiXmlElement * CreateXmlNode() const; 00054 00058 int GetCellSize() const { return startingCellSize; } 00059 00063 long GetInterval() const { return startingInterval; } 00064 00068 const string & GetSimulationName() const { return simulationName; } 00069 00074 void SetSimulationName(string newSimulationName) { 00075 simulationName = newSimulationName; 00076 } 00077 00078 private: 00080 int startingCellSize; 00082 long startingInterval; 00084 string simulationName; 00085 00087 static const int DEFAULT_CELL_SIZE = 32; 00089 static const long DEFAULT_INTERVAL = 500; 00091 static const string DEFAULT_SIMULATION_NAME; 00092 }; 00093 00094 #endif /* #ifndef __CONFIGCANVAS__H__ */ 00095 00096 /* End of file ConfigCanvas.h */