#include <hps.h>

Inheritance diagram for HPS::TouchState:
HPS::Object

Public Member Functions

void Assign (TouchState const &in_that)
 
bool Equals (TouchState const &in_that) const
 
HPS::TouchEvent GetActiveEvent () const
 
HPS::KeyArray GetEventPath () const
 
HPS::WindowKey GetEventSource () const
 
ModifierKeys GetModifierKeys () const
 
size_t GetTouchCount () const
 
HPS::TouchArray GetTouches () const
 
HPS::Type ObjectType () const
 
bool operator!= (TouchState const &in_that) const
 
TouchStateoperator= (TouchState &&in_that)
 
TouchStateoperator= (TouchState const &in_that)
 
bool operator== (TouchState const &in_that) const
 
void Set (KeyArray const &in_path, TouchEvent const &in_event, TouchArray const &in_touches, ModifierKeys in_modifiers=ModifierKeys())
 
void SetActiveEvent (TouchEvent const &in_event)
 
void SetEventPath (KeyArray const &in_path)
 
void SetModifierKeys (ModifierKeys in_modifiers)
 
void SetTouches (TouchArray const &in_touches)
 
 TouchState ()
 
 TouchState (TouchState const &in_that)
 
 TouchState (TouchState &&in_that)
 
- Public Member Functions inherited from HPS::Object
virtual bool Empty () const
 
intptr_t GetClassID () const
 
intptr_t GetInstanceID () const
 
bool HasType (HPS::Type in_mask) const
 
Object (Object const &that)
 
 Object (Object &&in_that)
 
Objectoperator= (Object const &other_object)
 
Objectoperator= (Object &&in_that)
 
virtual void Reset ()
 
virtual HPS::Type Type () const
 

Static Public Attributes

static const HPS::Type staticType = HPS::Type::TouchState
 
- Static Public Attributes inherited from HPS::Object
static const HPS::Type staticType = HPS::Type::None
 

Additional Inherited Members

- Static Public Member Functions inherited from HPS::Object
template<typename T >
static intptr_t ClassID ()
 

Detailed Description

The TouchState class represents the state of touches on a multi-touch device for a particular event.

Constructor & Destructor Documentation

◆ TouchState() [1/3]

HPS::TouchState::TouchState ( )

The default constructor creates an empty TouchState object.

◆ TouchState() [2/3]

HPS::TouchState::TouchState ( TouchState const &  in_that)

The copy constructor creates a new TouchState object that contains the same settings as the source TouchState.

Parameters
in_thatThe source TouchState to copy.

◆ TouchState() [3/3]

HPS::TouchState::TouchState ( TouchState &&  in_that)

The move constructor creates a TouchState by transferring the underlying impl of the rvalue reference to this TouchState thereby avoiding a copy and allocation.

Parameters
in_thatAn rvalue reference to a TouchState to take the impl from.

Member Function Documentation

◆ Assign()

void HPS::TouchState::Assign ( TouchState const &  in_that)

Copies the source TouchState into this TouchState.

Parameters
in_thatThe source TouchState to copy.

◆ Equals()

bool HPS::TouchState::Equals ( TouchState const &  in_that) const

Check if the source TouchState is equivalent to this TouchState.

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

◆ GetActiveEvent()

HPS::TouchEvent HPS::TouchState::GetActiveEvent ( ) const

Get the active event for this TouchState. This will throw an exception if there is no active action for this TouchState.

Returns
The action for the active touches for this TouchState.

◆ GetEventPath()

HPS::KeyArray HPS::TouchState::GetEventPath ( ) const

Get the relevant list of keys up to the window which had focus when the touches represented by this TouchState underwent the active action. This will throw an exception if there is no event path for this TouchState.

Returns
The relevant list of keys up to the window which had focus when the touches represented by this TouchState underwent the active action.

◆ GetEventSource()

HPS::WindowKey HPS::TouchState::GetEventSource ( ) const

Get the window which had focus when the touches represented by this TouchState underwent the active action. This will throw an exception if there is no event source for this TouchState.

Returns
The window which had focus when the touches represented by this TouchState underwent the active action.

◆ GetModifierKeys()

ModifierKeys HPS::TouchState::GetModifierKeys ( ) const

Get an object representing the state of modifier keys for this TouchState.

Returns
An object representing the state of modifier keys.

◆ GetTouchCount()

size_t HPS::TouchState::GetTouchCount ( ) const

Get the number of touches currently down in this TouchState.

Returns
Number of touches.

◆ GetTouches()

HPS::TouchArray HPS::TouchState::GetTouches ( ) const

Get the touches currently down in this TouchState.

Returns
The list of touches.

◆ ObjectType()

HPS::Type HPS::TouchState::ObjectType ( ) const
inlinevirtual

This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).

Returns
The declared type of the object in question, which may differ from the true, underlying type.

Reimplemented from HPS::Object.

◆ operator!=()

bool HPS::TouchState::operator!= ( TouchState const &  in_that) const

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

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

◆ operator=() [1/2]

TouchState& HPS::TouchState::operator= ( TouchState &&  in_that)

The move assignment operator transfers the underlying impl of the rvalue reference to this TouchState thereby avoiding a copy.

Parameters
in_thatAn rvalue reference to a TouchState to take the impl from.
Returns
A reference to this TouchState.

◆ operator=() [2/2]

TouchState& HPS::TouchState::operator= ( TouchState const &  in_that)

Copies the source TouchState into this TouchState.

Parameters
in_thatThe source TouchState to copy.
Returns
A reference to this TouchState.

◆ operator==()

bool HPS::TouchState::operator== ( TouchState const &  in_that) const

Check if the source TouchState is equivalent to this TouchState.

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

◆ Set()

void HPS::TouchState::Set ( KeyArray const &  in_path,
TouchEvent const &  in_event,
TouchArray const &  in_touches,
ModifierKeys  in_modifiers = ModifierKeys() 
)

Sets the properties of this TouchState.

Parameters
in_pathThe list of keys up to the window which had focus for this touch event.
in_eventThe touch event.
in_touchesThe touches down during this touch event.
in_modifiersThe state of modifier keys for this touch event.

◆ SetActiveEvent()

void HPS::TouchState::SetActiveEvent ( TouchEvent const &  in_event)

Sets the active event for this TouchState.

Parameters
in_eventThe action for this TouchState.

◆ SetEventPath()

void HPS::TouchState::SetEventPath ( KeyArray const &  in_path)

Sets the relevant list of keys up to the window which had focus for this touch event.

Parameters
in_pathThe relevant list of keys up to the window which had focus when the touches represented by this TouchState underwent the active action.

◆ SetModifierKeys()

void HPS::TouchState::SetModifierKeys ( ModifierKeys  in_modifiers)

Sets an object representing the state of modifier keys for this TouchState.

Parameters
in_modifiersAn object representing the state of modifier keys.

◆ SetTouches()

void HPS::TouchState::SetTouches ( TouchArray const &  in_touches)

Sets the touches currently down in this TouchState.

Parameters
in_touchesThe list of touches.

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