Blender V2.61 - r43446
|
#include <GPC_KeyboardDevice.h>
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_EnumInputs > | m_reverseKeyTranslateTable |
short | m_exitkey |
System independent implementation of SCA_IInputDevice. System dependent keyboard devices need only to inherit this class and fill the m_reverseKeyTranslateTable key translation map.
Definition at line 51 of file GPC_KeyboardDevice.h.
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.
bool GPC_KeyboardDevice::ConvertEvent | ( | int | incode, |
int | val | ||
) | [virtual] |
ConvertBPEvent translates Windows keyboard events into ketsji kbd events. Extra event information is stored, like ramp-mode (just released/pressed)
Definition at line 67 of file GPC_KeyboardDevice.cpp.
References SCA_InputEvent::KX_ACTIVE, SCA_IInputDevice::KX_BEGINKEY, SCA_IInputDevice::KX_ENDKEY, SCA_IInputDevice::KX_ESCKEY, SCA_InputEvent::KX_JUSTACTIVATED, SCA_InputEvent::KX_JUSTRELEASED, SCA_InputEvent::KX_NO_INPUTSTATUS, SCA_IInputDevice::m_currentTable, SCA_IInputDevice::m_eventStatusTables, SCA_InputEvent::m_eventval, m_hookesc, SCA_InputEvent::m_status, ToNative(), and simple_enum_gen::val.
Referenced by GPG_Application::handleKey().
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().
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().
std::map<int, KX_EnumInputs> GPC_KeyboardDevice::m_reverseKeyTranslateTable [protected] |
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().