CrossFramework Library
|
00001 00006 #if defined(XBASE_INCLUDED_KEYBOARD_HPP) 00007 #else 00008 #define XBASE_INCLUDED_KEYBOARD_HPP 00009 00010 //------------------------------------------------------------ 00011 #include <XBase/KeyboardUpdateData.hpp> 00012 00013 //------------------------------------------------------------ 00014 namespace XBase { 00016 00017 00026 class Keyboard 00027 { 00028 public: 00030 00031 00032 Keyboard(); 00034 00036 00037 00038 void update( const KeyboardUpdateData& aData ); 00039 00041 const KeyboardUpdateData lastUpdateData()const; 00043 00045 00046 bool isHold( KeyKind aKind )const; 00047 bool isTrigger( KeyKind aKind )const; 00048 bool isRepeat( KeyKind aKind )const; 00049 bool isPulse( KeyKind aKind )const; 00050 bool isRelease( KeyKind aKind )const; 00051 00052 00054 00055 const KeyBitSet hold()const; 00056 const KeyBitSet trigger()const; 00057 const KeyBitSet repeat()const; 00058 const KeyBitSet pulse()const; 00059 const KeyBitSet release()const; 00060 00061 00062 private: 00063 KeyboardUpdateData mData; 00064 KeyBitSet mTrigger; 00065 KeyBitSet mRepeat; 00066 KeyBitSet mPulse; 00067 KeyBitSet mRelease; 00068 }; 00070 } 00071 //------------------------------------------------------------ 00072 #endif 00073 // EOF