class

Tea::CursedRenderer

Inherits Tea::Renderer < Reference < Object

Crystal idiom would use writer-style setters (logger=, color_profile=, width_method=), but this file keeps Go-parity method names. CursedRenderer is the main terminal renderer implementation It handles screen buffer management, cursor control, and terminal output

Constructors

new(w : IO, env : Ultraviolet::Environ, width : Int32, height : Int32)
Source

Instance methods

clear_screen

clear_screen clears the screen Implements renderer interface

Source
close

close closes the renderer and flushes any remaining data Implements renderer interface

Source
flush(closing : Bool) : Exception | Nil

flush flushes the renderer's buffer to the output Implements renderer interface

Source
insert_above(content : String) : Exception | Nil

insert_above inserts unmanaged lines above the renderer Implements renderer interface

Source
on_mouse(msg : MouseMsg) : Cmd | Nil

on_mouse handles a mouse event Implements renderer interface

Source
render(view : View)

render renders a frame to the output Implements renderer interface

Source
reset

reset resets the renderer's state to its initial state Implements renderer interface

Source
resize(width : Int32, height : Int32)

resize notify the renderer of a terminal resize Implements renderer interface

Source
set_color_profile(profile : Ultraviolet::ColorProfile)

set_color_profile sets the color profile Implements renderer interface ameba:disable Naming/AccessorMethodName

Source
set_logger(logger : Ultraviolet::Logger)

set_logger sets the logger for the renderer ameba:disable Naming/AccessorMethodName

Source
set_optimizations(hard_tabs : Bool, backspace : Bool, mapnl : Bool)

set_optimizations sets the cursor movement optimizations

Source
set_width_method(method : Ultraviolet::WidthMethod)

set_width_method sets terminal width calculation method Implements renderer interface ameba:disable Naming/AccessorMethodName

Source
start

start starts the renderer Implements renderer interface

Source
syncd_updates=(enabled : Bool)

syncd_updates= sets whether to use synchronized updates Implements renderer interface

Source
write_string(content : String) : Tuple(Int32, Exception | Nil)

write_string writes a string to the renderer's output Implements renderer interface

Source