1 /*! 2 @file 3 @author Albert Semenov 4 @date 08/2010 5 */ 6 7 #ifndef _c51113dc_3e4d_4f5c_8ef4_7521ea4edfb3_ 8 #define _c51113dc_3e4d_4f5c_8ef4_7521ea4edfb3_ 9 10 #include <MyGUI.h> 11 12 namespace tools 13 { 14 15 class MYGUI_EXPORT_DLL HotKeyCommand 16 { 17 public: HotKeyCommand()18 HotKeyCommand() : 19 mPressed(true), 20 mShift(false), 21 mControl(false), 22 mKey(MyGUI::KeyCode::None) 23 { 24 } 25 getPressed()26 bool getPressed() const 27 { 28 return mPressed; 29 } setPressed(bool _value)30 void setPressed(bool _value) 31 { 32 mPressed = _value; 33 } 34 getShift()35 bool getShift() const 36 { 37 return mShift; 38 } setShift(bool _value)39 void setShift(bool _value) 40 { 41 mShift = _value; 42 } 43 getControl()44 bool getControl() const 45 { 46 return mControl; 47 } setControl(bool _value)48 void setControl(bool _value) 49 { 50 mControl = _value; 51 } 52 getKey()53 MyGUI::KeyCode getKey() const 54 { 55 return mKey; 56 } setKey(MyGUI::KeyCode _value)57 void setKey(MyGUI::KeyCode _value) 58 { 59 mKey = _value; 60 } 61 getCommand()62 const MyGUI::UString& getCommand() const 63 { 64 return mCommand; 65 } setCommand(const MyGUI::UString & _value)66 void setCommand(const MyGUI::UString& _value) 67 { 68 mCommand = _value; 69 } 70 71 private: 72 bool mPressed; 73 bool mShift; 74 bool mControl; 75 MyGUI::KeyCode mKey; 76 MyGUI::UString mCommand; 77 }; 78 79 } 80 81 #endif 82