Represents a mouse button in the controller API.
More...
#include <luciad/input/mouse/MouseButton.h>
|
| constexpr | MouseButton (size_t index) |
| | Creates a new MouseButton with the given index.
|
| constexpr bool | isLeft () const |
| | Returns whether the button is the left mouse button.
|
| constexpr bool | isMiddle () const |
| | Returns whether the button is the middle mouse button.
|
| constexpr bool | isRight () const |
| | Returns whether the button is the right mouse button.
|
| constexpr bool | isUnknown () const |
| | Returns whether the button is unknown.
|
| constexpr bool | operator!= (const MouseButton &rhs) const |
| constexpr bool | operator== (const MouseButton &rhs) const |
|
| size_t | index |
| | The mouse button index.
|
Represents a mouse button in the controller API.
- Since
- 2020.1
◆ MouseButton()
| luciad::MouseButton::MouseButton |
( |
size_t | index | ) |
|
|
inlineexplicitconstexpr |
Creates a new MouseButton with the given index.
The mouse button index maps to mouse buttons as follows:
- 0 => unknown button
- 1 => left mouse button (primary button)
- 2 => middle mouse button
- 3 => right mouse button
Unmapped values can be used to express a custom mouse button.
- Parameters
-
| index | the mouse button index. |
◆ isLeft()
| bool luciad::MouseButton::isLeft |
( |
| ) |
const |
|
inlineconstexpr |
Returns whether the button is the left mouse button.
- Returns
- whether the button is the left mouse button.
◆ isMiddle()
| bool luciad::MouseButton::isMiddle |
( |
| ) |
const |
|
inlineconstexpr |
Returns whether the button is the middle mouse button.
- Returns
- whether the button is the middle mouse button.
◆ isRight()
| bool luciad::MouseButton::isRight |
( |
| ) |
const |
|
inlineconstexpr |
Returns whether the button is the right mouse button.
- Returns
- whether the button is the right mouse button.
◆ isUnknown()
| bool luciad::MouseButton::isUnknown |
( |
| ) |
const |
|
inlineconstexpr |
Returns whether the button is unknown.
- Returns
- whether the button is unknown.
◆ left()
Returns the left mouse button.
- Returns
- the left mouse button.
◆ middle()
Returns the middle mouse button.
- Returns
- the middle mouse button.
◆ operator!=()
| bool luciad::MouseButton::operator!= |
( |
const MouseButton & | rhs | ) |
const |
|
inlineconstexpr |
- Parameters
-
- Returns
- true if the MouseButtons are not equal
◆ operator==()
| bool luciad::MouseButton::operator== |
( |
const MouseButton & | rhs | ) |
const |
|
inlineconstexpr |
- Parameters
-
- Returns
- true if the MouseButtons are equal
◆ right()
Returns the right mouse button.
- Returns
- the right mouse button.
◆ unknown()
Returns an unknown mouse button.
- Returns
- an unknown mouse button.
◆ index
| size_t luciad::MouseButton::index |