1 /*! 2 @file 3 @author Albert Semenov 4 @date 08/2010 5 */ 6 7 #ifndef _76731bb0_9d85_4b74_a603_1b3f5f6a8067_ 8 #define _76731bb0_9d85_4b74_a603_1b3f5f6a8067_ 9 10 #include <MyGUI.h> 11 #include "sigslot.h" 12 13 namespace tools 14 { 15 16 class MYGUI_EXPORT_DLL CommandManager : 17 public MyGUI::Singleton<CommandManager> 18 { 19 public: 20 void initialise(); 21 void shutdown(); 22 23 typedef sigslot::signal2<const MyGUI::UString&, bool&> EventType; 24 EventType* getEvent(const MyGUI::UString& _command); 25 26 bool executeCommand(const MyGUI::UString& _command); 27 28 void setCommandData(const MyGUI::UString& _data); 29 const MyGUI::UString& getCommandData() const; 30 31 private: 32 MyGUI::UString mData; 33 typedef std::map<MyGUI::UString, EventType*> MapEvent; 34 MapEvent mEvents; 35 }; 36 37 } 38 39 #endif 40