Skip to content

Modern Tui TuiCell

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

Home › Terminal TUI Library › Buffer and Frame › TuiCell

TuiCell

Holds one character cell: the character, its style and its width in columns.

Syntax

type TuiCell
    as TuiStyle st
    as uint8 width
    ...
end type

Description

One character cell: a base codepoint, a short combining tail, a style and a column width. A WIDE glyph has width 2 and owns the following cell as a continuation -- the diff knows this and never splits a pair.

Example

#import "std/tui"
using tui

dim as TuiCell c = TuiCellBlank( TuiStyleDefault( ) )
print c.width                     '' 1
c.SetChar( asc( "A" ) )
print c.width                     '' 1
c.SetChar( &h4E2D )               '' a CJK ideograph
print c.width                     '' 2

See also

TuiCell.SetChar TuiCellBlank TuiBuffer.Resize TuiBuffer.InBounds TuiBuffer.Count TuiFrame.Area
TuiCell.Equals TuiBuffer TuiBuffer.Clear TuiBuffer.At 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