00001 #ifndef __CKeyboardEvent__ 00002 #define __CKeyboardEvent__ 00003 00004 #include <Basics/CCountedObject.hpp> 00005 using Exponent::Basics::CCountedObject; 00006 00007 // =========================================================================== 00008 00009 namespace Exponent 00010 { 00011 namespace GUI 00012 { 00013 namespace Events 00014 { 00032 class CKeyboardEvent : public CCountedObject 00033 { 00035 EXPONENT_CLASS_DECLARATION; 00038 // =========================================================================== 00039 00040 public: 00041 00042 // =========================================================================== 00043 00047 CKeyboardEvent(); 00048 00052 virtual ~CKeyboardEvent(); 00053 00054 // =========================================================================== 00055 00060 void setKey(const char key); 00061 00066 char getKey() const; 00067 00074 void setModifiers(const bool shift, const bool alt, const bool ctrl); 00075 00080 bool isCtrlDown() const; 00081 00086 bool isShiftDown() const; 00087 00092 bool isAltDown() const; 00093 00094 // =========================================================================== 00095 00096 protected: 00097 00098 // =========================================================================== 00099 00100 char m_key; 00101 bool m_shiftIsDown; 00102 bool m_altIsDown; 00103 bool m_ctrlIsDown; 00106 }; 00107 } 00108 } 00109 } 00110 #endif // End of CKeyboardEvent.hpp