Hoops Visualize HPS  version 2018-SP2
Hoops Visualize HPS 3D Rendering Engine
Looking for a senior C++ dev?
I'm looking for work. Hire me!
HPS::MouseButtons Class Reference

Mouse buttons that could be active for a MouseEvent. More...

#include <hps.h>

Collaboration diagram for HPS::MouseButtons:

Public Member Functions

 MouseButtons ()
 The default constructor creates a MouseButtons object with no modifiers active. More...
 
bool Equals (MouseButtons const &in_that) const
 Check if the source object is equivalent to this object. More...
 
bool operator== (MouseButtons const &in_that) const
 Check if the source object is equivalent to this object. More...
 
bool operator!= (MouseButtons const &in_that) const
 Check if the source object is not equivalent to this object. More...
 
bool None () const
 Indicates whether no buttons are active. More...
 
bool Left () const
 Indicates whether the left button is down. More...
 
bool Right () const
 Indicates whether the right button is down. More...
 
bool Middle () const
 Indicates whether the middle button is down. More...
 
bool X1 () const
 Indicates whether the X1 button is down. More...
 
bool X2 () const
 Indicates whether the X2 button is down. More...
 
bool HasAll (MouseButtons const &in_buttons) const
 Indicates whether all buttons of the input parameter are present in this object. More...
 
bool HasAny (MouseButtons const &in_buttons) const
 Indicates whether any buttons of the input parameter are present in this object. More...
 
void Left (bool in_state)
 Sets the state of the left button. More...
 
void Right (bool in_state)
 Sets the state of the right button. More...
 
void Middle (bool in_state)
 Sets the state of the middle button. More...
 
void X1 (bool in_state)
 Sets the state of the X1 button. More...
 
void X2 (bool in_state)
 Sets the state of the X2 button. More...
 
MouseButtons operator+ (MouseButtons const &in_buttons_to_merge)
 Merges the buttons from two MouseButtons objects. More...
 
MouseButtons operator- (MouseButtons const &in_buttons_to_remove)
 Creates a new MouseButtons object representing the removal of the buttons of another MouseButtons object from this object. More...
 
MouseButtonsoperator+= (MouseButtons const &in_buttons_to_merge)
 Merges the buttons from another MouseButtons object into this one. More...
 
MouseButtonsoperator-= (MouseButtons const &in_buttons_to_remove)
 Removes the buttons of another MouseButtons object from this one. More...
 

Static Public Member Functions

static MouseButtons ButtonLeft ()
 Creates a new MouseButtons object with the left button active. More...
 
static MouseButtons ButtonRight ()
 Creates a new MouseButtons object with the right button active. More...
 
static MouseButtons ButtonMiddle ()
 Creates a new MouseButtons object with the middle button active. More...
 
static MouseButtons ButtonX1 ()
 Creates a new MouseButtons object with the X1 button active. More...
 
static MouseButtons ButtonX2 ()
 Creates a new MouseButtons object with the X2 button active. More...
 

Protected Types

enum  Buttons {
  _button_none = 0x0000,
  _button_left = 0x0001,
  _button_right = 0x0002,
  _button_middle = 0x0004,
  _button_x1 = 0x0008,
  _button_x2 = 0x0010
}
 Mouse button bitfield constants. More...
 

Protected Attributes

int buttons
 

Detailed Description

Mouse buttons that could be active for a MouseEvent.

Member Enumeration Documentation

◆ Buttons

Mouse button bitfield constants.

Enumerator
_button_none 
_button_left 
_button_right 
_button_middle 
_button_x1 
_button_x2 

Constructor & Destructor Documentation

◆ MouseButtons()

HPS::MouseButtons::MouseButtons ( )
inline

The default constructor creates a MouseButtons object with no modifiers active.

Member Function Documentation

◆ ButtonLeft()

static MouseButtons HPS::MouseButtons::ButtonLeft ( )
inlinestatic

Creates a new MouseButtons object with the left button active.

Returns
A new MouseButtons object with the left button active.
Here is the call graph for this function:

◆ ButtonMiddle()

static MouseButtons HPS::MouseButtons::ButtonMiddle ( )
inlinestatic

Creates a new MouseButtons object with the middle button active.

Returns
A new MouseButtons object with the middle button active.
Here is the call graph for this function:

◆ ButtonRight()

static MouseButtons HPS::MouseButtons::ButtonRight ( )
inlinestatic

Creates a new MouseButtons object with the right button active.

Returns
A new MouseButtons object with the right button active.
Here is the call graph for this function:

◆ ButtonX1()

static MouseButtons HPS::MouseButtons::ButtonX1 ( )
inlinestatic

Creates a new MouseButtons object with the X1 button active.

Returns
A new MouseButtons object with the X1 button active.
Here is the call graph for this function:

◆ ButtonX2()

