This class represents the mouse input device. More...
#include <mouse.h>
Public Member Functions | |||
Mouse () | |||
Class constructor. | |||
virtual | ~Mouse () | ||
Class destructor. | |||
const Input::ButtonState & | GetButtonState (const UInt16 Button) const | ||
const Input::ButtonState & | GetButtonState (const Input::InputCode &Button) const | ||
Boole | GetCursorVisibility () | ||
Gets the current state of the visibility of the cursor. More... | |||
Real | GetDeltaX () const | ||
Gets the X delta of the mouse position from the last update. More... | |||
Real | GetDeltaY () const | ||
Gets the Y delta of the mouse position from the last update. More... | |||
UInt16 | GetDeviceIndex () const | ||
Gets the device index of this controller. More... | |||
const Input::DirectionalMotionState & | GetHorizontalWheelState () const | ||
Gets the current state of the horizontal mouse wheel. More... | |||
Graphics::Viewport * | GetHoveredViewport () const | ||
Gets a pointer to the current viewport the mouse cursor is hovered over. More... | |||
Graphics::GameWindow * | GetHoveredWindow () const | ||
Gets a pointer to the window with the current mouse focus. More... | |||
void | GetMouseCursor () | ||
Gets the current mouse cursor. More... | |||
const Vector2 & | GetMouseDelta () const | ||
Gets the change in the mouse position from the previous update. More... | |||
Boole | GetRelativeMode () | ||
Gets whether or not relative mode is enabled. More... | |||
const Input::DirectionalMotionState & | GetVerticalWheelState () const | ||
Gets the current state of the vertical mouse wheel. More... | |||
Vector2 | GetViewportPosition () const | ||
Gets the position of the mouse cursor relative to the origin of the viewport in the window with the mouse focus. More... | |||
Real | GetViewportX () const | ||
Gets the X position of the mouse relative to the viewport. More... | |||
Real | GetViewportY () const | ||
Gets the Y position of the mouse relative to the viewport. More... | |||
const Vector2 & | GetWindowPosition () const | ||
Gets the position of the mouse cursor relative to the origin of the window with the mouse focus. More... | |||
Real | GetWindowX () const | ||
Gets the X position of the mouse relative to the window. More... | |||
Real | GetWindowY () const | ||
Gets the Y position of the mouse relative to the window. More... | |||
void | SetCursorVisibility (Boole Visible) | ||
Sets the visibility of the mouse cursor. More... | |||
void | SetMouseCursor () | ||
Sets the mouse cursor. | |||
Boole | SetRelativeMode (Boole Enable) | ||
Sets whether or not relative mode is enabled. More... | |||
void | WarpCursorToPosition (Graphics::GameWindow *Win, const Vector2 &Position) | ||
Sets the mouse cursor's position to the specified point in the specified window. More... | |||
Public Member Functions inherited from Mezzanine::Input::ButtonDevice | |||
ButtonDevice () | |||
Class constructor. | |||
virtual | ~ButtonDevice () | ||
Class destructor. | |||
void | _Update (const MetaCodeContainer &DeltaCodes, MetaCodeContainer &GeneratedCodes) | ||
Updates this device with the newest data. More... | |||
Boole | CheckButtonState (const UInt16 Button, const Input::ButtonState &State) const | ||
Checks to see if a button on this device is a specific state. More... | |||
Boole | CheckButtonState (const Input::InputCode &Button, const Input::ButtonState &State) const | ||
Checks to see if a button on this device is a specific state. More... | |||
UInt16 | GetNumButtons () const | ||
Gets the number of buttons on this device. More... | |||
Boole | IsButtonLifting (const UInt16 Button) const | ||
Gets whether or not a device button was lifted this frame. More... | |||
Boole | IsButtonLifting (const Input::InputCode &Button) const | ||
Gets whether or not a device button was lifted this frame. More... | |||
Boole | IsButtonPressed (const UInt16 Button) const | ||
Gets whether or not a device button is pressed down. More... | |||
Boole | IsButtonPressed (const Input::InputCode &Button) const | ||
Gets whether or not a device button is pressed down. More... | |||
Boole | IsButtonPressing (const UInt16 Button) const | ||
Gets whether or not a device button was pressed this frame. More... | |||
Boole | IsButtonPressing (const Input::InputCode &Button) const | ||
Gets whether or not a device button was pressed this frame. More... | |||
Boole | IsButtonTransitioning (const UInt16 Button) const | ||
Gets whether or not a device button was lifted or pressed this frame. More... | |||
Boole | IsButtonTransitioning (const Input::ButtonState &Button) const | ||
Gets whether or not a device button was lifted or pressed this frame. More... | |||
Public Member Functions inherited from Mezzanine::Input::Device | |||
Device () | |||
Class constructor. | |||
virtual | ~Device () | ||
Class destructor. | |||
void | AddInputSequence (const MetaCodeContainer &Codes, const Int32 &SequenceID) | ||
Adds a custom sequence of inputs that this system will look for and generate MetaCode's for when they occur.
| |||
Int32 | GetIDofInputSequence (const MetaCodeContainer &Codes) | ||
Gets the ID of the provided sequence of MetaCode's.
| |||
Boole | InputSequenceExists (const MetaCodeContainer &Codes) | ||
Checks to see if the provided sequence of MetaCode's is already being checked for.
| |||
void | RemoveAllInputSequences () | ||
Removes all stored input sequences. More... | |||
void | RemoveInputSequence (const MetaCodeContainer &Codes) | ||
Removes the specified custom sequence of MetaCode's.
| |||
Protected Member Functions | |
void | AddPressedButtons (MetaCodeContainer &GeneratedCodes) const |
Input::InputCode | ConvertToMultiClickCode (const Input::InputCode Code) const |
Converts a standard mouse button code to the appropriate multiclick code for that button. More... | |
Boole | IsMultiClickable (const Input::InputCode Code) const |
Checks to see if this code pertains to a button we can track multiple clicks for. More... | |
void | UpdateImpl (const MetaCodeContainer &DeltaCodes, MetaCodeContainer &GeneratedCodes) |
void | VerifySequenceImpl (const MetaCodeContainer &Sequence) const |
Protected Member Functions inherited from Mezzanine::Input::ButtonDevice | |
void | UpdateButtonTransitions () |
Updates transitioning buttons. More... | |
Protected Attributes | |
Graphics::Viewport * | CurrentViewport |
The viewport that the mouse cursor is currently in. More... | |
Vector2 | Delta |
The change in the mouse cursor position since the last update. More... | |
Input::DirectionalMotionState | HorizontalWheelState |
The current state of the horizontal mouse wheel (if present). More... | |
MetaCode | MulticlickCode |
A copy of the current MetaCode being tracked for multi-click detection. More... | |
Timer * | MulticlickTimer |
The timer used to detect multi-clicks. More... | |
Vector2 | Position |
The current screen position of the mouse cursor. More... | |
Input::DirectionalMotionState | VerticalWheelState |
The current state of the vertical mouse wheel (if present). More... | |
Protected Attributes inherited from Mezzanine::Input::ButtonDevice | |
std::vector< Input::ButtonState > | Buttons |
A container of states for each button on the input device. More... | |
std::vector< Whole > | TransitioningIndexes |
A container of indexes being tracked due to state transitions. More... | |
Protected Attributes inherited from Mezzanine::Input::Device | |
SequenceContainer | Sequences |
A container for storing and detecting input sequences for an input device. More... | |
|
protectedvirtual |
Implements Mezzanine::Input::ButtonDevice.
|
protected |
|
virtual |
Implements Mezzanine::Input::ButtonDevice.
|
virtual |
Implements Mezzanine::Input::ButtonDevice.
Boole Mezzanine::Input::Mouse::GetCursorVisibility | ( | ) |
Real Mezzanine::Input::Mouse::GetDeltaX | ( | ) | const |
Real Mezzanine::Input::Mouse::GetDeltaY | ( | ) | const |
|
virtual |
Gets the device index of this controller.
Implements Mezzanine::Input::Device.
const Input::DirectionalMotionState & Mezzanine::Input::Mouse::GetHorizontalWheelState | ( | ) | const |
Graphics::Viewport * Mezzanine::Input::Mouse::GetHoveredViewport | ( | ) | const |
Graphics::GameWindow * Mezzanine::Input::Mouse::GetHoveredWindow | ( | ) | const |
void Mezzanine::Input::Mouse::GetMouseCursor | ( | ) |
const Vector2 & Mezzanine::Input::Mouse::GetMouseDelta | ( | ) | const |
Boole Mezzanine::Input::Mouse::GetRelativeMode | ( | ) |
const Input::DirectionalMotionState & Mezzanine::Input::Mouse::GetVerticalWheelState | ( | ) | const |
Vector2 Mezzanine::Input::Mouse::GetViewportPosition | ( | ) | const |
Real Mezzanine::Input::Mouse::GetViewportX | ( | ) | const |
Real Mezzanine::Input::Mouse::GetViewportY | ( | ) | const |
const Vector2 & Mezzanine::Input::Mouse::GetWindowPosition | ( | ) | const |
Real Mezzanine::Input::Mouse::GetWindowX | ( | ) | const |
Real Mezzanine::Input::Mouse::GetWindowY | ( | ) | const |
|
protected |
void Mezzanine::Input::Mouse::SetCursorVisibility | ( | Boole | Visible | ) |
Sets whether or not relative mode is enabled.
Enable | True to enable relative mode, false to disable. |
|
protectedvirtual |
Implements Mezzanine::Input::ButtonDevice.
|
protectedvirtual |
Implements Mezzanine::Input::ButtonDevice.
void Mezzanine::Input::Mouse::WarpCursorToPosition | ( | Graphics::GameWindow * | Win, |
const Vector2 & | Position | ||
) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |