Table of Contents

Class InteractionState

Namespace
SharpConsoleUI.Core
Assembly
SharpConsoleUI.dll

Current mouse interaction state (drag or resize operation)

public record InteractionState : IEquatable<InteractionState>
Inheritance
InteractionState
Implements
Inherited Members

Fields

None

No active interaction

public static readonly InteractionState None

Field Value

InteractionState

Properties

Drag

Current drag operation state (if dragging)

public DragState? Drag { get; init; }

Property Value

DragState

IsDragging

Whether a drag operation is in progress

public bool IsDragging { get; init; }

Property Value

bool

IsResizing

Whether a resize operation is in progress

public bool IsResizing { get; init; }

Property Value

bool

Resize

Current resize operation state (if resizing)

public ResizeState? Resize { get; init; }

Property Value

ResizeState

Methods

StartDrag(Window, Point, Point)

Creates a new dragging state

public static InteractionState StartDrag(Window window, Point mousePos, Point windowPos)

Parameters

window Window
mousePos Point
windowPos Point

Returns

InteractionState

StartResize(Window, ResizeDirection, Point, Size, Point)

Creates a new resizing state

public static InteractionState StartResize(Window window, ResizeDirection direction, Point mousePos, Size windowSize, Point windowPos)

Parameters

window Window
direction ResizeDirection
mousePos Point
windowSize Size
windowPos Point

Returns

InteractionState