The Open Toolkit library  1.1
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Properties | Events | List of all members
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

Public Member Functions

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

Properties

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

Events

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

Detailed Description

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

Member Function Documentation

override int OpenTK.Input.MouseDevice.GetHashCode ( )

Calculates the hash code for this instance.

Returns
override string OpenTK.Input.MouseDevice.ToString ( )

Returns a System.String that describes this instance.

Returns
A System.String that describes this instance.

Property Documentation

string OpenTK.Input.MouseDevice.Description
getset

Gets a string describing this MouseDevice.

IntPtr OpenTK.Input.MouseDevice.DeviceID
getset

Gets an IntPtr representing a device dependent ID.

InputDeviceType OpenTK.Input.MouseDevice.DeviceType
get

Gets a value indicating the InputDeviceType of this InputDevice.

int OpenTK.Input.MouseDevice.NumberOfButtons
getset

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

int OpenTK.Input.MouseDevice.NumberOfWheels
getset

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

bool OpenTK.Input.MouseDevice.this[MouseButton button]
getset

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

Parameters
buttonThe MouseButton to check.
Returns
True if the MouseButton is pressed, false otherwise.
int OpenTK.Input.MouseDevice.Wheel
getset

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

int OpenTK.Input.MouseDevice.WheelDelta
get

Gets an integer representing the relative wheel movement.

float OpenTK.Input.MouseDevice.WheelPrecise
getset

Gets the absolute wheel position in floating-point units.

int OpenTK.Input.MouseDevice.X
get

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

int OpenTK.Input.MouseDevice.XDelta
get

Gets an integer representing the relative x movement of the pointer, in pixel coordinates.

int OpenTK.Input.MouseDevice.Y
get

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

int OpenTK.Input.MouseDevice.YDelta
get

Gets an integer representing the relative y movement of the pointer, in pixel coordinates.

Event Documentation

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

Occurs when a button is pressed.

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

Occurs when a button is released.

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

Occurs when the mouse's position is moved.

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

Occurs when one of the mouse wheels is moved.