Skip to content
docsv0.3.0

GenericPanelRenderer

Last-resort renderer: accepts ANY node type and draws it as a titled box. It exists so an unknown node degrades into something readable instead of a blank region — register it last, since it matches everything.

GenericPanelRenderer::supports()

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

True for every node: this is the fallback renderer, so it must be the last one registered or it will shadow the specific ones.

Parameters

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

GenericPanelRenderer::render()

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

Draws the node as a titled box, taking its content from `lines` or `content` and its title from `title`, falling back to the node type.

Parameters

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