Mouse.h File Reference

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

#include "../base/Types.h"
#include "Unified.h"
#include <vector>

Include dependency graph for Mouse.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  INPUT
namespace  INPUT::MOUSE

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...

Functions

UnifiedButton INPUT::MOUSE::GetUnifiedButton (uint8 button)
 Returns a unified button that represents a specific mouse button.
const std::string & INPUT::MOUSE::GetFriendlyName (uint8 button)
 Returns the friendly name for a mouse button.
bool INPUT::MOUSE::IsButtonDown (uint8 button)
 Returns whether the specified mouse button is currently down.
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.


Detailed Description

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


Generated on Sat Aug 9 15:05:07 2008 for MPMA Framework by  doxygen 1.5.6