Class InlineTextInput
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
Properties
CanConfirm
False when the optional validator currently returns a non-empty message.
public override bool CanConfirm { get; }
Property Value
ContentStyle
Style applied to the hosted text input content area, including the resolved width.
public override CliCellStyle? ContentStyle { get; }
Property Value
ControlDecoration
Text input controls request horizontal scroll indicators.
public override CliControlDecoration ControlDecoration { get; }
Property Value
DialogArea
Text input controls are placed inside the frame with indicator columns reserved.
public override InlineDialogArea DialogArea { get; }
Property Value
Hint
Validation message when invalid; otherwise the localized text-input hint.
public override string? Hint { get; }
Property Value
Payload
The current real text value, including in secret mode.
public override object? Payload { get; }
Property Value
ScrollMode
Text input controls scroll horizontally.
public override CliScrollMode ScrollMode { get; }
Property Value
ThumbMode
The scrollbar/indicator thumb follows the input cursor active point.
public override CliScrollThumbMode ThumbMode { get; }
Property Value
Methods
GetWidgets()
Exposes one focused, horizontally scrollable input widget to the hosting dialog.
public override IReadOnlyList<InlineDialogWidget> GetWidgets()
Returns
HandleKey(KeyEvent)
Delegates editing keys to the owned widget and refreshes validation when text changes.
public override InlineKeyResult HandleKey(KeyEvent key)
Parameters
keyKeyEvent
Returns
ToGrid()
Returns the owned widget grid after synchronizing inherited layout settings.
public override CliGrid ToGrid()