static MouseButtons HPS::MouseButtons::ButtonX2 ( )
inlinestatic

Creates a new MouseButtons object with the X2 button active.

Returns
A new MouseButtons object with the X2 button active.
Here is the call graph for this function:

◆ Equals()

bool HPS::MouseButtons::Equals ( MouseButtons const &  in_that) const
inline

Check if the source object is equivalent to this object.

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

◆ HasAll()

bool HPS::MouseButtons::HasAll ( MouseButtons const &  in_buttons) const
inline

Indicates whether all buttons of the input parameter are present in this object.

Parameters
in_buttonsA collection of mouse buttons to check against this object.
Returns
true if all of the input buttons are active, false otherwise.

◆ HasAny()

bool HPS::MouseButtons::HasAny ( MouseButtons const &  in_buttons) const
inline

Indicates whether any buttons of the input parameter are present in this object.

Parameters
in_buttonsA collection of mouse buttons to check against this object.
Returns
true if any of the input buttons are active, false otherwise.

◆ Left() [1/2]

bool HPS::MouseButtons::Left ( ) const
inline

Indicates whether the left button is down.

Returns
true if the left button is down, false otherwise.
Here is the caller graph for this function:

◆ Left() [2/2]

void HPS::MouseButtons::Left ( bool  in_state)
inline

Sets the state of the left button.

Parameters
in_statetrue if the button is down, false otherwise.

◆ Middle() [1/2]

bool HPS::MouseButtons::Middle ( ) const
inline

Indicates whether the middle button is down.

Returns
true if the middle button is down, false otherwise.
Here is the caller graph for this function:

◆ Middle() [2/2]

void HPS::MouseButtons::Middle ( bool  in_state)
inline

Sets the state of the middle button.

Parameters
in_statetrue if the button is down, false otherwise.

◆ None()

bool HPS::MouseButtons::None ( ) const
inline

Indicates whether no buttons are active.

Returns
true if no mouse buttons are active, false otherwise.

◆ operator!=()

bool HPS::MouseButtons::operator!= ( MouseButtons const &  in_that) const
inline

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

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

◆ operator+()

MouseButtons HPS::MouseButtons::operator+ ( MouseButtons const &  in_buttons_to_merge)
inline

Merges the buttons from two MouseButtons objects.

Parameters
in_buttons_to_mergeA collection of mouse buttons to merge with the buttons of this object.
Returns
A new MouseButtons object.

◆ operator+=()

MouseButtons& HPS::MouseButtons::operator+= ( MouseButtons const &  in_buttons_to_merge)
inline

Merges the buttons from another MouseButtons object into this one.

Parameters
in_buttons_to_mergeA collection of mouse buttons to merge with the buttons of this object.
Returns
A reference to this object.

◆ operator-()

MouseButtons HPS::MouseButtons::operator- ( MouseButtons const &  in_buttons_to_remove)
inline

Creates a new MouseButtons object representing the removal of the buttons of another MouseButtons object from this object.

Parameters
in_buttons_to_removeA collection of mouse buttons to remove from those of this object.
Returns
A new MouseButtons object.

◆ operator-=()

MouseButtons& HPS::MouseButtons::operator-= ( MouseButtons const &  in_buttons_to_remove)
inline

Removes the buttons of another MouseButtons object from this one.

Parameters
in_buttons_to_removeA collection of mouse buttons to remove from those of this object.
Returns
A reference to this object.

◆ operator==()

bool HPS::MouseButtons::operator== ( MouseButtons const &  in_that) const
inline

Check if the source object is equivalent to this object.

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

◆ Right() [1/2]

bool HPS::MouseButtons::Right ( ) const
inline

Indicates whether the right button is down.

Returns
true if the right button is down, false otherwise.
Here is the caller graph for this function:

◆ Right() [2/2]

void HPS::MouseButtons::Right ( bool  in_state)
inline

Sets the state of the right button.

Parameters
in_statetrue if the button is down, false otherwise.

◆ X1() [1/2]

bool HPS::MouseButtons::X1 ( ) const
inline

Indicates whether the X1 button is down.

Returns
true if the X1 button is down, false otherwise.
Here is the caller graph for this function:

◆ X1() [2/2]

void HPS::MouseButtons::X1 ( bool  in_state)
inline

Sets the state of the X1 button.

Parameters
in_statetrue if the button is down, false otherwise.

◆ X2() [1/2]

bool HPS::MouseButtons::X2 ( ) const
inline

Indicates whether the X2 button is down.

Returns
true if the X2 button is down, false otherwise.
Here is the caller graph for this function:

◆ X2() [2/2]

void HPS::MouseButtons::X2 ( bool  in_state)
inline

Sets the state of the X2 button.

Parameters
in_statetrue if the button is down, false otherwise.

Member Data Documentation

◆ buttons

int HPS::MouseButtons::buttons
protected

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