Launches a multiline text editor and returns the edited string
present selection menu at current cursor position
Example:
# Example for selector
try
println selector([])
catch err
println "selector not available"
endtry
perform tui action
Example:
# Example for tui
try
tui_new()
tui("Hello World")
tui_clear()
catch err
println "TUI not available"
endtry
draw box
Example:
# Example for tui_box
try
tui_new()
tui_box(0, 0, 10, 5)
catch err
println "TUI not available"
endtry
clear a tui element's area
Example:
# Example for tui_clear
try
tui_new()
tui_clear()
catch err
println "TUI not available"
endtry
input text. relevant tui struct fields: .Border, .Content, .Prompt, .Cursor, .Title, .Width, .Height, .Row, .Col
Example:
# Example for tui_input
try
tui_new()
println tui_input("Enter name:", "")
catch err
println "TUI not available"
endtry
present menu
Example:
# Example for tui_menu
try
tui_new()
println tui_menu(["Option 1", "Option 2"])
catch err
println "TUI not available"
endtry
create a tui options map
Example:
# Example for tui_new
try
tui_new()
catch err
println "TUI not available"
endtry
create a tui style map
Example:
# Example for tui_new_style
try
tui_new_style("bold")
catch err
println "TUI not available"
endtry
pager for text
Example:
# Example for tui_pager
try
tui_new()
tui_pager("Line 1\nLine 2\nLine 3")
catch err
println "TUI not available"
endtry
update a progress bar
Example:
# Example for tui_progress
try
tui_new()
tui_progress(50, 100)
catch err
println "TUI not available"
endtry
reset a progress bar
Example:
# Example for tui_progress_reset
try
tui_new()
tui_progress_reset()
catch err
println "TUI not available"
endtry
checkbox selector
Example:
# Example for tui_radio
try
tui_new()
println tui_radio(["Yes", "No"])
catch err
println "TUI not available"
endtry
switch to primary (0) or secondary (1) screen buffer
Example:
# Example for tui_screen
try
tui_new()
tui_screen(10, 5)
catch err
println "TUI not available"
endtry
table formatter (.Format="csv|tsv|psv|ssv|custom|aos" .Data=input string
interactive table row selector. Returns .Result=selected row index, .Cancel=true if aborted. Supports select_bg/select_fg in style.
Example:
# Example for tui_table_select
try
tui_new()
println tui_table_select(["Col1", "Col2"], [["a", 1], ["b", 2]])
catch err
println "TUI not available"
endtry
replace {.field} matches in template string, with struct field values
Example:
# Example for tui_template
try
tui_new()
tui_template("Hello {{name}}", map(.name "World"))
catch err
println "TUI not available"
endtry
output text
Example:
# Example for tui_text
try
tui_new()
tui_text(0, 0, "Hello")
catch err
println "TUI not available"
endtry