< Home

< Table of Contents

REFERENCE MANUAL

MouseState Class Reference

#include <hps.h>

Inheritance diagram for MouseState:
Object

Public Member Functions

void Assign (MouseState const &in_that)
 
bool Equals (MouseState const &in_that) const
 
MouseEvent GetActiveEvent () const
 
MouseButtons GetButtons () const
 
KeyArray GetEventPath () const
 
WindowKey GetEventSource () const
 
WindowPoint GetLocation () const
 
ModifierKeys GetModifierKeys () const
 
 MouseState ()
 
 MouseState (MouseState const &in_that)
 
 MouseState (MouseState &&in_that)
 
Type ObjectType () const
 
bool operator!= (MouseState const &in_that) const
 
MouseStateoperator= (MouseState &&in_that)
 
MouseStateoperator= (MouseState const &in_that)
 
bool operator== (MouseState const &in_that) const
 
- Public Member Functions inherited from Object
virtual bool Empty () const
 
intptr_t GetClassID () const
 
intptr_t GetInstanceID () const
 
bool HasType (Type in_mask) const
 
 Object (Object &&in_that)
 
Objectoperator= (Object const &other_object)
 
Objectoperator= (Object &&in_that)
 
virtual void Reset ()
 
Type Type () const
 

Additional Inherited Members

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

Detailed Description

The MouseState class represents the state of the mouse or similar pointer device for a particular event.

Constructor & Destructor Documentation

MouseState::MouseState ( )

The default constructor creates an empty MouseState object.

MouseState::MouseState ( MouseState const &  in_that)

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

Parameters
in_thatThe source MouseState to copy.
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.

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

Member Function Documentation

void MouseState::Assign ( MouseState const &  in_that)

Copies the source MouseState into this MouseState.

Parameters
in_thatThe source MouseState to copy.
bool MouseState::Equals ( MouseState const &  in_that) const

Check if the source MouseState is equivalent to this MouseState.

Parameters
in_kitThe source MouseState to compare to this MouseState.
Returns
true if the objects are equivalent, false otherwise.
MouseEvent MouseState::GetActiveEvent ( ) const

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

Returns
The action for this MouseState.
MouseButtons MouseState::GetButtons ( ) const

Get the current state of the mouse buttons immediately after the active event.

Returns
The state of the mouse buttons.

Referenced by Operator::IsMouseTriggered().

KeyArray 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.

Returns
The relevant list of keys up to the window which had focus when the mouse represented by this MouseState underwent the active action.
WindowKey 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.

Returns
The window which had focus when the mouse represented by this MouseState underwent the active action.
WindowPoint MouseState::GetLocation ( ) const

Get the current mouse position.

Returns
The location, in window space of the mouse cursor.
ModifierKeys MouseState::GetModifierKeys ( ) const

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

Returns
An object representing the state of modifier keys.

Referenced by Operator::IsMouseTriggered().

Type MouseState::ObjectType ( ) const
inlinevirtual

This function returns the type the object, as declared. This does not necessarily give the true type of the underlying object.

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

Reimplemented from Object.

bool MouseState::operator!= ( MouseState const &  in_that) const

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

Parameters
in_kitThe source MouseState to compare to this MouseState.
Returns
true if the objects are not equivalent, false otherwise.
MouseState& MouseState::operator= ( MouseState &&  in_that)

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

Parameters
in_thatAn rvalue reference to a MouseState to take the impl from.
Returns
A reference to this MouseState.
MouseState& MouseState::operator= ( MouseState const &  in_that)

Copies the source MouseState into this MouseState.

Parameters
in_thatThe source MouseState to copy.
Returns
A reference to this MouseState.
bool MouseState::operator== ( MouseState const &  in_that) const

Check if the source MouseState is equivalent to this MouseState.

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

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