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 | ||
bool | 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... | |||
bool | 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 (bool Visible) | ||
Sets the visibility of the mouse cursor. More... | |||
void | SetMouseCursor () | ||
Sets the mouse cursor. | |||
bool | SetRelativeMode (bool 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... | |||
bool | CheckButtonState (const UInt16 Button, const Input::ButtonState &State) const | ||
Checks to see if a button on this device is a specific state. More... | |||
bool | 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... | |||
bool | IsButtonLifting (const UInt16 Button) const | ||
Gets whether or not a device button was lifted this frame. More... | |||
bool | IsButtonLifting (const Input::InputCode &Button) const | ||
Gets whether or not a device button was lifted this frame. More... | |||
bool | IsButtonPressed (const UInt16 Button) const | ||
Gets whether or not a device button is pressed down. More... | |||
bool | IsButtonPressed (const Input::InputCode &Button) const | ||
Gets whether or not a device button is pressed down. More... | |||
bool | IsButtonPressing (const UInt16 Button) const | ||
Gets whether or not a device button was pressed this frame. More... | |||
bool | IsButtonPressing (const Input::InputCode &Button) const | ||
Gets whether or not a device button was pressed this frame. More... | |||
bool | IsButtonTransitioning (const UInt16 Button) const | ||
Gets whether or not a device button was lifted or pressed this frame. More... | |||
bool | 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.
| |||
bool | 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... | |
bool | 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 |
Vector2 | Delta |
Input::DirectionalMotionState | HorizontalWheelState |
MetaCode | MulticlickCode |
StopWatchTimer * | MulticlickTimer |
Vector2 | Position |
Input::DirectionalMotionState | VerticalWheelState |
Protected Attributes inherited from Mezzanine::Input::ButtonDevice | |
std::vector< Input::ButtonState > | Buttons |
std::vector< Whole > | TransitioningIndexes |
Protected Attributes inherited from Mezzanine::Input::Device | |
SequenceContainer | Sequences |
|
protectedvirtual |
Implements Mezzanine::Input::ButtonDevice.
|
protected |
|
virtual |
Implements Mezzanine::Input::ButtonDevice.
|
virtual |
Implements Mezzanine::Input::ButtonDevice.
bool 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 |
bool 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 | ( | bool | Visible) |
bool Mezzanine::Input::Mouse::SetRelativeMode | ( | bool | Enable) |
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 | ||
) |