class
Obsctl::TUI::Renderer
- Obsctl::TUI::Renderer
- Reference
- Object
Overview
ANSI renderer that turns a TUI model into bounded terminal rows.
Defined in:
obsctl/tui/renderer.crConstant Summary
-
DEFAULT_HEIGHT =
24 -
DEFAULT_WIDTH =
72 -
MIN_HEIGHT =
12 -
MIN_WIDTH =
40
Constructors
Instance Method Summary
-
#render(model : Model, io : IO = STDOUT, width : Int32 = DEFAULT_WIDTH, height : Int32 = DEFAULT_HEIGHT) : Nil
Writes a full-screen frame and resets the previous-frame cache.
-
#render_incremental(model : Model, io : IO = STDOUT, width : Int32 = DEFAULT_WIDTH, height : Int32 = DEFAULT_HEIGHT) : Nil
Writes only changed rows after the first full frame.
-
#reset : Nil
Clears the previous-frame cache so the next incremental render repaints.
Constructor Detail
Instance Method Detail
def render(model : Model, io : IO = STDOUT, width : Int32 = DEFAULT_WIDTH, height : Int32 = DEFAULT_HEIGHT) : Nil
#
Writes a full-screen frame and resets the previous-frame cache.
def render_incremental(model : Model, io : IO = STDOUT, width : Int32 = DEFAULT_WIDTH, height : Int32 = DEFAULT_HEIGHT) : Nil
#
Writes only changed rows after the first full frame.