TuiRenderer

termflow.tui.TuiRenderer
trait TuiRenderer

Pluggable renderer invoked by the runtime loop once per frame.

The default implementation is SimpleANSIRenderer which delegates to AnsiRenderer.buildFrame + AnsiRenderer.diff. Custom renderers can be supplied to TuiRuntime.run for backends that emit something other than raw ANSI (e.g. test capture, alternate terminals).

Attributes

Note

This is an SPI. Source-compatible changes are not guaranteed; downstream implementers should expect the trait to evolve.

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def render(textNode: RootNode, err: Option[TermFlowError], terminal: TerminalBackend, renderMetrics: RenderMetrics): Unit

Render textNode onto terminal, optionally overlaying err as an error banner. Called at most once per frame by the runtime loop after coalescing queued commands.

Render textNode onto terminal, optionally overlaying err as an error banner. Called at most once per frame by the runtime loop after coalescing queued commands.

Value parameters

err

A pending error to surface (cleared by the runtime after this call).

renderMetrics

Metrics sink for diff size / coalescing counters.

terminal

The backend to write ANSI output to.

textNode

The virtual DOM root produced by TuiApp.view.

Attributes