Interface IInteractiveTui<TPrimary, TSecondary>
An interface for your interactive user interface for terminal apps
Namespace: Terminaux.Inputs.Interactive
Assembly: Terminaux.dll
Syntax
public interface IInteractiveTui<TPrimary, TSecondary>
Type Parameters
Name | Description |
---|---|
TPrimary | |
TSecondary |
Properties
| Edit this page View SourceAcceptsEmptyData
Whether empty data is accepted
Declaration
bool AcceptsEmptyData { get; }
Property Value
Type | Description |
---|---|
bool |
PrimaryDataSource
An array, a dictionary, a list, or an enumerable that holds data (pane one)
Declaration
IEnumerable<TPrimary> PrimaryDataSource { get; }
Property Value
Type | Description |
---|---|
IEnumerable<TPrimary> |
RefreshInterval
How many milliseconds to wait before refreshing? Only applies to single-pane interactive TUI instances. 0 to disable.
Declaration
int RefreshInterval { get; }
Property Value
Type | Description |
---|---|
int |
SecondPaneInteractable
Whether the user can switch to the second path
Declaration
bool SecondPaneInteractable { get; }
Property Value
Type | Description |
---|---|
bool |
SecondaryDataSource
An array, a dictionary, a list, or an enumerable that holds data (pane two)
Declaration
IEnumerable<TSecondary> SecondaryDataSource { get; }
Property Value
Type | Description |
---|---|
IEnumerable<TSecondary> |
Methods
| Edit this page View SourceGetEntryFromItem(TPrimary)
Gets an entry string from a specified item for listing
Declaration
string GetEntryFromItem(TPrimary item)
Parameters
Type | Name | Description |
---|---|---|
TPrimary | item | Target item |
Returns
Type | Description |
---|---|
string |
GetEntryFromItemSecondary(TSecondary)
Gets an entry string from a specified item for listing
Declaration
string GetEntryFromItemSecondary(TSecondary item)
Parameters
Type | Name | Description |
---|---|---|
TSecondary | item | Target item |
Returns
Type | Description |
---|---|
string |
GetInfoFromItem(TPrimary)
Gets the info from the item
Declaration
string GetInfoFromItem(TPrimary item)
Parameters
Type | Name | Description |
---|---|---|
TPrimary | item | Target item |
Returns
Type | Description |
---|---|
string | The rendered info so that InteractiveTuiTools can handle its rendering |
GetInfoFromItemSecondary(TSecondary)
Gets the info from the item
Declaration
string GetInfoFromItemSecondary(TSecondary item)
Parameters
Type | Name | Description |
---|---|---|
TSecondary | item | Target item |
Returns
Type | Description |
---|---|
string | The rendered info so that InteractiveTuiTools can handle its rendering |
GetStatusFromItem(TPrimary)
Gets the status from the item
Declaration
string GetStatusFromItem(TPrimary item)
Parameters
Type | Name | Description |
---|---|---|
TPrimary | item | Target item |
Returns
Type | Description |
---|---|
string |
GetStatusFromItemSecondary(TSecondary)
Gets the status from the item
Declaration
string GetStatusFromItemSecondary(TSecondary item)
Parameters
Type | Name | Description |
---|---|---|
TSecondary | item | Target item |
Returns
Type | Description |
---|---|
string |
HandleExit()
Handles exiting the interactive TUI
Declaration
void HandleExit()