Main Page | Class Hierarchy | Class List | File List | Class Members | Related Pages

CInputDeviceState Class Reference

Mouse Device class. More...

#include <InputDeviceState.h>

Inheritance diagram for CInputDeviceState:

CKeyboard CMouse List of all members.

Public Member Functions

virtual UINT GetKeyState (UINT uiKeyIndex)
virtual UINT GetKeyCount ()
virtual void SetKeyState (UINT uiKey, UINT uiState)
virtual bool IsKeyDown (UINT uiKey)
virtual bool IsKeyUp (UINT uiKey)
virtual UINT Poll ()=0

Protected Member Functions

virtual void Destroy ()

Protected Attributes

UINT * m_uipKeys
UINT m_uiKeyCount

Detailed Description

Mouse Device class.

This class is an interface for the device state, either it is mouse, keyboard or any other.

Definition at line 15 of file InputDeviceState.h.


Member Function Documentation

void CInputDeviceState::Destroy  )  [protected, virtual]
 

Method details: Destroys the device

Reimplemented in CKeyboard, and CMouse.

Definition at line 53 of file InputDeviceState.cpp.

References m_uipKeys.

UINT CInputDeviceState::GetKeyCount  )  [virtual]
 

Method details:

Returns:
Total number of virtual keys
Definition at line 30 of file InputDeviceState.cpp.

References m_uiKeyCount.

UINT CInputDeviceState::GetKeyState UINT  uiKeyIndex  )  [virtual]
 

Method details:

Parameters:
uiKeyIndex - Index of the key to query
Returns:
Key state (KEY_UP or KEY_DOWN)

Reimplemented in CKeyboard, and CMouse.

Definition at line 19 of file InputDeviceState.cpp.

References m_uiKeyCount, and m_uipKeys.

bool CInputDeviceState::IsKeyDown UINT  uiKey  )  [virtual]
 

Method details:

Parameters:
uiKey - Index of the key to query
Returns:
True if key is down, false otherwise
Definition at line 35 of file InputDeviceState.cpp.

bool CInputDeviceState::IsKeyUp UINT  uiKey  )  [virtual]
 

Method details:

Parameters:
uiKey - Index of the key to query
Returns:
True if key has just been released, false otherwise
Definition at line 41 of file InputDeviceState.cpp.

virtual UINT CInputDeviceState::Poll  )  [pure virtual]
 

Method details:

Returns:
Varied returns

Implemented in CKeyboard, and CMouse.

void CInputDeviceState::SetKeyState UINT  uiKey,
UINT  uiState
[virtual]
 

Method details:

Parameters:
uiKey - Key index
uiState - Key state (either KEY_DEFAULT, KEY_DOWN or KEY_UP)
Definition at line 47 of file InputDeviceState.cpp.

References m_uipKeys.


Member Data Documentation

UINT CInputDeviceState::m_uiKeyCount [protected]
 

Number of keys for the device Definition at line 24 of file InputDeviceState.h.

Referenced by GetKeyCount(), and GetKeyState().

UINT* CInputDeviceState::m_uipKeys [protected]
 

Pointer to a future array of keys for the device Definition at line 23 of file InputDeviceState.h.

Referenced by Destroy(), GetKeyState(), and SetKeyState().


The documentation for this class was generated from the following files:
Generated on Sun Jul 17 21:34:30 2005 for OpenGL GUI by doxygen 1.3.8