Show / Hide Table of Contents

Class MouseButtonDownEventArgs

This event is triggered when a mouse button is pressed.

Inheritance
object
EventArgs
WindowEventArgs
MouseButtonDownEventArgs
Inherited Members
WindowEventArgs.Window
EventArgs.Empty
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: OpenTK.Platform
Assembly: OpenTK.Platform.dll
Syntax
public class MouseButtonDownEventArgs : WindowEventArgs

Constructors

MouseButtonDownEventArgs(WindowHandle, Vector2, MouseButton, KeyModifier, int)

Initializes a new instance of the MouseButtonDownEventArgs class.

Declaration
public MouseButtonDownEventArgs(WindowHandle window, Vector2 clientPosition, MouseButton button, KeyModifier modifiers, int clicks)
Parameters
Type Name Description
WindowHandle window

The window that was clicked on.

Vector2 clientPosition

The coordinate in client coordinates where the mouse was pressed.

MouseButton button

The mouse button that was pressed.

KeyModifier modifiers

The modifiers that where active when the mouse button was pressed.

int clicks

The click count for this event, single-click, double-click, etc.

Properties

Button

The mouse button that was pressed.

Declaration
public MouseButton Button { get; }
Property Value
Type Description
MouseButton

Clicks

The number of times this button has been clicked in a row in a small area and time limit. 1 for single-click, 2 for double-click, etc.

Declaration
public int Clicks { get; }
Property Value
Type Description
int
Remarks

The details of counting multi-clicks follows the platform conventions.

ClientPosition

The position where the mouse was pressed, in client coordinates.

Declaration
public Vector2 ClientPosition { get; }
Property Value
Type Description
Vector2

Modifiers

The active keyboard modifiers when the mouse button was pressed.

Declaration
public KeyModifier Modifiers { get; }
Property Value
Type Description
KeyModifier
In this article
Back to top Generated by DocFX