Table of Contents

Class InlineMessageBoxControl

Namespace
ItTiger.TigerCli.Tui.Controls
Assembly
ItTiger.TigerCli.dll
A message-box style inline control: a block of message text plus a row of buttons. It is the first consumer of the multi-widget dialog layout — it exposes exactly two top-level widgets, the message content (InFrameScrollable) and the button group (InFrame), and routes keys to the (focused) button group.
public sealed class InlineMessageBoxControl : InlineControlBase, ICliRenderable
Inheritance
InlineMessageBoxControl
Implements
Inherited Members

Remarks

The button group is the top-level interactive widget; individual buttons are not separate dialog widgets. Activating a button returns its DialogResultKind via WithResult(DialogResultKind) so the hosting InlineDialog completes with that result. Escape is left unhandled so the dialog's cancel fallback fires (Cancel), even for button sets that have no explicit Cancel button.

Constructors

InlineMessageBoxControl(ICliAppShell, string, MessageBoxButtons, DialogResultKind?, MessageBoxKind)

Creates a message-box control with a message and button row.
public InlineMessageBoxControl(ICliAppShell shell, string message, MessageBoxButtons buttons = MessageBoxButtons.Ok, DialogResultKind? defaultButton = null, MessageBoxKind kind = MessageBoxKind.Normal)

Parameters

shell ICliAppShell
The shell that supplies the theme, culture, and viewport.
message string
The message to display.
buttons MessageBoxButtons
The buttons to include.
defaultButton DialogResultKind?
The button selected initially, or null to use the button-set default.
kind MessageBoxKind
The semantic kind that selects the control's dialog surface.

Properties

ButtonGroup

The button group is the single focused/interactive top-level widget.
public InlineButtonGroupWidget ButtonGroup { get; }

Property Value

InlineButtonGroupWidget

CanConfirm

True when the hosting dialog may complete this control with an Enter/OK action.
public override bool CanConfirm { get; }

Property Value

bool

DialogSurfaceStyle

The theme surface token the hosting InlineDialog resolves for this control's dialog background (frame body + content). The default is DialogSurface; controls with a semantic severity (e.g. a warning/error message box) override this to return a semantic surface token, keeping the dialog background theme-driven rather than hard-coded.
public override ThemeStyle DialogSurfaceStyle { get; }

Property Value

ThemeStyle

Hint

Optional status/hint text shown by the hosting dialog.
public override string? Hint { get; }

Property Value

string

Kind

The semantic severity of this message box (selects the dialog surface).
public MessageBoxKind Kind { get; }

Property Value

MessageBoxKind

Payload

Optional value produced by this control when its hosting dialog completes.
public override object? Payload { get; }

Property Value

object

Methods

GetWidgets()

Exposes the top-level widgets the hosting InlineDialog should place. The default wraps the control's own ToGrid() output into one focused widget, preserving the legacy single-content behavior. Composite controls override this to expose several widgets across different InlineDialogArea areas.
public override IReadOnlyList<InlineDialogWidget> GetWidgets()

Returns

IReadOnlyList<InlineDialogWidget>

HandleKey(KeyEvent)

Handles a key and optionally requests a dialog result. Returning NotHandled lets the hosting dialog apply fallback keys.
public override InlineKeyResult HandleKey(KeyEvent key)

Parameters

key KeyEvent

Returns

InlineKeyResult

ToGrid()

Converts the component into a grid for measurement and rendering.
public override CliGrid ToGrid()

Returns

CliGrid