00001
00011 #ifndef __CONFIGAPPLICATION__H__
00012 #define __CONFIGAPPLICATION__H__
00013
00014 #include "../common.h"
00015 #include "../tinyxml/tinyxml.h"
00016 #include "EditableInWindowConfig.h"
00017
00021 class ConfigApplication: public EditableInWindowConfig {
00022 public:
00024 typedef int WindowSize;
00025
00026 public:
00038 ConfigApplication(string pdp, string hfp, WindowSize width, WindowSize height,
00039 bool isToolbarShown, bool isStatusbarShown, bool isPaletteShown, bool isSpeedSliderShown):
00040 paletteDirectoryPath(pdp), helpFilePath(hfp), windowWidth(width), windowHeight(height),
00041 toolbarIsShown(isToolbarShown), statusbarIsShown(isStatusbarShown),
00042 paletteIsShown(isPaletteShown), speedSliderIsShown(isSpeedSliderShown)
00043 {}
00044
00048 explicit ConfigApplication(TiXmlElement * node);
00049
00053 ConfigApplication();
00054
00058 virtual ~ConfigApplication() {}
00059
00065 virtual void ShowEditationWindow(wxWindow * parent, bool waitUntilClosed = true);
00066
00070 virtual TiXmlElement * CreateXmlNode() const;
00071
00075 const string & GetPaletteDirectoryPath() const { return paletteDirectoryPath; }
00076
00081 void SetPaletteDirectoryPath(string newPalettePath) {
00082 paletteDirectoryPath = newPalettePath;
00083 }
00084
00088 const string & GetHelpFilePath() const { return helpFilePath; }
00089
00094 void SetHelpFilePath(string newHelpFilePath) {
00095 helpFilePath = newHelpFilePath;
00096 }
00097
00101 WindowSize GetWindowWidth() const { return windowWidth; }
00102
00106 WindowSize GetWindowHeight() const { return windowHeight; }
00107
00111 bool IsToolbarShown() const { return toolbarIsShown; }
00112
00116 bool IsStatusbarShown() const { return statusbarIsShown; }
00117
00121 bool IsPaletteShown() const { return paletteIsShown; }
00122
00126 bool IsSpeedSliderShown() const { return speedSliderIsShown; }
00127
00133 static string GetDefaultHelpPath() {
00134 return DEFAULT_HELP_PATH;
00135 }
00136
00142 static string GetDefaultAppConfigPath() {
00143 return DEFAULT_APP_CONFIG_PATH;
00144 }
00145
00146 private:
00148 string paletteDirectoryPath;
00150 string helpFilePath;
00152 WindowSize windowWidth;
00154 WindowSize windowHeight;
00156 bool toolbarIsShown;
00158 bool statusbarIsShown;
00160 bool paletteIsShown;
00162 bool speedSliderIsShown;
00163
00165 const static string DEFAULT_PALETTE_DIRECTORY;
00167 const static string DEFAULT_HELP_PATH;
00169 const static string DEFAULT_APP_CONFIG_PATH;
00171 static const WindowSize DEFAULT_WIDTH = 400;
00173 static const WindowSize DEFAULT_HEIGHT = 300;
00175 static const bool DEFAULT_TOOLBAR_VISIBILITY = true;
00177 static const bool DEFAULT_STATUSBAR_VISIBILITY = true;
00179 static const bool DEFAULT_PALETTE_VISIBILITY = true;
00181 static const bool DEFAULT_SPEEDSLIDER_VISIBILITY = true;
00182 };
00183
00184 #endif
00185
00186