Skip to content

Modern Tui TuiCmd

Paul Squires edited this page Oct 19, 2026 · 6 revisions

Home › Terminal TUI Library › Application Loop › TuiCmd

TuiCmd

Holds a command for the loop: what to do, plus a delay or an exit code.

Syntax

type TuiCmd
    as uint8 kind      '' TuiCmdKind
    as int32 arg        '' ms for TICK, exit code for QUIT
end type

Description

What Update and Init tell the loop to do. A plain value, so you can build one, pass it around, and return it later.

Example

#import "std/tui"
using tui

dim as TuiCmd c = TuiTick( 250 )
print c.kind = TUICMD_TICK         '' -1 (true)
print c.arg                       '' 250

c = TuiQuit( 3 )
print c.kind = TUICMD_QUIT, c.arg  '' -1 (true) 3

See also

TuiApp TuiApp.Update TuiApp.Shutdown TuiRedraw TuiTick TuiSuspend
TuiApp.Init TuiApp.View TuiNone TuiQuit TuiInvalidate TuiRun

Library: Terminal TUI Library
Category: Terminal TUI Library
Documented under: Application Loop
Working examples: hello.tiko · form.tiko · dashboard.tiko


Home · Keyword Index

Clone this wiki locally