Skip to content

Modern Tui TuiScreen Back

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

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

TuiScreen.Back

Returns the buffer being drawn into, so a test can read its cells.

Syntax

TuiScreen.Back( ) as TuiBuffer ptr

Description

The buffer being drawn into. Reading cells out of it is how you assert what a View produced, with no terminal involved.

Example

#import "std/tui"
using tui

dim as TuiScreen scr
scr.Resize( 20, 3 )
dim as TuiFrame ptr f = scr.BeginFrame( )
f->DrawText( 2, 1, "hi", TuiStyleOf( TuiRed( ), TuiDefaultColor( ) ) )

print scr.Back( )->At( 2, 1 )->st.fg.Index( )      '' 1 -- red, as asked

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