Blender V2.61 - r43446
Public Member Functions | Public Attributes | Protected Attributes

GPC_KeyboardDevice Class Reference

#include <GPC_KeyboardDevice.h>

Inheritance diagram for GPC_KeyboardDevice:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 GPC_KeyboardDevice ()
virtual ~GPC_KeyboardDevice (void)
virtual bool IsPressed (SCA_IInputDevice::KX_EnumInputs inputcode)
virtual void NextFrame ()
virtual KX_EnumInputs ToNative (int incode)
virtual bool ConvertEvent (int incode, int val)
virtual void HookEscape ()

Public Attributes

bool m_hookesc

Protected Attributes

std::map< int, KX_EnumInputsm_reverseKeyTranslateTable
short m_exitkey

Detailed Description

System independent implementation of SCA_IInputDevice. System dependent keyboard devices need only to inherit this class and fill the m_reverseKeyTranslateTable key translation map.

See also:
SCA_IInputDevice

Definition at line 51 of file GPC_KeyboardDevice.h.


Constructor & Destructor Documentation

GPC_KeyboardDevice::GPC_KeyboardDevice ( ) [inline]

Definition at line 64 of file GPC_KeyboardDevice.h.

virtual GPC_KeyboardDevice::~GPC_KeyboardDevice ( void  ) [inline, virtual]

Definition at line 69 of file GPC_KeyboardDevice.h.


Member Function Documentation

bool GPC_KeyboardDevice::ConvertEvent ( int  incode,
int  val 
) [virtual]
void GPC_KeyboardDevice::HookEscape ( ) [virtual]

Reimplemented from SCA_IInputDevice.

Definition at line 124 of file GPC_KeyboardDevice.cpp.

References m_hookesc.

virtual bool GPC_KeyboardDevice::IsPressed ( SCA_IInputDevice::KX_EnumInputs  inputcode) [inline, virtual]

Implements SCA_IInputDevice.

Definition at line 73 of file GPC_KeyboardDevice.h.

void GPC_KeyboardDevice::NextFrame ( ) [virtual]

NextFrame toggles currentTable with previousTable, and copies relevant event information from previous to current table (pressed keys need to be remembered).

Reimplemented from SCA_IInputDevice.

Definition at line 42 of file GPC_KeyboardDevice.cpp.

References SCA_InputEvent::KX_ACTIVE, SCA_IInputDevice::KX_BEGINKEY, SCA_IInputDevice::KX_ENDKEY, SCA_InputEvent::KX_JUSTACTIVATED, SCA_IInputDevice::m_currentTable, SCA_IInputDevice::m_eventStatusTables, and SCA_InputEvent::m_status.

virtual KX_EnumInputs GPC_KeyboardDevice::ToNative ( int  incode) [inline, virtual]

Definition at line 80 of file GPC_KeyboardDevice.h.

References m_reverseKeyTranslateTable.

Referenced by ConvertEvent(), and GPG_Application::handleKey().


Member Data Documentation

short GPC_KeyboardDevice::m_exitkey [protected]

Definition at line 60 of file GPC_KeyboardDevice.h.

Definition at line 63 of file GPC_KeyboardDevice.h.

Referenced by ConvertEvent(), GPG_Application::handleKey(), and HookEscape().

This map converts system dependent keyboard codes into Ketsji codes. System dependent keyboard codes are stored as ints.

Definition at line 59 of file GPC_KeyboardDevice.h.

Referenced by GPG_KeyboardDevice::GPG_KeyboardDevice(), and ToNative().


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