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
Properties
CursorPosition
Current cursor position
public TextPosition CursorPosition { get; init; }
Property Value
HasSelection
Whether there is an active selection
public bool HasSelection { get; init; }
Property Value
HorizontalScrollOffset
Horizontal scroll offset
public int HorizontalScrollOffset { get; init; }
Property Value
IsEditing
Whether the control is in edit mode
public bool IsEditing { get; init; }
Property Value
IsReadOnly
Whether the control is read-only
public bool IsReadOnly { get; init; }
Property Value
LineCount
Number of lines in the content
public int LineCount { get; init; }
Property Value
ScrollPosition
Gets scroll position as a Point (horizontal, vertical)
public Point ScrollPosition { get; }
Property Value
Selection
Current selection (if any)
public TextSelection Selection { get; init; }
Property Value
UpdateTime
Timestamp when this state was created
public DateTime UpdateTime { get; init; }
Property Value
VerticalScrollOffset
Vertical scroll offset
public int VerticalScrollOffset { get; init; }