Search Results for

    Show / Hide Table of Contents

    Class TextualUI

    Base textual UI class for your interactive applications

    Inheritance
    object
    TextualUI
    ImageViewInteractive
    ColorSelectorTui
    FigletSelectorTui
    SpinnerSelectorTui
    HexEditInteractive
    TextEditInteractive
    Namespace: Terminaux.Inputs.Interactive
    Assembly: Terminaux.dll
    Syntax
    public abstract class TextualUI

    Properties

    | Edit this page View Source

    Fallback

    Fallback keybinding in case defined keybinding doesn't exist.

    Declaration
    public Action<TextualUI, ConsoleKeyInfo, PointerEventContext?>? Fallback { get; set; }
    Property Value
    Type Description
    Action<TextualUI, ConsoleKeyInfo, PointerEventContext>
    | Edit this page View Source

    Guid

    Unique ID for this textual UI

    Declaration
    public Guid Guid { get; }
    Property Value
    Type Description
    Guid
    | Edit this page View Source

    Keybindings

    List of available keybindings

    Declaration
    public virtual List<(Keybinding binding, Action<TextualUI, ConsoleKeyInfo, PointerEventContext?> action)> Keybindings { get; }
    Property Value
    Type Description
    List<(Keybinding binding, Action<TextualUI, ConsoleKeyInfo, PointerEventContext> action)>
    Remarks

    You can edit this to add your custom keybindings, but it's preferrable to either place them in a constructor or in the overridden value, and to define the delegates in separate private functions inside the UI class.

    | Edit this page View Source

    Name

    Name of the interactive textual UI

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    RefreshDelay

    Refresh delay. If set to zero or less than zero, this means that this UI doesn't refresh itself.

    Declaration
    public int RefreshDelay { get; set; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    Renderables

    List of renderable contianers that are going to be laid out on top of what Render() prints to the console.

    Declaration
    public virtual List<Container> Renderables { get; }
    Property Value
    Type Description
    List<Container>
    | Edit this page View Source

    State

    State of this textual UI

    Declaration
    public TextualUIState State { get; }
    Property Value
    Type Description
    TextualUIState

    Methods

    | Edit this page View Source

    Render()

    Renders this interactive textual UI

    Declaration
    public abstract string Render()
    Returns
    Type Description
    string

    A string generated by this function for the RunTui(TextualUI?) function to render to the console

    Remarks

    Generated sequence, which will be used for rendering, has lower priority than Renderables, so any renderable container specified in that property will overwrite what's been rendered.

    | Edit this page View Source

    RequireRefresh()

    Tells the textual UI that the refresh is required

    Declaration
    public void RequireRefresh()
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX