Xrb::InputState Class Reference

Stores the current state of the keyboard and mouse buttons. More...

#include <xrb_inputstate.hpp>

Inheritance diagram for Xrb::InputState:

Inheritance graph
[legend]

List of all members.

Public Member Functions

Key const * GetKey (Key::Code code) const
Key const * GetKey (std::string const &name) const
bool IsValidKeyCode (Key::Code code) const
bool IsValidKeyName (std::string const &name) const
Key::Code KeyCode (std::string const &name) const
std::string const & KeyName (Key::Code code) const
bool IsKeyPressed (Key::Code const code) const
bool IsKeyPressed (std::string const &name) const
bool IsEitherAltKeyPressed () const
bool IsEitherControlKeyPressed () const
bool IsEitherShiftKeyPressed () const
bool IsCapsLockOn () const
bool IsNumLockOn () const
bool IsScrollLockOn () const
Key::Modifier Modifier () const
void ResetPressed ()

Protected Member Functions

virtual bool HandleEvent (Event const *e)
 Subclasses must override this to provide the actual event handling necessary.
void InitKeyMaps ()


Detailed Description

Stores the current state of the keyboard and mouse buttons.

The InputState class will process events, and store the state of the keyboard and mouse buttons in a map (which indicates if any key is pressed or not). Key modifiers are also tracked and stored.

Definition at line 31 of file xrb_inputstate.hpp.


Member Function Documentation

bool Xrb::InputState::HandleEvent ( Event const *  e  )  [protected, virtual]

Subclasses must override this to provide the actual event handling necessary.

ProcessEvent calls this function to do the subclass-specific event handling. Overrides of this function should return true if the event was used, otherwise false.

Implements Xrb::EventHandler.

Definition at line 165 of file xrb_inputstate.cpp.

References Xrb::Event::GetEventType().


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

Hosted by SourceForge.net Logo -- Generated on Fri Aug 21 21:46:39 2009 for XuqRijBuh by doxygen 1.5.8