OpenTK.Input.MouseDevice Class Reference

Represents a mouse device and provides methods to query its status. More...

Inheritance diagram for OpenTK.Input.MouseDevice:
OpenTK.Input.IInputDevice

List of all members.

Public Member Functions

override int GetHashCode ()
 Calculates the hash code for this instance.
override string ToString ()
 Returns a System.String that describes this instance.

Properties

string Description [get, set]
 Gets a string describing this MouseDevice.
InputDeviceType DeviceType [get]
 Gets a value indicating the InputDeviceType of this InputDevice.
int NumberOfButtons [get, set]
 Gets an integer representing the number of buttons on this MouseDevice.
int NumberOfWheels [get, set]
 Gets an integer representing the number of wheels on this MouseDevice.
IntPtr DeviceID [get, set]
 Gets an IntPtr representing a device dependent ID.
int Wheel [get, set]
 Gets the absolute wheel position in integer units. To support high-precision mice, it is recommended to use WheelPrecise instead.
float WheelPrecise [get, set]
 Gets the absolute wheel position in floating-point units.
int X [get]
 Gets an integer representing the absolute x position of the pointer, in window pixel coordinates.
int Y [get]
 Gets an integer representing the absolute y position of the pointer, in window pixel coordinates.
bool this [MouseButton button] [get, set]
 Gets a System.Boolean indicating the state of the specified MouseButton.

Events

EventHandler< MouseMoveEventArgsMove = delegate { }
 Occurs when the mouse's position is moved.
EventHandler
< MouseButtonEventArgs
ButtonDown = delegate { }
 Occurs when a button is pressed.
EventHandler
< MouseButtonEventArgs
ButtonUp = delegate { }
 Occurs when a button is released.
EventHandler< MouseWheelEventArgsWheelChanged = delegate { }
 Occurs when one of the mouse wheels is moved.

Detailed Description

Represents a mouse device and provides methods to query its status.

Definition at line 41 of file MouseDevice.cs.


Member Function Documentation

override int OpenTK.Input.MouseDevice.GetHashCode (  ) 

Calculates the hash code for this instance.

Returns:

Definition at line 276 of file MouseDevice.cs.

00277         {
00278             return (int)(numButtons ^ numWheels ^ id.GetHashCode() ^ description.GetHashCode());
00279         }

override string OpenTK.Input.MouseDevice.ToString (  ) 

Returns a System.String that describes this instance.

Returns:
A System.String that describes this instance.

Definition at line 285 of file MouseDevice.cs.

00286         {
00287             return String.Format("ID: {0} ({1}). Buttons: {2}, Wheels: {3}",
00288                 DeviceID, Description, NumberOfButtons, NumberOfWheels);
00289         }


Property Documentation

string OpenTK.Input.MouseDevice.Description [get, set]

Gets a string describing this MouseDevice.

Implements OpenTK.Input.IInputDevice.

Definition at line 69 of file MouseDevice.cs.

IntPtr OpenTK.Input.MouseDevice.DeviceID [get, set]

Gets an IntPtr representing a device dependent ID.

Definition at line 124 of file MouseDevice.cs.

InputDeviceType OpenTK.Input.MouseDevice.DeviceType [get]

Gets a value indicating the InputDeviceType of this InputDevice.

Implements OpenTK.Input.IInputDevice.

Definition at line 82 of file MouseDevice.cs.

int OpenTK.Input.MouseDevice.NumberOfButtons [get, set]

Gets an integer representing the number of buttons on this MouseDevice.

Definition at line 98 of file MouseDevice.cs.

int OpenTK.Input.MouseDevice.NumberOfWheels [get, set]

Gets an integer representing the number of wheels on this MouseDevice.

Definition at line 111 of file MouseDevice.cs.

bool OpenTK.Input.MouseDevice.this[MouseButton button] [get, set]

Gets a System.Boolean indicating the state of the specified MouseButton.

Parameters:
button The MouseButton to check.
Returns:
True if the MouseButton is pressed, false otherwise.

Definition at line 198 of file MouseDevice.cs.

int OpenTK.Input.MouseDevice.Wheel [get, set]

Gets the absolute wheel position in integer units. To support high-precision mice, it is recommended to use WheelPrecise instead.

Definition at line 138 of file MouseDevice.cs.

float OpenTK.Input.MouseDevice.WheelPrecise [get, set]

Gets the absolute wheel position in floating-point units.

Definition at line 147 of file MouseDevice.cs.

int OpenTK.Input.MouseDevice.X [get]

Gets an integer representing the absolute x position of the pointer, in window pixel coordinates.

Definition at line 172 of file MouseDevice.cs.

int OpenTK.Input.MouseDevice.Y [get]

Gets an integer representing the absolute y position of the pointer, in window pixel coordinates.

Definition at line 184 of file MouseDevice.cs.


Event Documentation

EventHandler<MouseButtonEventArgs> OpenTK.Input.MouseDevice.ButtonDown = delegate { }

Occurs when a button is pressed.

Definition at line 258 of file MouseDevice.cs.

EventHandler<MouseButtonEventArgs> OpenTK.Input.MouseDevice.ButtonUp = delegate { }

Occurs when a button is released.

Definition at line 263 of file MouseDevice.cs.

EventHandler<MouseMoveEventArgs> OpenTK.Input.MouseDevice.Move = delegate { }

Occurs when the mouse's position is moved.

Definition at line 253 of file MouseDevice.cs.

EventHandler<MouseWheelEventArgs> OpenTK.Input.MouseDevice.WheelChanged = delegate { }

Occurs when one of the mouse wheels is moved.

Definition at line 268 of file MouseDevice.cs.

 All Classes Functions Variables Enumerations Properties Events

Generated on Tue Mar 9 15:06:30 2010 for The Open Toolkit library by  doxygen 1.6.1