MPMA Framework 0.4
Namespaces | Functions
Mouse.cpp File Reference

Mouse input platform-common code. More...

Namespaces

namespace  INPUT
 

Input.


namespace  INPUT::MOUSE
 

Mouse-specific input.


Functions

const std::string & INPUT::MOUSE::GetFriendlyName (uint8 button)
 Returns the friendly name for a mouse button.
const std::string & INPUT::MOUSE::GetPersistentIdentifier (uint8 key)
 Returns an string that can be used to uniquely identify the mouse button again after the program has exited.
uint8 INPUT::MOUSE::FindButton (const std::string &persistentIdentifier)
 Finds a mouse button given a persistent identifier. Returns 0 if not found.
bool INPUT::MOUSE::IsButtonDown (uint8 button)
 Returns whether the specified mouse button is currently down.
bool INPUT::MOUSE::IsButtonNewlyPressed (uint8 button)
 Returns whether the specified mouse button was just pressed within the last frame.
const std::vector< uint8 > & INPUT::MOUSE::GetCurrentlyPressedButtons ()
 Returns a list of mouse buttons that are currently pressed down.
const std::vector< uint8 > & INPUT::MOUSE::GetNewlyPressedButtons ()
 Returns a list of mouse buttons that were newly pressed within the last frame.
int INPUT::MOUSE::GetWheelDirection ()
 Returns the most recent scroll direction of the mouse wheel, counted in number of wheel ticks. The value can be negative or positive, or 0 if no movement occured.
MouseScaledPosition INPUT::MOUSE::GetScaledPosition ()
 Returns the location of the mouse within the window, where X and Y are a value between 0 and 1. This function is only usable in absolute mode, and always returns 0s in relative mode.
const std::vector
< MouseScaledPosition > & 
INPUT::MOUSE::GetScaledTrail ()
 Same as GetScaledPosition(), except this returns a list of all known locations that the server passed over since the last frame.
MousePixelPosition INPUT::MOUSE::GetPixelPosition ()
 Returns the location of the mouse within the window, measured in pixels. In absolute mode this returns the location of the cursor relative to the origin. In relative mode this returns the number of pixels in each direction that the mouse moved since last frame.
const std::vector
< MousePixelPosition > & 
INPUT::MOUSE::GetPixelTrail ()
 Same as GetPixelPosition, except this returns a list of all known locations that the server passed over since the last frame. This function is only valid in absolute mode, and returns an empty list in relative mode.

Detailed Description

Mouse input platform-common code.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends