Class InlineWidget
- Namespace
- ItTiger.TigerCli.Tui.Abstractions
- Assembly
- ItTiger.TigerCli.dll
A reusable interactive building block used inside composite inline controls. A widget renders
itself into its own subgrid and handles keys, but — unlike InlineControlBase — it
is not necessarily dialog-hostable on its own. It is a part, not a whole.
public abstract class InlineWidget : CliRenderableComponent, ICliRenderable
- Inheritance
-
InlineWidget
- Implements
- Derived
- Inherited Members
Remarks
Cells remain render/layout only: widgets handle keys, cells do not. This is the minimal surface
needed for button widgets and future composition; richer responsibilities (cursor mode, scroll
mode, per-widget overlays) are added when a consumer needs them.
Constructors
InlineWidget(ICliAppShell)
Creates a widget hosted by the supplied shell.
protected InlineWidget(ICliAppShell shell)
Parameters
shellICliAppShell- The shell that supplies terminal, theme, culture, and viewport services.
Properties
Focusable
Whether the widget can receive focus. Non-focusable widgets are skipped by focus traversal.
public virtual bool Focusable { get; }
Property Value
HasFocus
Whether the widget currently has focus. Drives focus-dependent rendering (e.g. button markers).
public bool HasFocus { get; set; }
Property Value
Hint
Optional focus-aware hint a composite control may surface to the dialog.
public virtual string? Hint { get; }
Property Value
Shell
The shell hosting this widget.
public ICliAppShell Shell { get; }
Property Value
Methods
HandleKey(KeyEvent)
Handles a key. Returns whether it was consumed and any requested dialog result.
public abstract InlineKeyResult HandleKey(KeyEvent key)
Parameters
keyKeyEvent