#include <hps.h>
Public Member Functions | |
TouchState () | |
TouchState (TouchState const &in_that) | |
TouchState (TouchState &&in_that) | |
TouchState & | operator= (TouchState &&in_that) |
HPS::Type | ObjectType () const |
void | Assign (TouchState const &in_that) |
TouchState & | operator= (TouchState const &in_that) |
bool | Equals (TouchState const &in_that) const |
bool | operator== (TouchState const &in_that) const |
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()) |
HPS::TouchEvent | GetActiveEvent () const |
HPS::WindowKey | GetEventSource () const |
HPS::KeyArray | GetEventPath () const |
size_t | GetTouchCount () const |
HPS::TouchArray | GetTouches () const |
ModifierKeys | GetModifierKeys () const |
void | SetActiveEvent (TouchEvent const &in_event) |
void | SetEventPath (KeyArray const &in_path) |
void | SetTouches (TouchArray const &in_touches) |
void | SetModifierKeys (ModifierKeys in_modifiers) |
![]() | |
Object & | operator= (Object const &other_object) |
Object (Object &&in_that) | |
Object & | operator= (Object &&in_that) |
HPS::Type | Type () const |
virtual bool | Empty () const |
virtual void | Reset () |
bool | HasType (HPS::Type in_mask) const |
intptr_t | GetClassID () const |
intptr_t | GetInstanceID () const |
Additional Inherited Members | |
![]() | |
template<typename T > | |
static intptr_t | ClassID () |
The TouchState class represents the state of touches on a multi-touch device for a particular event.
HPS::TouchState::TouchState | ( | ) |
The default constructor creates an empty TouchState object.
HPS::TouchState::TouchState | ( | TouchState const & | in_that | ) |
The copy constructor creates a new TouchState object that contains the same settings as the source TouchState.
in_that | The source TouchState to copy. |
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.
in_that | An rvalue reference to a TouchState to take the impl from. |
void HPS::TouchState::Assign | ( | TouchState const & | in_that | ) |
Copies the source TouchState into this TouchState.
in_that | The source TouchState to copy. |
bool HPS::TouchState::Equals | ( | TouchState const & | in_that | ) | const |
Check if the source TouchState is equivalent to this TouchState.
in_kit | The source TouchState to compare to this TouchState. |
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.
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.
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.
ModifierKeys HPS::TouchState::GetModifierKeys | ( | ) | const |
Get an object representing the state of modifier keys for this TouchState.
size_t HPS::TouchState::GetTouchCount | ( | ) | const |
Get the number of touches currently down in this TouchState.
HPS::TouchArray HPS::TouchState::GetTouches | ( | ) | const |
Get the touches currently down in this TouchState.
|
inlinevirtual |
This function returns the type the object, as declared. This does not necessarily give the true type of the underlying object.
Reimplemented from HPS::Object.
bool HPS::TouchState::operator!= | ( | TouchState const & | in_that | ) | const |
Check if the source TouchState is not equivalent to this TouchState.
in_kit | The source TouchState to compare to this TouchState. |
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.
in_that | An rvalue reference to a TouchState to take the impl from. |
TouchState& HPS::TouchState::operator= | ( | TouchState const & | in_that | ) |
Copies the source TouchState into this TouchState.
in_that | The source TouchState to copy. |
bool HPS::TouchState::operator== | ( | TouchState const & | in_that | ) | const |
Check if the source TouchState is equivalent to this TouchState.
in_kit | The source TouchState to compare to this TouchState. |
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.
in_path | The list of keys up to the window which had focus for this touch event. |
in_event | The touch event. |
in_touches | The touches down during this touch event. |
in_modifiers | The state of modifier keys for this touch event. |
void HPS::TouchState::SetActiveEvent | ( | TouchEvent const & | in_event | ) |
Sets the active event for this TouchState.
in_event | The action for this TouchState. |
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.
in_path | The relevant list of keys up to the window which had focus when the touches represented by this TouchState underwent the active action. |
void HPS::TouchState::SetModifierKeys | ( | ModifierKeys | in_modifiers | ) |
Sets an object representing the state of modifier keys for this TouchState.
in_modifiers | An object representing the state of modifier keys. |
void HPS::TouchState::SetTouches | ( | TouchArray const & | in_touches | ) |
Sets the touches currently down in this TouchState.
in_touches | The list of touches. |