Terminal renderer with diff-based updates.
Keeps the last painted frame, computes layout, paints elements, diffs the result, and outputs minimal ANSI sequences.
Can operate in two modes:
- Live mode: writes to Terminal driver (real terminal)
- Capture mode: returns ANSI output as iodata (for testing)
Summary
Functions
Get the layout results from the last render. Requires re-computation.
Get the front buffer (last rendered frame).
Create a new renderer with given dimensions.
Render an element tree and return {renderer, ansi_iodata}.
Force a full redraw (no diff, re-render everything).
Resize the renderer. Next render will be a full redraw.
Types
@type t() :: %ElixirOpentui.Renderer{ cols: non_neg_integer(), frame_count: non_neg_integer(), front: ElixirOpentui.Buffer.t(), rows: non_neg_integer() }
Functions
Get the layout results from the last render. Requires re-computation.
Get the front buffer (last rendered frame).
Create a new renderer with given dimensions.
Render an element tree and return {renderer, ansi_iodata}.
Force a full redraw (no diff, re-render everything).
Resize the renderer. Next render will be a full redraw.