Skip to content

Modern Tui TuiScreen BeginFrame

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

Home › Terminal TUI Library › Buffer and Frame › TuiScreen.BeginFrame

TuiScreen.BeginFrame

Clears the back buffer and returns the frame to draw into.

Syntax

TuiScreen.BeginFrame( ) as TuiFrame ptr

Description

Clears the back buffer and returns the frame to draw into. Everything you want on screen must be drawn again -- that is the immediate-mode bargain.

Example

#import "std/tui"
using tui

dim as TuiScreen scr
scr.Resize( 12, 3 )
dim as TuiFrame ptr f = scr.BeginFrame( )
f->DrawText( 0, 0, "one", TuiStyleDefault( ) )
scr.Render( TUIDEPTH_ANSI16 )

'' a NEW frame starts blank: "one" is gone unless drawn again
f = scr.BeginFrame( )
print len( scr.Render( TUIDEPTH_ANSI16 ) ) > 0 '' -1 (true)  -- it was erased

See also

TuiCell TuiCell.Equals TuiBuffer TuiBuffer.Clear TuiBuffer.At TuiFrame
TuiCell.SetChar TuiCellBlank TuiBuffer.Resize TuiBuffer.InBounds TuiBuffer.Count TuiFrame.Area

Library: Terminal TUI Library
Category: Terminal TUI Library
Documented under: Buffer and Frame
Working examples: hello.tiko · form.tiko · dashboard.tiko


Home · Keyword Index

Clone this wiki locally