HPS::InputEvent Class Reference

#include <hps.h>

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

Public Member Functions

EventClone () const
 
virtual bool Equals (InputEvent const &in_that) const
 
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

ModifierKeys ModifierKeyState
 The modifier keys which are active for this InputEvent.
 

Additional Inherited Members

- Public Types inherited from HPS::Event
enum  Status : uint32_t { Status::InProgress, Status::Completed, Status::Failed }
 
- 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 InputEvent class is the base class for input events such as MouseEvent, TouchEvent, and KeyboardEvent. It contains functionality which is common to all input event types, namely the state of modifier keys.

Constructor & Destructor Documentation

◆ InputEvent() [1/2]

HPS::InputEvent::InputEvent ( )
inline

This constructor creates a default InputEvent object.

◆ InputEvent() [2/2]

HPS::InputEvent::InputEvent ( ModifierKeys const &  in_modifiers)
inline

This constructor creates a new InputEvent with the specified modifier keys initialized.

Parameters
in_modifiersThe modifier keys associated with the new Event.

Member Function Documentation

◆ Clone()

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

Allocates and returns a copy of this InputEvent.

Returns
A copy of this InputEvent.

Implements HPS::Event.

Reimplemented in HPS::KeyboardEvent, HPS::MouseEvent, and HPS::TouchEvent.

◆ Equals()

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

Check if the source object is equivalent to this object.

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

Reimplemented in HPS::KeyboardEvent, HPS::MouseEvent, and HPS::TouchEvent.

◆ GetModifierKeys()

ModifierKeys HPS::InputEvent::GetModifierKeys ( ) const
inline

Queries which modifier keys are active

Returns
A ModifierKeys object, which represents which modifier keys are active

◆ operator!=()

virtual bool HPS::InputEvent::operator!= ( InputEvent 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::InputEvent::operator== ( 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.

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