MouseEvent struct
Namespace: Arlecchino.Input · Assembly: Arlecchino.Core
A mouse report from the terminal. Coordinates are frame cells — the same ones Surface.WriteAt and SurfaceRegion.Contains use, so hit-testing is comparing numbers.
public readonly struct MouseEvent : IEquatable<MouseEvent>
Implements IEquatable<T><MouseEvent>
Constructors
| Member | Summary |
|---|---|
MouseEvent(MouseAction, MouseButton, int, int, KeyModifiers) | A mouse report from the terminal. Coordinates are frame cells — the same ones Surface.WriteAt and SurfaceRegion.Contains use, so hit-testing is comparing numbers. |
Properties
| Member | Summary |
|---|---|
Action | What the mouse did. |
Button | Which button, or MouseButton.None for the wheel. |
Column | Zero-based column in the frame. |
IsLeftClick | Whether this is the left button going down — the usual "click" test. |
IsScroll | Whether this is a wheel event in either direction. |
Modifiers | Modifiers held at the time. |
Row | Zero-based row in the frame. |
Methods
| Member | Summary |
|---|---|
Deconstruct(out MouseAction, out MouseButton, out int, out int, out KeyModifiers) |
Constructors in detail
MouseEvent(MouseAction, MouseButton, int, int, KeyModifiers)
public MouseEvent(
MouseAction Action,
MouseButton Button,
int Row,
int Column,
KeyModifiers Modifiers);
A mouse report from the terminal. Coordinates are frame cells — the same ones Surface.WriteAt and SurfaceRegion.Contains use, so hit-testing is comparing numbers.
Parameters
| Name | Type | Description |
|---|---|---|
Action | MouseAction | What the mouse did. |
Button | MouseButton | Which button, or MouseButton.None for the wheel. |
Row | int | Zero-based row in the frame. |
Column | int | Zero-based column in the frame. |
Modifiers | KeyModifiers | Modifiers held at the time. |
Properties in detail
Action
public MouseAction Action { get; init; }
What the mouse did.
Type MouseAction
Button
public MouseButton Button { get; init; }
Which button, or MouseButton.None for the wheel.
Type MouseButton
Column
public int Column { get; init; }
Zero-based column in the frame.
Type int
IsLeftClick
public bool IsLeftClick { get; }
Whether this is the left button going down — the usual "click" test.
Type bool
IsScroll
public bool IsScroll { get; }
Whether this is a wheel event in either direction.
Type bool
Modifiers
public KeyModifiers Modifiers { get; init; }
Modifiers held at the time.
Type KeyModifiers
Row
public int Row { get; init; }
Zero-based row in the frame.
Type int
Methods in detail
Deconstruct(out MouseAction, out MouseButton, out int, out int, out KeyModifiers)
public void Deconstruct(
out MouseAction Action,
out MouseButton Button,
out int Row,
out int Column,
out KeyModifiers Modifiers);
Parameters
| Name | Type | Description |
|---|---|---|
Action | MouseAction | |
Button | MouseButton | |
Row | int | |
Column | int | |
Modifiers | KeyModifiers |