Compositor¶
Receives grids from widget-actors, composites by z-order, diffs against previous frame, and writes ANSI output.
Implements¶
- WidgetParent tag
Constructors¶
create¶
Parameters¶
- output: TerminalOutput tag
- width: USize val
- height: USize val
Returns¶
- Compositor tag^
Public Behaviours¶
register_root¶
Register the root widget at NorthWest filling the full screen. Does not send a resize — the caller must send resize() to the widget directly to ensure correct message ordering.
Parameters¶
- widget: Widget tag
receive_grid¶
Receive an updated grid from a widget. Stores the grid and schedules a deferred recompose if not already pending.
Parameters¶
hit_test¶
Find the topmost widget at the given screen coordinate and send the result back to the requester.
Parameters¶
screen_resize¶
Handle terminal resize: update dimensions, clear screen, and recompose.