Table of Contents

Struct InlineKeyResult

Namespace
ItTiger.TigerCli.Tui.Abstractions
Assembly
ItTiger.TigerCli.dll
The outcome of an inline control/widget handling a key. Beyond "handled / not handled" it can request a dialog result, so a focused widget (e.g. a button) can complete the hosting dialog directly instead of relying on the dialog's Enter/Escape fallback.
public readonly record struct InlineKeyResult : IEquatable<InlineKeyResult>
Implements
Inherited Members

Properties

Handled

The key was consumed with no dialog result requested.
public static InlineKeyResult Handled { get; }

Property Value

InlineKeyResult

IsHandled

True when the control/widget consumed the key.
public bool IsHandled { get; init; }

Property Value

bool

NotHandled

The key was not consumed; the caller may apply its own fallback.
public static InlineKeyResult NotHandled { get; }

Property Value

InlineKeyResult

Result

The dialog result requested by the handler, or NoResult.
public DialogResultKind Result { get; init; }

Property Value

DialogResultKind

Methods

WithResult(DialogResultKind)

The key was consumed and requests the given dialog result.
public static InlineKeyResult WithResult(DialogResultKind result)

Parameters

result DialogResultKind

Returns

InlineKeyResult