Skip to content
docsv0.3.0

StatusBarRenderer

Single-row status bar: an indicator and left-hand label, a rule that grows to fill the gap, and right-hand key hints. Truncation here loses the key hints, so the fill is what absorbs the width, never the text.

StatusBarRenderer::supports()

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

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

Parameters

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

StatusBarRenderer::render()

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

Draws the bar, giving the fill whatever width is left after both labels so neither the status nor the key hints get truncated.

Parameters

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