Class MouseEventArgs
Defines the event data for MouseDevice events.
Inheritance
MouseEventArgs
Inherited Members
Namespace: OpenTK.Input
Assembly: OpenTK.dll
Syntax
public class MouseEventArgs : EventArgs
Remarks
Do not cache instances of this type outside their event handler. If necessary, you can clone an instance using the MouseEventArgs(MouseEventArgs) constructor.
Constructors
MouseEventArgs()
Constructs a new instance.
Declaration
public MouseEventArgs()
MouseEventArgs(MouseEventArgs)
Constructs a new instance.
Declaration
public MouseEventArgs(MouseEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
MouseEventArgs | args | The MouseEventArgs instance to clone. |
MouseEventArgs(Int32, Int32)
Constructs a new instance.
Declaration
public MouseEventArgs(int x, int y)
Parameters
Type | Name | Description |
---|---|---|
Int32 | x | The X position. |
Int32 | y | The Y position. |
Properties
Mouse
Gets the current MouseState.
Declaration
public MouseState Mouse { get; }
Property Value
Type | Description |
---|---|
MouseState |
Position
Gets a Point representing the location of the mouse for the event.
Declaration
public Point Position { get; set; }
Property Value
Type | Description |
---|---|
Point |
X
Gets the X position of the mouse for the event.
Declaration
public int X { get; }
Property Value
Type | Description |
---|---|
Int32 |
Y
Gets the Y position of the mouse for the event.
Declaration
public int Y { get; }
Property Value
Type | Description |
---|---|
Int32 |