This class implements mouse functionalities.
More...
#include <Mouse.h>
|
static bool | allButtonsDown (const Button buttons, const bool synchron=true) |
| Returns whether all specified buttons of the mouse are currently pushed (down) or not.
|
|
static bool | oneButtonDown (const Button buttons, const bool synchron=true) |
| Returns whether at least one button of the specified buttons of the mouse is currently pushed (down) or not.
|
|
static bool | isButtonDown (const Button button, const bool synchron=true) |
| Returns wheater exactly one (specified button) is currently pushed (down) or not.
|
|
static Button | currentMouseButtonState (const bool synchron=true) |
| Returns the current mouse button state for the left, middle and right mouse button.
|
|
static VectorI2 | screenPosition () |
| Returns the current position of the mouse (cursor) in screen coordinates.
|
|
|
static bool | keyState (const int nVirtualKey, const bool synchron) |
| Returns wheater exactly one (specified mouse button) is currently pushed (down) or not.
|
|
|
enum | Button {
BUTTON_NONE = 0
, BUTTON_LEFT = (1 << 0)
, BUTTON_MIDDLE = (1 << 1)
, BUTTON_RIGHT = (1 << 2)
,
BUTTON_LAST_UNIQUE_VALUE = (1 << 2)
} |
| Definition of individual mouse buttons. More...
|
|
static bool | allButtonsDown (const Button buttons, const bool synchron=true) |
| Returns whether all specified buttons of the mouse are currently pushed (down) or not.
|
|
static bool | oneButtonDown (const Button buttons, const bool synchron=true) |
| Returns whether at least one button of the specified buttons of the mouse is currently pushed (down) or not.
|
|
static bool | isButtonDown (const Button button, const bool synchron=true) |
| Returns whether exactly one (specified button) is currently pushed (down) or not.
|
|
static Button | currentMouseButtonState (const bool synchron=true) |
| Returns the current mouse button state for the left, middle and right mouse button.
|
|
static VectorI2 | screenPosition (const VectorI2 &invalidPosition=VectorI2(NumericT< int >::minValue(), NumericT< int >::minValue())) |
| Returns the current position of the mouse/cursor in screen coordinates.
|
|
static bool | isButtonDownWindows (const Button button, const bool synchron=true) |
| Returns whether exactly one (specified button) is currently pushed (down) or not (specialization for Windows).
|
|
static bool | keyStateWindows (const int nVirtualKey, const bool synchron) |
| Returns whether exactly one (specified key) is currently pushed (down) or not.
|
|
static VectorI2 | screenPositionWindows (const VectorI2 &invalidPosition=VectorI2(NumericT< int >::minValue(), NumericT< int >::minValue())) |
| Returns the current position of the mouse/cursor in screen coordinates (specialization for Windows).
|
|
static bool | isButtonDownApple (const Button button, const bool synchron=true) |
| Returns whether exactly one (specified button) is currently pushed (down) or not (specialization for Apple platforms).
|
|
static VectorI2 | screenPositionApple (const VectorI2 &invalidPosition=VectorI2(NumericT< int >::minValue(), NumericT< int >::minValue())) |
| Returns the current position of the mouse/cursor in screen coordinates (specialization for Apple platforms).
|
|
This class implements mouse functionalities.
◆ allButtonsDown()
static bool Ocean::Platform::Win::Mouse::allButtonsDown |
( |
const Button |
buttons, |
|
|
const bool |
synchron = true |
|
) |
| |
|
static |
Returns whether all specified buttons of the mouse are currently pushed (down) or not.
- Parameters
-
buttons | The buttons for that the states are requested (may be a combination of several buttons) |
synchron | True, to request the state synchronously with the message queue; False, to request the state in the current moment |
- Returns
- True, if so; also True if no button is provided
◆ currentMouseButtonState()
static Button Ocean::Platform::Win::Mouse::currentMouseButtonState |
( |
const bool |
synchron = true | ) |
|
|
static |
Returns the current mouse button state for the left, middle and right mouse button.
- Parameters
-
synchron | True, to request the state synchronously with the message queue; False, to request the state in the current moment |
- Returns
- Current mouse button state
◆ isButtonDown()
static bool Ocean::Platform::Win::Mouse::isButtonDown |
( |
const Button |
button, |
|
|
const bool |
synchron = true |
|
) |
| |
|
static |
Returns wheater exactly one (specified button) is currently pushed (down) or not.
- Parameters
-
button | One unique button for that the state is requested, must not be a combination of several buttons |
synchron | True, to request the state synchronously with the message queue; False, to request the state in the current moment |
- Returns
- True, if so
◆ keyState()
bool Ocean::Platform::Win::Mouse::keyState |
( |
const int |
nVirtualKey, |
|
|
const bool |
synchron |
|
) |
| |
|
inlinestaticprotected |
Returns wheater exactly one (specified mouse button) is currently pushed (down) or not.
- Parameters
-
nVirtualKey | The virtual key code for that the state is requested |
synchron | True, to request the state synchronously with the message queue; False, to request the state in the current moment |
- Returns
- True, if so
◆ oneButtonDown()
static bool Ocean::Platform::Win::Mouse::oneButtonDown |
( |
const Button |
buttons, |
|
|
const bool |
synchron = true |
|
) |
| |
|
static |
Returns whether at least one button of the specified buttons of the mouse is currently pushed (down) or not.
- Parameters
-
buttons | The buttons for that the states are requested (may be a combination of several buttons) |
synchron | True, to request the state synchronously with the message queue; False, to request the state in the current moment |
- Returns
- True, if so; also True if no button is provided
◆ screenPosition()
static VectorI2 Ocean::Platform::Win::Mouse::screenPosition |
( |
| ) |
|
|
static |
Returns the current position of the mouse (cursor) in screen coordinates.
- Returns
- Mouse screen coordinates
The documentation for this class was generated from the following file: