Class InlineDialog
Modal inline dialog that hosts one InlineControlBase and renders it through the
shared CliGrid layout pipeline.
public class InlineDialog : DialogBase, ICliDialog, IControl, ICliRenderable, IModalRefreshSource, IModalLifecycle
- Inheritance
-
InlineDialog
- Implements
- Inherited Members
Remarks
The hosted control receives the first chance to handle each key. If it does not handle Enter or
Escape, the dialog applies the standard fallback: Enter confirms when the control can confirm,
and Escape requests Cancel. Optional
InlineDialogConfirmationPolicy instances can gate Cancel or Abort behind a
confirmation message box while keeping the original control alive. Controls may also complete the
modal asynchronously through CompletionResult.
Controls expose one or more InlineDialogWidget descriptors. The dialog places those widgets into fixed InlineDialogArea regions, follows the focused widget for cursor, active-point, scrollbar, and indicator behavior, and advances any activity overlays through IModalRefreshSource.
Constructors
InlineDialog(ICliAppShell, string?, InlineControlBase, string?, CliFormattingMode, InlineDialogConfirmationPolicy?)
Modal inline dialog that hosts one InlineControlBase and renders it through the
shared CliGrid layout pipeline.
public InlineDialog(ICliAppShell shell, string? title, InlineControlBase control, string? label = null, CliFormattingMode labelMode = CliFormattingMode.Preformatted, InlineDialogConfirmationPolicy? confirmation = null)
Parameters
shellICliAppShelltitlestringcontrolInlineControlBaselabelstringlabelModeCliFormattingModeconfirmationInlineDialogConfirmationPolicy
Remarks
The hosted control receives the first chance to handle each key. If it does not handle Enter or
Escape, the dialog applies the standard fallback: Enter confirms when the control can confirm,
and Escape requests Cancel. Optional
InlineDialogConfirmationPolicy instances can gate Cancel or Abort behind a
confirmation message box while keeping the original control alive. Controls may also complete the
modal asynchronously through CompletionResult.
Controls expose one or more InlineDialogWidget descriptors. The dialog places those widgets into fixed InlineDialogArea regions, follows the focused widget for cursor, active-point, scrollbar, and indicator behavior, and advances any activity overlays through IModalRefreshSource.
Properties
Control
The hosted control whose grid, payload, hints, widgets, and key handling drive the dialog.
public InlineControlBase Control { get; }
Property Value
Label
Optional constructor-supplied label rendered inside the frame above in-frame content.
public string? Label { get; }
Property Value
LabelMode
Formatting mode used for the constructor-supplied Label.
public CliFormattingMode LabelMode { get; }
Property Value
Payload
The payload exposed by the hosted control.
public override object? Payload { get; }
Property Value
Result
The current dialog result. A control-supplied completion result wins over key- or
confirmation-driven results so asynchronous controls can close the dialog without another key.
public override DialogResultKind Result { get; }
Property Value
Shell
The shell that owns modal input, rendering, theme, culture, and viewport policy.
public ICliAppShell Shell { get; }
Property Value
Title
Optional dialog title rendered above the frame.
public string? Title { get; }
Property Value
Methods
AdvanceAnimations(DateTime)
Per modal-loop iteration: lets the control apply state that changed off the loop (e.g. a
completed async load) and advances every active periodic overlay to
nowUtc.
Returns whether anything changed its visible output, so the loop re-renders. Tickers shared by
multiple overlays are advanced once.public bool AdvanceAnimations(DateTime nowUtc)
Parameters
nowUtcDateTime
Returns
HandleKey(KeyEvent)
Handles a key by first routing it to the active control, then applying dialog fallback or
confirmation policy when the control did not consume the key.
public override bool HandleKey(KeyEvent key)
Parameters
keyKeyEvent
Returns
ToGrid()
Builds the dialog grid from the hosted control's widget descriptors, labels, hints, frame,
focus metadata, and overlays.
public override CliGrid ToGrid()