Skip to content

Hex1bMouseEvent

Namespace: Hex1b.Input

Assembly: Hex1b.dll

A mouse input event.

csharp
public sealed record Hex1bMouseEvent : Hex1bEvent, IEquatable<Hex1bEvent>, IEquatable<Hex1bMouseEvent>

Inheritance

ObjectHex1bEventHex1bMouseEvent

Implements

Constructors

Hex1bMouseEvent(MouseButton, MouseAction, int, int, Hex1bModifiers, int)

A mouse input event.

Parameters:

  • Button (MouseButton): The mouse button involved (None for move events).
  • Action (MouseAction): The type of mouse action.
  • X (Int32): The X coordinate (0-based column).
  • Y (Int32): The Y coordinate (0-based row).
  • Modifiers (Hex1bModifiers): The modifier keys held during the event.
  • ClickCount (Int32): The number of consecutive clicks (1=single, 2=double, 3=triple). Only relevant for Down actions.
csharp
public Hex1bMouseEvent(MouseButton Button, MouseAction Action, int X, int Y, Hex1bModifiers Modifiers, int ClickCount = 1)

Properties

Action

The type of mouse action.

Returns: MouseAction

csharp
public MouseAction Action { get; init; }

Button

The mouse button involved (None for move events).

Returns: MouseButton

csharp
public MouseButton Button { get; init; }

ClickCount

The number of consecutive clicks (1=single, 2=double, 3=triple). Only relevant for Down actions.

Returns: Int32

csharp
public int ClickCount { get; init; }

IsDoubleClick

Returns true if this is a double-click event (ClickCount == 2).

Returns: Boolean

csharp
public bool IsDoubleClick { get; }

IsTripleClick

Returns true if this is a triple-click event (ClickCount == 3).

Returns: Boolean

csharp
public bool IsTripleClick { get; }

Modifiers

The modifier keys held during the event.

Returns: Hex1bModifiers

csharp
public Hex1bModifiers Modifiers { get; init; }

X

The X coordinate (0-based column).

Returns: Int32

csharp
public int X { get; init; }

Y

The Y coordinate (0-based row).

Returns: Int32

csharp
public int Y { get; init; }

Methods

WithClickCount(int)

Creates a copy of this event with a different click count. Used by Hex1bApp to set the computed click count.

Parameters:

Returns: Hex1bMouseEvent

csharp
public Hex1bMouseEvent WithClickCount(int clickCount)

Released under the MIT License.