Table of Contents

Class InlineSelect

Namespace
ItTiger.TigerCli.Tui.Controls
Assembly
ItTiger.TigerCli.dll
Dialog-hostable single-selection list control backed by InlineSelectWidget.
public sealed class InlineSelect : InlineControlBase, ICliRenderable
Inheritance
InlineSelect
Implements
Inherited Members

Remarks

The widget owns navigation, selected row state, rendering, and active-point placement. The control adds dialog-level payload, confirmability, hint text, and widget metadata. The payload is the selected row index, or null when the list is empty.

Constructors

InlineSelect(ICliAppShell, IReadOnlyList<string?>, int?, CliFormattingMode)

Creates a single-selection control over the supplied labels.
public InlineSelect(ICliAppShell shell, IReadOnlyList<string?> labels, int? preselectIndex = null, CliFormattingMode itemsFormattingMode = CliFormattingMode.Raw)

Parameters

shell ICliAppShell
labels IReadOnlyList<string>
preselectIndex int?
itemsFormattingMode CliFormattingMode

Properties

CanConfirm

False when there are no selectable items.
public override bool CanConfirm { get; }

Property Value

bool

ControlDecoration

Select controls request a vertical scrollbar.
public override CliControlDecoration ControlDecoration { get; }

Property Value

CliControlDecoration

DialogArea

Select controls are placed in the scrollable in-frame dialog area.
public override InlineDialogArea DialogArea { get; }

Property Value

InlineDialogArea

Hint

Localized select navigation hint.
public override string? Hint { get; }

Property Value

string

Payload

Selected row index, or null when no row can be selected.
public override object? Payload { get; }

Property Value

object

ScrollMode

Select controls scroll vertically.
public override CliScrollMode ScrollMode { get; }

Property Value

CliScrollMode

ThumbMode

The scrollbar thumb follows the logical active point/selected row.
public override CliScrollThumbMode ThumbMode { get; }

Property Value

CliScrollThumbMode

Methods

GetWidgets()

Exposes one focused, vertically scrollable list widget to the hosting dialog.
public override IReadOnlyList<InlineDialogWidget> GetWidgets()

Returns

IReadOnlyList<InlineDialogWidget>

HandleKey(KeyEvent)

Delegates list navigation keys to the owned widget; Enter/Escape are left to the dialog.
public override InlineKeyResult HandleKey(KeyEvent key)

Parameters

key KeyEvent

Returns

InlineKeyResult

ToGrid()

Returns the owned widget grid after synchronizing inherited layout settings.
public override CliGrid ToGrid()

Returns

CliGrid