class

Glimmer::TUI::Screen

Inherits Reference < Object

Screen manages the display buffer and rendering for the TUI.

It handles drawing text, clearing regions, and managing the viewport.

Constructors

new(width : Int32, height : Int32)
Source

Instance methods

buffer
Source
buffer=(buffer : Array(String))
Source
clear

Clears the entire screen buffer

Source
clear_line(row : Int32)

Clears a specific line

Source
draw_status_bar(text : String, style : String = Terminal::REVERSE)

Draws a status bar at the bottom

Source
height
Source
height=(height : Int32)
Source
render(io : IO = STDOUT)

Renders the buffer to the terminal

Source
update_dimensions

Updates screen dimensions

Source
width
Source
width=(width : Int32)
Source
write(row : Int32, col : Int32, text : String)

Writes text at a specific position

Source
write_raw(row : Int32, text : String)

Writes a pre-rendered line (may contain ANSI codes) directly into the buffer.

Replaces the entire row content — used by Pager for styled content.

Source
write_styled(row : Int32, col : Int32, text : String, style : String)

Writes text with a specific style (color).

Uses write_raw to avoid ANSI codes consuming character positions.

Source