Class InlineTextWidget
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
shellICliAppShell- The shell that supplies the theme.
textstring- 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
FormattingMode
Whether the text is treated as raw or markup. Defaults to Raw.
public CliFormattingMode FormattingMode { get; set; }
Property Value
Style
Theme style resolved for the text cell. Defaults to Text.
public ThemeStyle Style { get; set; }
Property Value
Text
The full text. Passed unchanged into a single grid cell; embedded newlines are handled by CliGrid.
public string Text { get; set; }
Property Value
Wrapping
Wrapping (and, via its truncation flag/indicator, truncation) applied to the cell. Defaults to WordWrap.
public CliWrapping Wrapping { get; set; }
Property Value
Methods
HandleKey(KeyEvent)
Handles a key. Returns whether it was consumed and any requested dialog result.
public override InlineKeyResult HandleKey(KeyEvent key)
Parameters
keyKeyEvent
Returns
ToGrid()
Converts the component into a grid for measurement and rendering.
public override CliGrid ToGrid()