Table of Contents

Class EditState

Namespace
SharpConsoleUI.Core
Assembly
SharpConsoleUI.dll

Immutable record representing the edit state of a text control

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

Constructors

EditState()

Creates a new edit state

public EditState()

Fields

Empty

Empty edit state

public static readonly EditState Empty

Field Value

EditState

Properties

CursorPosition

Current cursor position

public TextPosition CursorPosition { get; init; }

Property Value

TextPosition

HasSelection

Whether there is an active selection

public bool HasSelection { get; init; }

Property Value

bool

HorizontalScrollOffset

Horizontal scroll offset

public int HorizontalScrollOffset { get; init; }

Property Value

int

IsEditing

Whether the control is in edit mode

public bool IsEditing { get; init; }

Property Value

bool

IsReadOnly

Whether the control is read-only

public bool IsReadOnly { get; init; }

Property Value

bool

LineCount

Number of lines in the content

public int LineCount { get; init; }

Property Value

int

ScrollPosition

Gets scroll position as a Point (horizontal, vertical)

public Point ScrollPosition { get; }

Property Value

Point

Selection

Current selection (if any)

public TextSelection Selection { get; init; }

Property Value

TextSelection

UpdateTime

Timestamp when this state was created

public DateTime UpdateTime { get; init; }

Property Value

DateTime

VerticalScrollOffset

Vertical scroll offset

public int VerticalScrollOffset { get; init; }

Property Value

int