1 /*!
2 	@file
3 	@author		Albert Semenov
4 	@date		08/2010
5 */
6 
7 #ifndef _a64ca567_5ede_4f68_bc3d_2cc6a37a3863_
8 #define _a64ca567_5ede_4f68_bc3d_2cc6a37a3863_
9 
10 #include <MyGUI.h>
11 #include "HotKeyCommand.h"
12 
13 namespace tools
14 {
15 
16 	class MYGUI_EXPORT_DLL HotKeyManager :
17 		public MyGUI::Singleton<HotKeyManager>
18 	{
19 	public:
20 		HotKeyManager();
21 		virtual ~HotKeyManager();
22 
23 		void initialise();
24 		void shutdown();
25 
26 		bool onKeyEvent(bool _pressed, bool _shift, bool _control, MyGUI::KeyCode _key);
27 
28 	private:
29 		void loadXml(MyGUI::xml::ElementPtr _node, const std::string& _file, MyGUI::Version _version);
30 
31 		void addCommand(HotKeyCommand& _command);
32 
33 	private:
34 		typedef std::map<std::string, MyGUI::KeyCode> MapKeys;
35 		MapKeys mKeyNames;
36 
37 		typedef std::vector<HotKeyCommand> VectorCommand;
38 		typedef std::map<MyGUI::KeyCode, VectorCommand> MapCommand;
39 		MapCommand mCommands;
40 	};
41 
42 }
43 
44 #endif
45