TuiRenderContext
The context a {@see \Milpa\Live\Contracts\Tui\TuiNodeRendererInterface} renders a single node within: the bounds it must fill, which node (if any) currently has keyboard focus, and — optionally — the full layout frame for renderers that need sibling/ancestor information beyond their own bounds.
TuiRenderContext::__construct()
public function __construct(Milpa\Live\ValueObjects\Tui\TuiBounds $bounds, ?string $focusedId = null, ?Milpa\Live\ValueObjects\Tui\TuiLayoutFrame $layout = null):Parameters
| Name | Type | Description |
|---|---|---|
| $bounds | TuiBounds | The exact region the renderer's output MUST fill. |
| $focusedId | (string | null) | The id of the currently focused node, if any. |
| $layout | (TuiLayoutFrame | null) | The full layout frame this render is part of, when available. |
TuiRenderContext::focused()
public function focused(Milpa\Live\ValueObjects\Tui\TuiNode $node): boolWhether the given node is the one currently focused.
Parameters
| Name | Type | Description |
|---|---|---|
| $node | Milpa\Live\ValueObjects\Tui\TuiNode |