OIS::Win32Keyboard Class Reference

#include <src/ois/win32/Win32KeyBoard.h>

Inheritance diagram for OIS::Win32Keyboard:

OIS::Keyboard OIS::Object

List of all members.

Public Member Functions

virtual void _initialize ()
virtual void capture ()
virtual void copyKeyStates (char keys[256]) const
virtual const std::stringgetAsString (KeyCode kc)
virtual bool isKeyDown (KeyCode key) const
virtual InterfacequeryInterface (Interface::IType type)
virtual void setBuffered (bool buffered)
 Win32Keyboard (InputManager *creator, IDirectInput8 *pDI, bool buffered, DWORD coopSettings)
virtual ~Win32Keyboard ()

Protected Member Functions

void _read ()
void _readBuffered ()
int _translateText (KeyCode kc)
 Internal method for translating KeyCodes to Text.

Protected Attributes

DWORD coopSetting
WCHAR deadKey
 Stored dead key from last translation.
unsigned char KeyBuffer [256]
IDirectInput8 * mDirectInput
std::string mGetString
 used for getAsString
IDirectInputDevice8 * mKeyboard


Constructor & Destructor Documentation

Win32Keyboard::Win32Keyboard ( InputManager creator,
IDirectInput8 *  pDI,
bool  buffered,
DWORD  coopSettings 
)

Remarks:
Constructor
Parameters:
pDI Valid DirectInput8 Interface
buffered True for buffered input mode
coopSettings A combination of DI Flags (see DX Help for info on input device settings)

References coopSetting, deadKey, KeyBuffer, OIS::Object::mCreator, mDirectInput, and mKeyboard.

Win32Keyboard::~Win32Keyboard (  )  [virtual]

References OIS::Object::mCreator, and mKeyboard.


Member Function Documentation

void Win32Keyboard::_initialize (  )  [virtual]

void Win32Keyboard::_read (  )  [protected]

void Win32Keyboard::_readBuffered (  )  [protected]

int Win32Keyboard::_translateText ( KeyCode  kc  )  [protected]

Internal method for translating KeyCodes to Text.

References deadKey, OIS::Keyboard::mTextMode, and OIS::Keyboard::Off.

Referenced by _readBuffered().

void Win32Keyboard::capture (  )  [virtual]

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

Implements OIS::Object.

References _read(), _readBuffered(), and OIS::Object::mBuffered.

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.

References KeyBuffer.

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:
kc KeyCode to convert
Returns:
The string as determined from the current locale

Implements OIS::Keyboard.

References mGetString, and mKeyboard.

bool Win32Keyboard::isKeyDown ( KeyCode  key  )  const [virtual]

Remarks:
Returns true if key is donwn
Parameters:
key A KeyCode to check

Implements OIS::Keyboard.

References KeyBuffer.

Referenced by _read().

virtual Interface* OIS::Win32Keyboard::queryInterface ( Interface::IType  type  )  [inline, virtual]

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

Implements OIS::Object.

void Win32Keyboard::setBuffered ( bool  buffered  )  [virtual]

Remarks:
Sets buffered mode

Implements OIS::Object.

References _initialize(), OIS::Object::mBuffered, and mKeyboard.


Member Data Documentation

Referenced by _initialize(), and Win32Keyboard().

WCHAR OIS::Win32Keyboard::deadKey [protected]

Stored dead key from last translation.

Referenced by _initialize(), _translateText(), and Win32Keyboard().

unsigned char OIS::Win32Keyboard::KeyBuffer[256] [protected]

IDirectInput8* OIS::Win32Keyboard::mDirectInput [protected]

Referenced by _initialize(), and Win32Keyboard().

used for getAsString

Referenced by getAsString().

IDirectInputDevice8* OIS::Win32Keyboard::mKeyboard [protected]


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

Generated on Tue Jul 28 16:22:19 2009 for Orxonox by  doxygen 1.5.6