#include <hps.h>

Inheritance diagram for HPS::KeyboardEvent:
HPS::InputEvent HPS::Event

Public Types

enum  Action : uint32_t { Action::None, Action::KeyDown, Action::KeyUp }
 
- Public Types inherited from HPS::Event
enum  Status : uint32_t { Status::InProgress, Status::Completed, Status::Failed }
 

Public Member Functions

EventClone () const
 
virtual bool Equals (InputEvent const &in_that) const
 
virtual bool Equals (KeyboardEvent const &in_that) const
 
 KeyboardEvent ()
 
 KeyboardEvent (KeyboardEvent::Action in_action, ModifierKeys in_modifiers=ModifierKeys())
 
 KeyboardEvent (KeyboardEvent::Action in_action, size_t in_keyboardcode_count, HPS::KeyboardCode const in_keyboardcodes[], ModifierKeys in_modifiers=ModifierKeys())
 
 KeyboardEvent (KeyboardEvent::Action in_action, KeyboardCodeArray const &in_keyboardcodes, ModifierKeys in_modifiers=ModifierKeys())
 
 KeyboardEvent (Event const &in_event)
 
virtual bool operator!= (KeyboardEvent const &in_that) const
 
virtual bool operator== (KeyboardEvent const &in_that) const
 
void SetKeyboardCodes (size_t in_keyboardcode_count, HPS::KeyboardCode const in_keyboardcodes[])
 
void SetKeyboardCodes (HPS::KeyboardCodeArray const &in_keyboardcodes)
 
- Public Member Functions inherited from HPS::InputEvent
ModifierKeys GetModifierKeys () const
 
 InputEvent ()
 
 InputEvent (ModifierKeys const &in_modifiers)
 
virtual bool operator!= (InputEvent const &in_that) const
 
virtual bool operator== (InputEvent const &in_that) const
 
- Public Member Functions inherited from HPS::Event
virtual bool Drop (Event const *in_that_event) const
 
 Event (intptr_t in_channel=0)
 
virtual intptr_t Freshen () const
 
intptr_t GetChannel () const
 
intptr_t GetClassID () const
 
Time GetTimeStamp () const
 
bool IsConsumable () const
 

Public Attributes

HPS::KeyboardEvent::Action CurrentAction
 The action for the keyboard codes for this KeyboardEvent.
 
HPS::KeyboardCodeArray KeyboardCodes
 Array of keyboard codes for this KeyboardEvent.
 
- Public Attributes inherited from HPS::InputEvent
ModifierKeys ModifierKeyState
 The modifier keys which are active for this InputEvent.
 

Additional Inherited Members

- Static Public Member Functions inherited from HPS::Event
static void operator delete (void *in_ptr, size_t in_size) throw ()
 
static void * operator new (size_t in_size)
 
- Protected Attributes inherited from HPS::Event
intptr_t channel
 
bool consumable
 

Detailed Description

The KeyboardEvent class is the event generated for each key press and release.

Member Enumeration Documentation

◆ Action

enum HPS::KeyboardEvent::Action : uint32_t
strong

Enumeration of various states keyboard codes can have for a KeyboardEvent.

Enumerator
None 

Key is not currently pressed, nor was it just released.

KeyDown 

Key was pressed.

KeyUp 

Key was released.

Constructor & Destructor Documentation

◆ KeyboardEvent() [1/5]

HPS::KeyboardEvent::KeyboardEvent ( )
inline

The default constructor creates a KeyboardEvent object with no current action nor any keyboard codes.

◆ KeyboardEvent() [2/5]

HPS::KeyboardEvent::KeyboardEvent ( KeyboardEvent::Action  in_action,
ModifierKeys  in_modifiers = ModifierKeys() 
)
inline

This constructor creates a KeyboardEvent object for a given action without any keyboard codes.

Parameters
in_actionAction of the keys for this KeyboardEvent.
in_modifiersThe modifier keys for this KeyboardEvent.

◆ KeyboardEvent() [3/5]

HPS::KeyboardEvent::KeyboardEvent ( KeyboardEvent::Action  in_action,
size_t  in_keyboardcode_count,
HPS::KeyboardCode const  in_keyboardcodes[],
ModifierKeys  in_modifiers = ModifierKeys() 
)
inline

This constructor creates a KeyboardEvent object for a given action with a list of keyboard codes.

Parameters
in_actionAction of the keys for this KeyboardEvent.
in_keyboardcode_countSize of the following array.
in_keyboardcodesArray of the keyboard codes for this KeyboardEvent.
in_modifiersThe modifier keys for this KeyboardEvent.

◆ KeyboardEvent() [4/5]

HPS::KeyboardEvent::KeyboardEvent ( KeyboardEvent::Action  in_action,
KeyboardCodeArray const &  in_keyboardcodes,
ModifierKeys  in_modifiers = ModifierKeys() 
)
inline

This constructor creates a KeyboardEvent object for a given action with a list of keyboard codes.

Parameters
in_actionAction of the keys for this KeyboardEvent.
in_keyboardcodesArray of the keyboard codes for this KeyboardEvent.
in_modifiersThe modifier keys for this KeyboardEvent.

◆ KeyboardEvent() [5/5]

HPS::KeyboardEvent::KeyboardEvent ( Event const &  in_event)
inline

This constructor converts an Event Object to a MouseEvent object.

Parameters
in_eventThe Event Object to be converted.

Member Function Documentation

◆ Clone()

Event* HPS::KeyboardEvent::Clone ( ) const
inlinevirtual

Allocates and returns a copy of this KeyboardEvent.

Returns
A copy of this KeyboardEvent.

Reimplemented from HPS::InputEvent.

◆ Equals() [1/2]

virtual bool HPS::KeyboardEvent::Equals ( InputEvent const &  in_that) const
inlinevirtual

Check if the source object is equivalent to this object.

Parameters
in_thatThe source object to compare to this object.
Returns
true if the objects are equivalent, false otherwise.

Reimplemented from HPS::InputEvent.

◆ Equals() [2/2]

virtual bool HPS::KeyboardEvent::Equals ( KeyboardEvent const &  in_that) const
inlinevirtual

Check if the source object is equivalent to this object.

Parameters
in_thatThe source object to compare to this object.
Returns
true if the objects are equivalent, false otherwise.

◆ operator!=()

virtual bool HPS::KeyboardEvent::operator!= ( KeyboardEvent const &  in_that) const
inlinevirtual

Check if the source object is not equivalent to this object.

Parameters
in_thatThe source object to compare to this object.
Returns
true if the objects are not equivalent, false otherwise.

◆ operator==()

virtual bool HPS::KeyboardEvent::operator== ( KeyboardEvent const &  in_that) const
inlinevirtual

Check if the source object is equivalent to this object.

Parameters
in_thatThe source object to compare to this object.
Returns
true if the objects are equivalent, false otherwise.

◆ SetKeyboardCodes() [1/2]

void HPS::KeyboardEvent::SetKeyboardCodes ( size_t  in_keyboardcode_count,
HPS::KeyboardCode const  in_keyboardcodes[] 
)
inline

Sets the keyboard codes for this KeyboardEvent.

Parameters
in_keyboardcode_countSize of the following array.
in_keyboardcodesArray of the keyboard codes for this KeyboardEvent.

◆ SetKeyboardCodes() [2/2]

void HPS::KeyboardEvent::SetKeyboardCodes ( HPS::KeyboardCodeArray const &  in_keyboardcodes)
inline

Sets the keyboard codes for this KeyboardEvent.

Parameters
in_keyboardcodesArray of the keyboard codes for this KeyboardEvent.

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