Skip to content

Modern Tui TuiBuffer At

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

Home › Terminal TUI Library › Buffer and Frame › TuiBuffer.At

TuiBuffer.At

Returns a pointer to the cell at x, y, without checking the bounds.

Syntax

TuiBuffer.At( byval x as int32, byval y as int32 ) as TuiCell ptr

Description

A pointer to one cell. It returns a POINTER rather than a byref because taking the address of a byref-returning function yields the address of the PROCEDURE instead, silently -- a trap this module hit and now avoids everywhere.

Example

#import "std/tui"
using tui

dim as TuiBuffer b
b.Resize( 8, 2 )
b.Clear( TuiStyleDefault( ) )

dim as TuiCell ptr c = b.At( 2, 1 )
c->SetChar( asc( "Z" ) )
print b.At( 2, 1 )->width         '' 1 -- the write landed in the buffer

See also

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

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