Table of Contents

Class InlineTextWidget

Namespace
ItTiger.TigerCli.Tui.Widgets
Assembly
ItTiger.TigerCli.dll
A reusable read-only text widget. It renders its text as a single-cell CliGrid and delegates all text handling — end-of-line splitting, wrapping, formatting, measuring, and truncation — to CliGrid. It never splits the text into multiple rows or implements wrapping/truncation itself.
public sealed class InlineTextWidget : InlineWidget, ICliRenderable
Inheritance
InlineTextWidget
Implements
Inherited Members

Remarks

Truncation is expressed through Wrapping (TigerCli carries the truncation flag and indicator on CliWrapping, e.g. WordWrapTruncate). The widget is read-only: it is not focusable and consumes no keys.

Constructors

InlineTextWidget(ICliAppShell, string?)

Creates a read-only text widget.
public InlineTextWidget(ICliAppShell shell, string? text = null)

Parameters

shell ICliAppShell
The shell that supplies the theme.
text string
The text to display.

Properties

Focusable

Whether the widget can receive focus. Non-focusable widgets are skipped by focus traversal.
public override bool Focusable { get; }

Property Value

bool

FormattingMode

Whether the text is treated as raw or markup. Defaults to Raw.
public CliFormattingMode FormattingMode { get; set; }

Property Value

CliFormattingMode

Style

Theme style resolved for the text cell. Defaults to Text.
public ThemeStyle Style { get; set; }

Property Value

ThemeStyle

Text

The full text. Passed unchanged into a single grid cell; embedded newlines are handled by CliGrid.
public string Text { get; set; }

Property Value

string

Wrapping

Wrapping (and, via its truncation flag/indicator, truncation) applied to the cell. Defaults to WordWrap.
public CliWrapping Wrapping { get; set; }

Property Value

CliWrapping

Methods

HandleKey(KeyEvent)

Handles a key. Returns whether it was consumed and any requested dialog result.
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