1 /*!
2 	@file
3 	@author		Albert Semenov
4 	@date		08/2010
5 */
6 
7 #ifndef _e5a988fe_bba2_480f_a287_d5c967f58266_
8 #define _e5a988fe_bba2_480f_a287_d5c967f58266_
9 
10 #include "BaseManager.h"
11 #include "sigslot.h"
12 #include "Control.h"
13 
14 namespace tools
15 {
16 
17 	class Application :
18 		public base::BaseManager,
19 		public MyGUI::Singleton<Application>,
20 		public sigslot::has_slots<>
21 	{
22 	public:
23 		Application();
24 		virtual ~Application();
25 
26 		virtual void createScene();
27 		virtual void destroyScene();
28 
29 		virtual void onFileDrop(const std::wstring& _filename);
30 		virtual bool onWindowClose(size_t _handle);
31 		virtual void prepare();
32 
33 		typedef std::vector<std::wstring> VectorWString;
34 		const VectorWString& getParams();
35 
36 	protected:
37 		virtual void injectKeyPress(MyGUI::KeyCode _key, MyGUI::Char _text);
38 
39 		void command_ScreenShot(const MyGUI::UString& _commandName, bool& _result);
40 		void command_QuitApp(const MyGUI::UString& _commandName, bool& _result);
41 		void command_UpdateAppCaption(const MyGUI::UString& _commandName, bool& _result);
42 
43 	private:
44 		virtual void setupResources();
45 
46 		void saveSettings();
47 
48 		void LoadStates();
49 		void LoadGuiSettings();
50 
51 		void CreateControls();
52 		void DestroyControls();
53 
54 	private:
55 		std::string mLocale;
56 		VectorWString mParams;
57 		typedef std::vector<Control*> VectorControl;
58 		VectorControl mControls;
59 	};
60 
61 }
62 
63 #endif
64