Table of Contents

Class ModalState

Namespace
SharpConsoleUI.Core
Assembly
SharpConsoleUI.dll

Immutable record representing the current modal state. Tracks modal window stack and parent-child relationships.

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

Constructors

ModalState()

Creates a new modal state

public ModalState()

Fields

Empty

Empty modal state with no modals

public static readonly ModalState Empty

Field Value

ModalState

Properties

HasModals

Gets whether any modal windows are open

public bool HasModals { get; }

Property Value

bool

ModalCount

Gets the number of modal windows currently open

public int ModalCount { get; }

Property Value

int

ModalParents

Map of modal windows to their parent windows

public IReadOnlyDictionary<Window, Window> ModalParents { get; init; }

Property Value

IReadOnlyDictionary<Window, Window>

ModalStack

The stack of modal windows, with the topmost modal last

public IReadOnlyList<Window> ModalStack { get; init; }

Property Value

IReadOnlyList<Window>

TopmostModal

Gets the topmost modal window (if any)

public Window? TopmostModal { get; }

Property Value

Window

UpdateTime

Timestamp when this state was created

public DateTime UpdateTime { get; init; }

Property Value

DateTime