REFERENCE MANUAL
#include <hps.h>
Public Member Functions | |
void | Assign (KeyboardState const &in_that) |
bool | Equals (KeyboardState const &in_that) const |
KeyboardEvent | GetActiveEvent () const |
KeyArray | GetEventPath () const |
WindowKey | GetEventSource () const |
size_t | GetKeyboardCodeCount () const |
KeyboardCodeArray | GetKeyboardCodes () const |
bool | GetKeyState (KeyboardCode in_key_code) const |
ModifierKeys | GetModifierKeys () const |
KeyboardState () | |
KeyboardState (KeyboardState const &in_that) | |
KeyboardState (KeyboardState &&in_that) | |
Type | ObjectType () const |
bool | operator!= (KeyboardState const &in_that) const |
KeyboardState & | operator= (KeyboardState &&in_that) |
KeyboardState & | operator= (KeyboardState const &in_that) |
bool | operator== (KeyboardState const &in_that) const |
![]() | |
virtual bool | Empty () const |
intptr_t | GetClassID () const |
intptr_t | GetInstanceID () const |
bool | HasType (Type in_mask) const |
Object (Object &&in_that) | |
Object & | operator= (Object const &other_object) |
Object & | operator= (Object &&in_that) |
virtual void | Reset () |
Type | Type () const |
Additional Inherited Members | |
![]() | |
template<typename T > | |
static intptr_t | ClassID () |
The KeyboardState class represents the state of a keyboard for a particular event.
KeyboardState::KeyboardState | ( | ) |
The default constructor creates an empty KeyboardState object.
KeyboardState::KeyboardState | ( | KeyboardState const & | in_that | ) |
The copy constructor creates a new KeyboardState object that contains the same settings as the source KeyboardState.
in_that | The source KeyboardState to copy. |
KeyboardState::KeyboardState | ( | KeyboardState && | in_that | ) |
The move constructor creates a KeyboardState by transferring the underlying impl of the rvalue reference to this KeyboardState thereby avoiding a copy and allocation.
in_that | An rvalue reference to a KeyboardState to take the impl from. |
void KeyboardState::Assign | ( | KeyboardState const & | in_that | ) |
Copies the source KeyboardState into this KeyboardState.
in_that | The source KeyboardState to copy. |
bool KeyboardState::Equals | ( | KeyboardState const & | in_that | ) | const |
Check if the source KeyboardState is equivalent to this KeyboardState.
in_kit | The source KeyboardState to compare to this KeyboardState. |
KeyboardEvent KeyboardState::GetActiveEvent | ( | ) | const |
Get the active event for this KeyboardState. This will throw an exception if there is no active action for this KeyboardState.
KeyArray KeyboardState::GetEventPath | ( | ) | const |
Get the relevant list of keys up to the window which had focus when the keys represented by this KeyboardState were pressed or released. This will throw an exception if there is no event path for this KeyboardState.
WindowKey KeyboardState::GetEventSource | ( | ) | const |
Get the window which had focus when the keys represented by this KeyboardState were pressed or released. This will throw an exception if there is no event source for this KeyboardState.
size_t KeyboardState::GetKeyboardCodeCount | ( | ) | const |
Get the number of keys currently down in this KeyboardState.
KeyboardCodeArray KeyboardState::GetKeyboardCodes | ( | ) | const |
Get the list of keyboard codes for keys currently down.
bool KeyboardState::GetKeyState | ( | KeyboardCode | in_key_code | ) | const |
Get the state of a specific keyboard code for this KeyboardState.
in_key_code | The keyboard code for which to query the action. |
ModifierKeys KeyboardState::GetModifierKeys | ( | ) | const |
Get an object representing the state of modifier keys for this KeyboardState.
|
inlinevirtual |
This function returns the type the object, as declared. This does not necessarily give the true type of the underlying object.
Reimplemented from Object.
bool KeyboardState::operator!= | ( | KeyboardState const & | in_that | ) | const |
Check if the source KeyboardState is not equivalent to this KeyboardState.
in_kit | The source KeyboardState to compare to this KeyboardState. |
KeyboardState& KeyboardState::operator= | ( | KeyboardState && | in_that | ) |
The move assignment operator transfers the underlying impl of the rvalue reference to this KeyboardState thereby avoiding a copy.
in_that | An rvalue reference to a KeyboardState to take the impl from. |
KeyboardState& KeyboardState::operator= | ( | KeyboardState const & | in_that | ) |
Copies the source KeyboardState into this KeyboardState.
in_that | The source KeyboardState to copy. |
bool KeyboardState::operator== | ( | KeyboardState const & | in_that | ) | const |
Check if the source KeyboardState is equivalent to this KeyboardState.
in_kit | The source KeyboardState to compare to this KeyboardState. |