MPMA Framework 0.4
Classes | Namespaces | Functions | Variables
Mouse.h File Reference

Mouse input. Note that all input relies on the window being set up first. More...

Go to the source code of this file.

Classes

struct  INPUT::MOUSE::MousePixelPosition
 In absolute mode, this represents the location of the mouse cursor, measured in pixels from the origin, which is the lower left corner of the window. In relative mode this represents the number of pixels the mouse moved in each direction since the last frame. More...
struct  INPUT::MOUSE::MouseScaledPosition
 Represents the location of the mouse cursor, measured from the origin, which is the lower left corner of the window. Both X and Y are a number between 0 and 1. This is only used in absolute mode. 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.

Variables

const uint8 INPUT::MOUSE::LEFT_BUTTON = 1
 Left mouse button.
const uint8 INPUT::MOUSE::RIGHT_BUTTON = 2
 Right mouse button.
const uint8 INPUT::MOUSE::MIDDLE_BUTTON = 3
 Middle mouse button.
const uint8 INPUT::MOUSE::EXTENDED_BUTTON0 = 4
 Extended mouse button 0.
const uint8 INPUT::MOUSE::EXTENDED_BUTTON1 = 5
 Extended mouse button 1.
const uint8 INPUT::MOUSE::EXTENDED_BUTTON2 = 6
 Extended mouse button 2.
const uint8 INPUT::MOUSE::EXTENDED_BUTTON3 = 7
 Extended mouse button 3.
const uint8 INPUT::MOUSE::EXTENDED_BUTTON4 = 8
 Extended mouse button 4.
const uint8 INPUT::MOUSE::EXTENDED_BUTTON5 = 9
 Extended mouse button 5.
const uint8 INPUT::MOUSE::EXTENDED_BUTTON6 = 10
 Extended mouse button 6.
const uint8 INPUT::MOUSE::EXTENDED_BUTTON7 = 11
 Extended mouse button 7.
const uint8 INPUT::MOUSE::EXTENDED_BUTTON8 = 12
 Extended mouse button 8.
const uint8 INPUT::MOUSE::EXTENDED_BUTTON9 = 13
 Extended mouse button 9.
const uint8 INPUT::MOUSE::WHEEL_UP = 14
 Mouse wheel moved up.
const uint8 INPUT::MOUSE::WHEEL_DOWN = 15
 Mouse wheel moved down.

Detailed Description

Mouse input. Note that all input relies on the window being set up first.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends