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
Properties
HasModals
Gets whether any modal windows are open
public bool HasModals { get; }
Property Value
ModalCount
Gets the number of modal windows currently open
public int ModalCount { get; }
Property Value
ModalParents
Map of modal windows to their parent windows
public IReadOnlyDictionary<Window, Window> ModalParents { get; init; }
Property Value
ModalStack
The stack of modal windows, with the topmost modal last
public IReadOnlyList<Window> ModalStack { get; init; }
Property Value
TopmostModal
Gets the topmost modal window (if any)
public Window? TopmostModal { get; }
Property Value
UpdateTime
Timestamp when this state was created
public DateTime UpdateTime { get; init; }