#include <hps.h>

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

Public Types

enum  Action : uint32_t { Action::TouchDown, Action::TouchUp, Action::Move }
 
- Public Types inherited from HPS::Event
enum  Status : uint32_t { Status::InProgress, Status::Completed, Status::Failed }
 

Public Member Functions

EventClone () const
 
virtual bool Drop (Event const *in_that_event) const
 
virtual bool Equals (InputEvent const &in_that) const
 
bool Equals (TouchEvent const &in_that) const
 
virtual bool operator!= (TouchEvent const &in_that) const
 
virtual bool operator== (TouchEvent const &in_that) const
 
 TouchEvent ()
 
 TouchEvent (Action in_action, ModifierKeys in_modifier=ModifierKeys())
 
 TouchEvent (Action in_action, TouchArray const &in_touches, ModifierKeys in_modifier=ModifierKeys())
 
 TouchEvent (Action in_action, size_t in_touch_count, Touch const in_touches[], ModifierKeys in_modifier=ModifierKeys())
 
 TouchEvent (Event const &in_event)
 
- 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
 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::TouchEvent::Action CurrentAction
 The action for the touches of this TouchEvent.
 
HPS::TouchArray Touches
 Array of Touches for this TouchEvent.
 
- 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 TouchEvent class is the event generated for each touch action on a multi-touch device.

Member Enumeration Documentation

◆ Action

enum HPS::TouchEvent::Action : uint32_t
strong

Enumeration of various actions touches can undergo for a TouchEvent.

Enumerator
TouchDown 

A touch, or touches, has just gone down.

TouchUp 

A touch, or touches, has just gone up.

Move 

A touch, or touches, has just moved.

Constructor & Destructor Documentation

◆ TouchEvent() [1/5]

HPS::TouchEvent::TouchEvent ( )
inline

The default constructor creates an uninitialized TouchEvent object.

◆ TouchEvent() [2/5]

HPS::TouchEvent::TouchEvent ( Action  in_action,
ModifierKeys  in_modifier = ModifierKeys() 
)
inline

This constructor creates a TouchEvent object for a given action without an array of Touches. Specifying TouchUp without an array of Touches clears tracked touches.

Parameters
in_actionAction of this TouchEvent.
in_modifierThe modifier keys for this TouchEvent.

◆ TouchEvent() [3/5]

HPS::TouchEvent::TouchEvent ( Action  in_action,
TouchArray const &  in_touches,
ModifierKeys  in_modifier = ModifierKeys() 
)
inline

This constructor creates a TouchEvent object for a given action with an array of Touches. Specifying TouchUp with an empty an array of Touches clears tracked touches.

Parameters
in_actionAction of this TouchEvent.
in_touchesAn array or touches for this TouchEvent.
in_modifierThe modifier keys for this TouchEvent.

◆ TouchEvent() [4/5]

HPS::TouchEvent::TouchEvent ( Action  in_action,
size_t  in_touch_count,
Touch const  in_touches[],
ModifierKeys  in_modifier = ModifierKeys() 
)
inline

This constructor creates a TouchEvent object for a given action with an array of Touches. Specifying TouchUp with an empty an array of Touches clears tracked touches.

Parameters
in_actionAction of this TouchEvent.
in_touch_countthe number of Touches in the touch array.
in_touchesAn array or touches for this TouchEvent.
in_modifierThe modifier keys for this TouchEvent.

◆ TouchEvent() [5/5]

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

This constructor converts an Event Object to a TouchEvent object.

Parameters
in_eventThe Event Object to be converted.

Member Function Documentation

◆ Clone()

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

Allocates and returns a copy of this TouchEvent.

Returns
A copy of this TouchEvent.

Reimplemented from HPS::InputEvent.

◆ Drop()

virtual bool HPS::TouchEvent::Drop ( Event const *  in_that_event) const
inlinevirtual

Determines if this TouchEvent can be dropped in favor of the following touch event.

Parameters
in_that_eventEvent to compare with this TouchEvent.
Returns
true if this event can be dropped, false otherwise.

Reimplemented from HPS::Event.

◆ Equals() [1/2]

virtual bool HPS::TouchEvent::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]

bool HPS::TouchEvent::Equals ( TouchEvent const &  in_that) const
inline

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::TouchEvent::operator!= ( TouchEvent const &  in_that) const
inlinevirtual

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

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

◆ operator==()

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

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