SimpleTuiLayoutEngine
Resolves a node tree into absolute bounds plus a paint order. Stacks children vertically inside their parent and clips to the viewport, so a renderer never has to compute geometry — it is handed the rectangle it may paint.
SimpleTuiLayoutEngine::layout()
public function layout(Milpa\Live\ValueObjects\Tui\TuiNode $root, Milpa\Live\ValueObjects\Tui\TuiBounds $viewport): Milpa\Live\ValueObjects\Tui\TuiLayoutFrameResolves the tree into per-node bounds and a paint order, clipped to the viewport.
Parameters
| Name | Type | Description |
|---|---|---|
| $root | Milpa\Live\ValueObjects\Tui\TuiNode | |
| $viewport | Milpa\Live\ValueObjects\Tui\TuiBounds |