Skip to content

Modern Tui TuiWidget Render

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

Home › Terminal TUI Library › Widgets › TuiWidget.Render

TuiWidget.Render

Draws the widget into an area of the frame, changing no app state.

Syntax

TuiWidget.Render( byref f as TuiFrame, byval area as TuiRect )

Description

Draw yourself into area. It cannot fail and must not mutate application state -- that is Update's job, and the separation is what makes a frame reproducible. Guard against an empty area at the top; a border on a tiny rect leaves nothing inside.

Example

#import "std/tui"
using tui

dim as TuiScreen scr
scr.Resize( 30, 5 )
dim as TuiFrame ptr f = scr.BeginFrame( )

dim as TuiParagraph p
p.text = "drawn through the protocol"
p.Render( *f, f->Area( ) )
print scr.Back( )->At( 0, 0 )->width      '' 1

See also

TuiWidget TuiWidget.SizeHint TuiFocusRing TuiFocusRing.Count
TuiWidget.Kind TuiWidget.CanFocus TuiFocusRing.Add TuiFocusRing.Current
TuiWidget.HandleEvent TuiWidget.SetFocused TuiFocusRing.Clear TuiFocusRing.Next_

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


Home · Keyword Index

Clone this wiki locally