MezzanineEngine 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | List of all members
Mezzanine::Input::Keyboard Class Reference

This class represents the keyboard input device. More...

#include <keyboard.h>

+ Inheritance diagram for Mezzanine::Input::Keyboard:
+ Collaboration diagram for Mezzanine::Input::Keyboard:

Public Member Functions

 Keyboard ()
 Class constructor.
 
virtual ~Keyboard ()
 Class destructor.
 
const Input::ButtonStateGetButtonState (const UInt16 Button) const
 
const Input::ButtonStateGetButtonState (const Input::InputCode &Button) const
 
UInt16 GetDeviceIndex () const
 Gets the device index of this controller. More...
 
- Public Member Functions inherited from Mezzanine::Input::ButtonDevice
 ButtonDevice ()
 Class constructor.
 
virtual ~ButtonDevice ()
 Class destructor.
 
void _Update (const MetaCodeContainer &DeltaCodes, MetaCodeContainer &GeneratedCodes)
 Updates this device with the newest data. More...
 
bool CheckButtonState (const UInt16 Button, const Input::ButtonState &State) const
 Checks to see if a button on this device is a specific state. More...
 
bool CheckButtonState (const Input::InputCode &Button, const Input::ButtonState &State) const
 Checks to see if a button on this device is a specific state. More...
 
UInt16 GetNumButtons () const
 Gets the number of buttons on this device. More...
 
bool IsButtonLifting (const UInt16 Button) const
 Gets whether or not a device button was lifted this frame. More...
 
bool IsButtonLifting (const Input::InputCode &Button) const
 Gets whether or not a device button was lifted this frame. More...
 
bool IsButtonPressed (const UInt16 Button) const
 Gets whether or not a device button is pressed down. More...
 
bool IsButtonPressed (const Input::InputCode &Button) const
 Gets whether or not a device button is pressed down. More...
 
bool IsButtonPressing (const UInt16 Button) const
 Gets whether or not a device button was pressed this frame. More...
 
bool IsButtonPressing (const Input::InputCode &Button) const
 Gets whether or not a device button was pressed this frame. More...
 
bool IsButtonTransitioning (const UInt16 Button) const
 Gets whether or not a device button was lifted or pressed this frame. More...
 
bool IsButtonTransitioning (const Input::ButtonState &Button) const
 Gets whether or not a device button was lifted or pressed this frame. More...
 
- Public Member Functions inherited from Mezzanine::Input::Device
 Device ()
 Class constructor.
 
virtual ~Device ()
 Class destructor.
 
void AddInputSequence (const MetaCodeContainer &Codes, const Int32 &SequenceID)
 Adds a custom sequence of inputs that this system will look for and generate MetaCode's for when they occur.

Exceptions
Ifthe vector of MetaCode's doesn't end with a null MetaCode, an exception will be thrown. An exception can also be thrown if the ID provided is the max value of an Int32.
More...
 
Int32 GetIDofInputSequence (const MetaCodeContainer &Codes)
 Gets the ID of the provided sequence of MetaCode's.

Exceptions
Ifthe vector of MetaCode's doesn't end with a null MetaCode, an exception will be thrown.
More...
 
bool InputSequenceExists (const MetaCodeContainer &Codes)
 Checks to see if the provided sequence of MetaCode's is already being checked for.

Exceptions
Ifthe vector of MetaCode's doesn't end with a null MetaCode, an exception will be thrown.
More...
 
void RemoveAllInputSequences ()
 Removes all stored input sequences. More...
 
void RemoveInputSequence (const MetaCodeContainer &Codes)
 Removes the specified custom sequence of MetaCode's.

Exceptions
Ifthe vector of MetaCode's doesn't end with a null MetaCode, an exception will be thrown.
More...
 

Protected Member Functions

void AddPressedButtons (MetaCodeContainer &GeneratedCodes) const
 
void UpdateImpl (const MetaCodeContainer &DeltaCodes, MetaCodeContainer &GeneratedCodes)
 Internal implementation of the device update. More...
 
void VerifySequenceImpl (const MetaCodeContainer &Sequence) const
 
- Protected Member Functions inherited from Mezzanine::Input::ButtonDevice
void UpdateButtonTransitions ()
 Updates transitioning buttons. More...
 

Additional Inherited Members

- Protected Attributes inherited from Mezzanine::Input::ButtonDevice
std::vector< Input::ButtonStateButtons
 
std::vector< WholeTransitioningIndexes
 

Detailed Description

This class represents the keyboard input device.

Todo:
SDL mentions a ModState for keys. May want to implement that.

Definition at line 58 of file keyboard.h.

Member Function Documentation

void Mezzanine::Input::Keyboard::AddPressedButtons ( MetaCodeContainer &  GeneratedCodes) const
protectedvirtual

Implements Mezzanine::Input::ButtonDevice.

Definition at line 80 of file keyboard.cpp.

const Input::ButtonState & Mezzanine::Input::Keyboard::GetButtonState ( const UInt16  Button) const
virtual

Implements Mezzanine::Input::ButtonDevice.

Definition at line 95 of file keyboard.cpp.

const Input::ButtonState & Mezzanine::Input::Keyboard::GetButtonState ( const Input::InputCode Button) const
virtual

Implements Mezzanine::Input::ButtonDevice.

Definition at line 98 of file keyboard.cpp.

UInt16 Mezzanine::Input::Keyboard::GetDeviceIndex ( ) const
virtual

Gets the device index of this controller.

Returns
Returns a UInt16 representing the device index for this controller.

Implements Mezzanine::Input::Device.

Definition at line 92 of file keyboard.cpp.

void Mezzanine::Input::Keyboard::UpdateImpl ( const MetaCodeContainer &  DeltaCodes,
MetaCodeContainer &  GeneratedCodes 
)
protectedvirtual

Internal implementation of the device update.

Implements Mezzanine::Input::ButtonDevice.

Definition at line 61 of file keyboard.cpp.

void Mezzanine::Input::Keyboard::VerifySequenceImpl ( const MetaCodeContainer &  Sequence) const
protectedvirtual

Implements Mezzanine::Input::ButtonDevice.

Definition at line 71 of file keyboard.cpp.


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