TUI::Screen
Constructors
Instance methods
Write directly into the back buffer at absolute terminal coordinates. For App-level drawing that isn't owned by any single widget (status bar, dividers between panes).
Composite a widget's local buffer onto the back buffer at (x, y). x/y are 1-based terminal coordinates (matching Widget#x/#y convention). Cells landing outside the currently active #with_clip rect (if any) are silently dropped, same "out of bounds is a no-op, not an error" convention Buffer#set_cell already uses for the screen's own edges.
Read back a cell from the back buffer — the one composited widgets have just blitted into, before the next #flush swaps it to front. Exists for specs to assert on composited output; app code should never need to read cells back out of the screen it just drew.
Diff @back against @front, emit only changed cells, then swap.
The real terminal cursor stays hidden across frames — apps draw their own selection highlight (reverse-video rows, block glyphs for text input) rather than relying on the terminal's cursor to convey position. A caller that needs the native cursor visible (e.g. a text field mid-edit) should show it and move it itself after calling flush, then hide it again before the next flush.
Current terminal size in character cells, refreshed by #refresh_size on resize. 0-based row/col math elsewhere in this class treats these as the exclusive upper bound.
Status bar: fill entire row with reverse-video text (absolute coords).
Draw a vertical line at absolute terminal coordinates, e.g. a divider between two side-by-side widget panes.
Bounds every #blit inside block to rect, intersected with
whatever clip is already active (so a clip can only narrow, never
widen, no matter how many containers are nested). Always restores
the previous clip afterward, even if block raises, so a
container's own clip can never leak past its own #composite call.
Default (@clip nil) is "no bound" — existing callers that never
call #with_clip see zero behavior change.