Orxonox  0.0.5 Codename: Arcturus
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
OIS::Win32Keyboard Class Reference

#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/external/ois/win32/Win32KeyBoard.h>

Inheritance diagram for OIS::Win32Keyboard:
OIS::Keyboard OIS::Object

Public Member Functions

 Win32Keyboard (InputManager *creator, IDirectInput8 *pDI, bool buffered, DWORD coopSettings)
 
virtual ~Win32Keyboard ()
 
virtual void _initialize ()
 
virtual void capture ()
 
virtual void copyKeyStates (char keys[256]) const
 
virtual const std::string & getAsString (KeyCode kc)
 
virtual bool isKeyDown (KeyCode key) const
 
virtual InterfacequeryInterface (Interface::IType type)
 
virtual void setBuffered (bool buffered)
 
- Public Member Functions inherited from OIS::Keyboard
virtual ~Keyboard ()
 
KeyListenergetEventCallback () const
 
TextTranslationMode getTextTranslation () const
 
bool isModifierDown (Modifier mod) const
 
virtual void setEventCallback (KeyListener *keyListener)
 
virtual void setTextTranslation (TextTranslationMode mode)
 
- Public Member Functions inherited from OIS::Object
virtual ~Object ()
 
virtual bool buffered () const
 
InputManagergetCreator () const
 
virtual int getID () const
 
Type type () const
 
const std::string & vendor () const
 

Protected Member Functions

void _read ()
 
void _readBuffered ()
 
int _translateText (KeyCode kc)
 Internal method for translating KeyCodes to Text. More...
 
- Protected Member Functions inherited from OIS::Keyboard
 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

DWORD coopSetting
 
WCHAR deadKey
 Stored dead key from last translation. More...
 
unsigned char KeyBuffer [256]
 
IDirectInput8 * mDirectInput
 
std::string mGetString
 used for getAsString More...
 
IDirectInputDevice8 * mKeyboard
 
- Protected Attributes inherited from OIS::Keyboard
KeyListenermListener
 Used for buffered/actionmapping callback. More...
 
unsigned int mModifiers
 Bit field that holds status of Alt, Ctrl, Shift. More...
 
TextTranslationMode mTextMode
 The current translation mode. More...
 
- Protected Attributes inherited from OIS::Object
bool mBuffered
 Buffered flag. More...
 
InputManagermCreator
 The creator who created this object. More...
 
int mDevID
 Not fully implemented yet. More...
 
Type mType
 Type of controller object. More...
 
std::string mVendor
 Vendor name if applicable/known. More...
 

Additional Inherited Members

- Public Types inherited from OIS::Keyboard
enum  Modifier { Shift = 0x0000001, Ctrl = 0x0000010, Alt = 0x0000100 }
 Enum of bit position of modifer. More...
 
enum  TextTranslationMode { Off, Unicode, Ascii }
 TextTranslation Mode. More...
 

Constructor & Destructor Documentation

Win32Keyboard::Win32Keyboard ( InputManager creator,
IDirectInput8 *  pDI,
bool  buffered,
DWORD  coopSettings 
)
Remarks
Constructor
Parameters
pDIValid DirectInput8 Interface
bufferedTrue for buffered input mode
coopSettingsA combination of DI Flags (see DX Help for info on input device settings)
Win32Keyboard::~Win32Keyboard ( )
virtual

Member Function Documentation

void Win32Keyboard::_initialize ( )
virtual

Remarks
Internal... Do not call this directly.

Implements OIS::Object.

void Win32Keyboard::_read ( )
protected
void Win32Keyboard::_readBuffered ( )
protected
int Win32Keyboard::_translateText ( KeyCode  kc)
protected

Internal method for translating KeyCodes to Text.

void Win32Keyboard::capture ( )
virtual

Remarks
Used for updating call once per frame before checking state or to update events

Implements OIS::Object.

void Win32Keyboard::copyKeyStates ( char  keys[256]) const
virtual

Remarks
Copies the state of the keys into the sent buffer (in the form of 1 is down and 0 is up)

Implements OIS::Keyboard.

const std::string & Win32Keyboard::getAsString ( KeyCode  kc)
virtual

Remarks
Translates KeyCode to string representation. For example, KC_ENTER will be "Enter" - Locale specific of course.
Parameters
kcKeyCode to convert
Returns
The string as determined from the current locale

Implements OIS::Keyboard.

bool Win32Keyboard::isKeyDown ( KeyCode  key) const
virtual

Remarks
Returns true if key is donwn
Parameters
keyA KeyCode to check

Implements OIS::Keyboard.

virtual Interface* OIS::Win32Keyboard::queryInterface ( Interface::IType  type)
inlinevirtual

Remarks
If available, get an interface to write to some devices. Examples include, turning on and off LEDs, ForceFeedback, etc
Parameters
typeThe type of interface you are looking for

Implements OIS::Object.

void Win32Keyboard::setBuffered ( bool  buffered)
virtual

Remarks
Sets buffered mode

Implements OIS::Object.

Member Data Documentation

DWORD OIS::Win32Keyboard::coopSetting
protected
WCHAR OIS::Win32Keyboard::deadKey
protected

Stored dead key from last translation.

unsigned char OIS::Win32Keyboard::KeyBuffer[256]
protected
IDirectInput8* OIS::Win32Keyboard::mDirectInput
protected
std::string OIS::Win32Keyboard::mGetString
protected

used for getAsString

IDirectInputDevice8* OIS::Win32Keyboard::mKeyboard
protected

The documentation for this class was generated from the following files: