Table of Contents

Class InlineMultiSelect

Namespace
ItTiger.TigerCli.Tui.Controls
Assembly
ItTiger.TigerCli.dll
Dialog-hostable multi-selection checklist control.
public sealed class InlineMultiSelect : InlineControlBase, ICliRenderable
Inheritance
InlineMultiSelect
Implements
Inherited Members

Remarks

The payload is an int[] of selected indexes in original item order, or null when the list has no items. Empty selection is valid when items exist. Keyboard behavior follows the standard checklist model: Up/Down/PageUp/PageDown/Home/End move the active row, Space toggles the active row, and +, -, and * select all, clear all, or invert all. Enter/Escape are left to the hosting dialog.

Constructors

InlineMultiSelect(ICliAppShell, IReadOnlyList<string>, IReadOnlyCollection<int>?, CliFormattingMode)

Creates a multi-selection checklist.
public InlineMultiSelect(ICliAppShell shell, IReadOnlyList<string> labels, IReadOnlyCollection<int>? preselectedIndexes = null, CliFormattingMode itemsFormattingMode = CliFormattingMode.Raw)

Parameters

shell ICliAppShell
labels IReadOnlyList<string>
preselectedIndexes IReadOnlyCollection<int>
itemsFormattingMode CliFormattingMode

Properties

CanConfirm

False when there are no items; empty selection is valid when items exist.
public override bool CanConfirm { get; }

Property Value

bool

ControlDecoration

Multi-select controls request a vertical scrollbar.
public override CliControlDecoration ControlDecoration { get; }

Property Value

CliControlDecoration

DialogArea

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

Property Value

InlineDialogArea

Hint

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

Property Value

string

HintMode

Checklist hints are raw localized text.
public override CliFormattingMode HintMode { get; }

Property Value

CliFormattingMode

Payload

Selected indexes in original item order, or null when there are no items.
public override object? Payload { get; }

Property Value

object

ScrollMode

Multi-select controls scroll vertically.
public override CliScrollMode ScrollMode { get; }

Property Value

CliScrollMode

ThumbMode

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

Property Value

CliScrollThumbMode

Methods

HandleKey(KeyEvent)

Handles checklist navigation and toggle keys; Enter/Escape are not consumed.
public override InlineKeyResult HandleKey(KeyEvent key)

Parameters

key KeyEvent

Returns

InlineKeyResult

ToGrid()

Renders a two-column checklist grid: marker column plus item label column. The active row is exposed through ActivePoint so the hosting dialog can scroll to it.
public override CliGrid ToGrid()

Returns

CliGrid