Hex1bMouseEvent
Namespace: Hex1b.Input
Assembly: Hex1b.dll
A mouse input event.
public sealed record Hex1bMouseEvent : Hex1bEvent, IEquatable<Hex1bEvent>, IEquatable<Hex1bMouseEvent>Inheritance
Object → Hex1bEvent → Hex1bMouseEvent
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.
public Hex1bMouseEvent(MouseButton Button, MouseAction Action, int X, int Y, Hex1bModifiers Modifiers, int ClickCount = 1)Properties
Action
The type of mouse action.
Returns: MouseAction
public MouseAction Action { get; init; }Button
The mouse button involved (None for move events).
Returns: MouseButton
public MouseButton Button { get; init; }ClickCount
The number of consecutive clicks (1=single, 2=double, 3=triple). Only relevant for Down actions.
Returns: Int32
public int ClickCount { get; init; }IsDoubleClick
Returns true if this is a double-click event (ClickCount == 2).
Returns: Boolean
public bool IsDoubleClick { get; }IsTripleClick
Returns true if this is a triple-click event (ClickCount == 3).
Returns: Boolean
public bool IsTripleClick { get; }Modifiers
The modifier keys held during the event.
Returns: Hex1bModifiers
public Hex1bModifiers Modifiers { get; init; }X
The X coordinate (0-based column).
Returns: Int32
public int X { get; init; }Y
The Y coordinate (0-based row).
Returns: Int32
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:
clickCount(Int32):
Returns: Hex1bMouseEvent
public Hex1bMouseEvent WithClickCount(int clickCount)