Table of Contents

Class InlineFolderSelect

Namespace
ItTiger.TigerCli.Tui.Controls
Assembly
ItTiger.TigerCli.dll
Composite folder picker: editable path input, folder list, and OK/Cancel buttons.
public sealed class InlineFolderSelect : InlineMultiControl, ICliRenderable
Inheritance
InlineFolderSelect
Implements
Inherited Members

Remarks

The control combines a path input above the frame, a scrollable folder list inside the frame, and an OK/Cancel button row below the frame. During a modal session folder listings are loaded on a background task and a top-frame spinner overlay is shown while loading; the result is applied on the modal-loop thread. The path input and list stay synchronized in both directions: list navigation updates the path text, and path edits can reload the list for the deepest existing folder prefix while preserving the user's typed text.

List focus handles Up/Down/PageUp/PageDown/Home/End through the list widget; Enter, Space, or Right opens a highlighted folder with children; Left or Backspace navigates to the parent. Path focus edits text and Enter validates the typed path. Button focus activates OK or Cancel.

Constructors

InlineFolderSelect(ICliAppShell, IFolderBrowser, string?)

Creates a folder picker using the supplied browser abstraction. The initial path is resolved through ResolveInitial(string?).
public InlineFolderSelect(ICliAppShell shell, IFolderBrowser browser, string? initialPath = null)

Parameters

shell ICliAppShell
browser IFolderBrowser
initialPath string

Properties

CanConfirm

True when the current path text resolves to a selectable folder through the browser.
public override bool CanConfirm { get; }

Property Value

bool

ControlDecoration

Legacy single-widget metadata: folder select uses a vertical scrollbar for its list.
public override CliControlDecoration ControlDecoration { get; }

Property Value

CliControlDecoration

DialogArea

Legacy single-widget metadata; actual layout is provided by GetWidgets().
public override InlineDialogArea DialogArea { get; }

Property Value

InlineDialogArea

Hint

Validation message when path confirmation fails; otherwise the focused widget hint.
public override string? Hint { get; }

Property Value

string

HintMode

Folder-select hints are raw localized text.
public override CliFormattingMode HintMode { get; }

Property Value

CliFormattingMode

Payload

The currently accepted/selected folder path, or null when there is nothing to select.
public override object? Payload { get; }

Property Value

object

ScrollMode

Legacy single-widget metadata: folder select scrolls vertically for its list.
public override CliScrollMode ScrollMode { get; }

Property Value

CliScrollMode

ThumbMode

The scrollbar thumb follows the logical active row or cursor.
public override CliScrollThumbMode ThumbMode { get; }

Property Value

CliScrollThumbMode

Methods

AdvanceState(DateTime)

Applies a completed background folder load on the modal-loop thread. Runs once per loop iteration; returns true only when a pending result was applied (so the loop re-renders the new list and the now-stopped spinner disappears).
public override bool AdvanceState(DateTime nowUtc)

Parameters

nowUtc DateTime

Returns

bool

GetActivityOverlays()

Returns the structurally stable loading-spinner overlay. The overlay is always present; the ticker's active state controls whether it renders.
public override IReadOnlyList<InlineActivityOverlay> GetActivityOverlays()

Returns

IReadOnlyList<InlineActivityOverlay>

HandleFocusedWidgetKey(KeyEvent)

Handles a non-focus-traversal key for the focused widget. Override to coordinate domain state across widgets before or after forwarding the key.
protected override InlineKeyResult HandleFocusedWidgetKey(KeyEvent key)

Parameters

key KeyEvent

Returns

InlineKeyResult

OnFocusChanged(int, int)

Called after focus changes from one widget index to another.
protected override void OnFocusChanged(int previousIndex, int currentIndex)

Parameters

previousIndex int
currentIndex int

OnModalClosed()

Stops loading/spinner state and prevents pending background results from mutating the closed control.
public override void OnModalClosed()

OnModalOpened(CancellationToken)

Enables asynchronous folder loading for the modal session.
public override void OnModalOpened(CancellationToken modalToken)

Parameters

modalToken CancellationToken