Skip to content
docsv0.3.0

SpacerRenderer

Empty lines for vertical spacing. The TUI analog of pi-tui's `Spacer`. Renders `$lines` blank rows (default 1) padded out to the full node width so the layout engine's diff-based repaint has stable rows to compare against. Node props (all optional): - `lines` int Number of empty rows to emit. Default: 1.

SpacerRenderer::supports()

public function supports(Milpa\Live\ValueObjects\Tui\TuiNode $node): bool

True only for `spacer` nodes — dispatch is by declared node type, never by where the node came from.

Parameters

Parameters of supports()
NameTypeDescription
$nodeMilpa\Live\ValueObjects\Tui\TuiNode

SpacerRenderer::render()

public function render(Milpa\Live\ValueObjects\Tui\TuiNode $node, Milpa\Live\ValueObjects\Tui\TuiRenderContext $context): Milpa\Live\ValueObjects\Tui\TuiFrame

Returns the requested number of blank lines.

Parameters

Parameters of render()
NameTypeDescription
$nodeMilpa\Live\ValueObjects\Tui\TuiNode
$contextMilpa\Live\ValueObjects\Tui\TuiRenderContext