#include <hps.h>
Public Member Functions | |
void | Assign (MouseState const &in_that) |
bool | Equals (MouseState const &in_that) const |
HPS::MouseEvent | GetActiveEvent () const |
MouseButtons | GetButtons () const |
HPS::KeyArray | GetEventPath () const |
HPS::WindowKey | GetEventSource () const |
WindowPoint | GetLocation () const |
ModifierKeys | GetModifierKeys () const |
bool | HasAll (MouseButtons in_mouse_trigger, ModifierKeys in_modifier_trigger) const |
MouseState () | |
MouseState (MouseState const &in_that) | |
MouseState (MouseState &&in_that) | |
HPS::Type | ObjectType () const |
bool | operator!= (MouseState const &in_that) const |
MouseState & | operator= (MouseState &&in_that) |
MouseState & | operator= (MouseState const &in_that) |
bool | operator== (MouseState const &in_that) const |
void | Set (KeyArray const &in_path, MouseEvent const &in_event, WindowPoint const &in_point, MouseButtons in_buttons=MouseButtons(), ModifierKeys in_modifiers=ModifierKeys()) |
void | SetActiveEvent (MouseEvent const &in_event) |
void | SetButtons (MouseButtons in_buttons) |
void | SetEventPath (KeyArray const &in_path) |
void | SetLocation (WindowPoint const &in_point) |
void | SetModifierKeys (ModifierKeys in_modifiers) |
![]() | |
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) | |
Object & | operator= (Object const &other_object) |
Object & | operator= (Object &&in_that) |
virtual void | Reset () |
HPS::Type | Type () const |
Additional Inherited Members | |
![]() | |
template<typename T > | |
static intptr_t | ClassID () |
The MouseState class represents the state of the mouse or similar pointer device for a particular event.
HPS::MouseState::MouseState | ( | ) |
The default constructor creates an empty MouseState object.
HPS::MouseState::MouseState | ( | MouseState const & | in_that | ) |
The copy constructor creates a new MouseState object that contains the same settings as the source MouseState.
in_that | The source MouseState to copy. |
HPS::MouseState::MouseState | ( | MouseState && | in_that | ) |
The move constructor creates a MouseState by transferring the underlying impl of the rvalue reference to this MouseState thereby avoiding a copy and allocation.
in_that | An rvalue reference to a MouseState to take the impl from. |
void HPS::MouseState::Assign | ( | MouseState const & | in_that | ) |
Copies the source MouseState into this MouseState.
in_that | The source MouseState to copy. |
bool HPS::MouseState::Equals | ( | MouseState const & | in_that | ) | const |
Check if the source MouseState is equivalent to this MouseState.
in_kit | The source MouseState to compare to this MouseState. |
HPS::MouseEvent HPS::MouseState::GetActiveEvent | ( | ) | const |
Get the active event for this MouseState. This will throw an exception if there is no active action for this MouseState.
MouseButtons HPS::MouseState::GetButtons | ( | ) | const |
Get the current state of the mouse buttons immediately after the active event.
HPS::KeyArray HPS::MouseState::GetEventPath | ( | ) | const |
Get the relevant list of keys up to the window which had focus when the mouse represented by this MouseState underwent the active action. This will throw an exception if there is no event path for this MouseState.
HPS::WindowKey HPS::MouseState::GetEventSource | ( | ) | const |
Get the window which had focus when the mouse represented by this MouseState underwent the active action. This will throw an exception if there is no event source for this MouseState.
WindowPoint HPS::MouseState::GetLocation | ( | ) | const |
Get the current mouse position.
ModifierKeys HPS::MouseState::GetModifierKeys | ( | ) | const |
Get an object representing the state of modifier keys for this MouseState.
bool HPS::MouseState::HasAll | ( | MouseButtons | in_mouse_trigger, |
ModifierKeys | in_modifier_trigger | ||
) | const |
Checks if this MouseState has all of the specified properties.
in_mouse_trigger | The mouse button properties to test for. |
in_modifier_trigger | The modifier keys properties to test for. |
|
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::MouseState::operator!= | ( | MouseState const & | in_that | ) | const |
Check if the source MouseState is not equivalent to this MouseState.
in_kit | The source MouseState to compare to this MouseState. |
MouseState& HPS::MouseState::operator= | ( | MouseState && | in_that | ) |
The move assignment operator transfers the underlying impl of the rvalue reference to this MouseState thereby avoiding a copy.
in_that | An rvalue reference to a MouseState to take the impl from. |
MouseState& HPS::MouseState::operator= | ( | MouseState const & | in_that | ) |
Copies the source MouseState into this MouseState.
in_that | The source MouseState to copy. |
bool HPS::MouseState::operator== | ( | MouseState const & | in_that | ) | const |
Check if the source MouseState is equivalent to this MouseState.
in_kit | The source MouseState to compare to this MouseState. |
void HPS::MouseState::Set | ( | KeyArray const & | in_path, |
MouseEvent const & | in_event, | ||
WindowPoint const & | in_point, | ||
MouseButtons | in_buttons = MouseButtons() , |
||
ModifierKeys | in_modifiers = ModifierKeys() |
||
) |
Sets the properties of this MouseState.
in_path | The list of keys up to the window which had focus for this mouse event. |
in_event | The mouse event. |
in_point | The location, in window space of the mouse cursor for this mouse event. |
in_buttons | The state of the mouse buttons immediately after this mouse event. |
in_modifiers | The state of modifier keys for this mouse event. |
void HPS::MouseState::SetActiveEvent | ( | MouseEvent const & | in_event | ) |
Sets the active event for this MouseState.
in_event | The action for this MouseState. |
void HPS::MouseState::SetButtons | ( | MouseButtons | in_buttons | ) |
Sets the current state of the mouse buttons immediately after the active event.
in_buttons | The state of the mouse buttons. |
void HPS::MouseState::SetEventPath | ( | KeyArray const & | in_path | ) |
Sets the relevant list of keys up to the window which had focus for this mouse event.
in_path | The relevant list of keys up to the window which had focus when the mouse event represented by this MouseState underwent the active action. |
void HPS::MouseState::SetLocation | ( | WindowPoint const & | in_point | ) |
Sets the current mouse position.
in_point | The location, in window space of the mouse cursor. |
void HPS::MouseState::SetModifierKeys | ( | ModifierKeys | in_modifiers | ) |
Sets an object representing the state of modifier keys for this MouseState.
in_modifiers | An object representing the state of modifier keys. |