Skip to content

Modern Tui TuiApp View

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

Home › Terminal TUI Library › Application Loop › TuiApp.View

TuiApp.View

Draws the whole screen from your app's state, changing nothing.

Syntax

TuiApp.View( byref f as TuiFrame )

Description

Draw the whole screen from your state. It must not mutate anything -- render the same state twice and you must get the same bytes, which is exactly what the module's own test asserts.

Example

#import "std/tui"
using tui

dim as TuiScreen a, b
a.Resize( 30, 6 )
b.Resize( 30, 6 )

dim as CounterApp app             '' see TuiApp for its definition
app.Init( )
app.n = 42

'' the same state rendered into two fresh screens gives identical bytes
print TuiRenderOnce( app, a ) = TuiRenderOnce( app, b )      '' true
print app.n                       '' 42 -- View changed nothing

See also

TuiApp TuiApp.Update TuiCmd TuiRedraw TuiTick TuiSuspend
TuiApp.Init TuiApp.Shutdown 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