TouchState
-
class
TouchState
: public HPS::Object The TouchState class represents the state of touches on a multi-touch device for a particular event.
Public Functions
-
void
Assign
(TouchState const &in_that) Copies the source TouchState into this TouchState.
Parameters: in_that – The source TouchState to copy.
-
bool
Equals
(TouchState const &in_that) const Check if the source TouchState is equivalent to this TouchState.
Parameters: in_kit – The source TouchState to compare to this TouchState. Returns: true if the objects are equivalent, false otherwise.
-
HPS::TouchEvent
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.
-
HPS::KeyArray
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.
-
HPS::WindowKey
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.
-
ModifierKeys
GetModifierKeys
() const Get an object representing the state of modifier keys for this TouchState.
Returns: An object representing the state of modifier keys.
-
size_t
GetTouchCount
() const Get the number of touches currently down in this TouchState.
Returns: Number of touches.
-
HPS::TouchArray
GetTouches
() const Get the touches currently down in this TouchState.
Returns: The list of touches.
-
inline virtual HPS::Type
ObjectType
() const 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.
-
bool
operator!=
(TouchState const &in_that) const Check if the source TouchState is not equivalent to this TouchState.
Parameters: in_kit – The source TouchState to compare to this TouchState. Returns: true if the objects are not equivalent, false otherwise.
-
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_that – An rvalue reference to a TouchState to take the impl from. Returns: A reference to this TouchState.
-
TouchState &
operator=
(TouchState const &in_that) Copies the source TouchState into this TouchState.
Parameters: in_that – The source TouchState to copy. Returns: A reference to this TouchState.
-
bool
operator==
(TouchState const &in_that) const Check if the source TouchState is equivalent to this TouchState.
Parameters: in_kit – The source TouchState to compare to this TouchState. Returns: true if the objects are equivalent, false otherwise.
-
void
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_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
SetActiveEvent
(TouchEvent const &in_event) Sets the active event for this TouchState.
Parameters: in_event – The action for this TouchState.
-
void
SetEventPath
(KeyArray const &in_path) Sets the relevant list of keys up to the window which had focus for this touch event.
Parameters: 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
SetModifierKeys
(ModifierKeys in_modifiers) Sets an object representing the state of modifier keys for this TouchState.
Parameters: in_modifiers – An object representing the state of modifier keys.
-
void
SetTouches
(TouchArray const &in_touches) Sets the touches currently down in this TouchState.
Parameters: in_touches – The list of touches.
-
TouchState
() The default constructor creates an empty TouchState object.
-
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_that – An rvalue reference to a TouchState to take the impl from.
-
TouchState
(TouchState const &in_that) The copy constructor creates a new TouchState object that contains the same settings as the source TouchState.
Parameters: in_that – The source TouchState to copy.
-
~TouchState
()
-
void