Table of Contents

Class InlineTextInput

Namespace
ItTiger.TigerCli.Tui.Controls
Assembly
ItTiger.TigerCli.dll
Dialog-hostable single-line text input control backed by InlineTextInputWidget.
public sealed class InlineTextInput : InlineControlBase, ICliRenderable
Inheritance
InlineTextInput
Implements
Inherited Members

Remarks

The widget owns editing state, cursor placement, masking, key handling, and rendering. The control adds dialog-level width, style, validation, hint text, payload, and horizontal scrolling metadata. The payload is always the real text, including in secret mode.

Constructors

InlineTextInput(ICliAppShell, string?, bool, int?, Func<string, string?>?)

Creates a text input control.
public InlineTextInput(ICliAppShell shell, string? initialValue = null, bool isSecret = false, int? width = null, Func<string, string?>? validator = null)

Parameters

shell ICliAppShell
initialValue string
isSecret bool
width int?
validator Func<string, string>

Properties

CanConfirm

False when the optional validator currently returns a non-empty message.
public override bool CanConfirm { get; }

Property Value

bool

ContentStyle

Style applied to the hosted text input content area, including the resolved width.
public override CliCellStyle? ContentStyle { get; }

Property Value

CliCellStyle

ControlDecoration

Text input controls request horizontal scroll indicators.
public override CliControlDecoration ControlDecoration { get; }

Property Value

CliControlDecoration

DialogArea

Text input controls are placed inside the frame with indicator columns reserved.
public override InlineDialogArea DialogArea { get; }

Property Value

InlineDialogArea

Hint

Validation message when invalid; otherwise the localized text-input hint.
public override string? Hint { get; }

Property Value

string

Payload

The current real text value, including in secret mode.
public override object? Payload { get; }

Property Value

object

ScrollMode

Text input controls scroll horizontally.
public override CliScrollMode ScrollMode { get; }

Property Value

CliScrollMode

ThumbMode

The scrollbar/indicator thumb follows the input cursor active point.
public override CliScrollThumbMode ThumbMode { get; }

Property Value

CliScrollThumbMode

Methods

GetWidgets()

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

Returns

IReadOnlyList<InlineDialogWidget>

HandleKey(KeyEvent)

Delegates editing keys to the owned widget and refreshes validation when text changes.
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