OIS
1.5
Object-oriented Input System
|
#include <OISKeyboard.h>
Public Types | |
enum | TextTranslationMode { Off, Unicode, Ascii } |
TextTranslation Mode. More... | |
enum | Modifier { Shift = 0x0000001, Ctrl = 0x0000010, Alt = 0x0000100, CapsLock = 0x0001000, NumLock = 0x0010000 } |
Enum of bit position of modifer. More... | |
Public Member Functions | |
virtual | ~Keyboard () |
virtual bool | isKeyDown (KeyCode key) const =0 |
virtual void | setEventCallback (KeyListener *keyListener) |
KeyListener * | getEventCallback () const |
virtual void | setTextTranslation (TextTranslationMode mode) |
TextTranslationMode | getTextTranslation () const |
virtual const std::string & | getAsString (KeyCode kc)=0 |
virtual OIS::KeyCode | getAsKeyCode (std::string str)=0 |
bool | isModifierDown (Modifier mod) const |
virtual void | copyKeyStates (char keys[256]) const =0 |
Public Member Functions inherited from OIS::Object | |
virtual | ~Object () |
Type | type () const |
const std::string & | vendor () const |
virtual bool | buffered () const |
InputManager * | getCreator () const |
virtual void | setBuffered (bool buffered)=0 |
virtual void | capture ()=0 |
virtual int | getID () const |
virtual Interface * | queryInterface (Interface::IType type)=0 |
virtual void | _initialize ()=0 |
Protected Member Functions | |
Keyboard (const std::string &vendor, bool buffered, int devID, InputManager *creator) | |
Protected Member Functions inherited from OIS::Object | |
Object (const std::string &vendor, Type iType, bool buffered, int devID, InputManager *creator) | |
Protected Attributes | |
unsigned int | mModifiers |
Bit field that holds status of Alt, Ctrl, Shift. More... | |
KeyListener * | mListener |
Used for buffered/actionmapping callback. More... | |
TextTranslationMode | mTextMode |
The current translation mode. More... | |
Protected Attributes inherited from OIS::Object | |
std::string | mVendor |
Vendor name if applicable/known. More... | |
Type | mType |
Type of controller object. More... | |
bool | mBuffered |
Buffered flag. More... | |
int | mDevID |
Not fully implemented yet. More... | |
InputManager * | mCreator |
The creator who created this object. More... | |
Keyboard base class. To be implemented by specific system (ie. DirectX Keyboard) This class is useful as you remain OS independent using this common interface.
|
inlinevirtual |
|
inlineprotected |
|
pure virtual |
|
pure virtual |
str | string to convert |
|
pure virtual |
kc | KeyCode to convert |
|
inline |
|
inline |
|
pure virtual |
key | A KeyCode to check |
bool Keyboard::isModifierDown | ( | Modifier | mod | ) | const |
|
inlinevirtual |
keyListener | Send a pointer to a class derived from KeyListener or 0 to clear the callback |
|
virtual |
mode | Off, Unicode, Ascii |
|
protected |
Used for buffered/actionmapping callback.
|
protected |
Bit field that holds status of Alt, Ctrl, Shift.
|
protected |
The current translation mode.