SceneManager class
Manages multiple visual layers in a terminal windowing system, handles rendering composition and hardware sync.
- Implemented types
Constructors
- SceneManager(Terminal terminal, {RenderingMode renderingMode = RenderingMode.inline})
-
Creates a new SceneManager attached to the given
terminal.
Properties
- enableMouseTracking ↔ bool
-
Whether mouse tracking is explicitly forced/enabled.
getter/setter pair
- focusedLayer ↔ SceneLayer?
-
The currently focused layer, if any. Used to sync hardware state.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
-
layers
↔ List<
SceneLayer> -
The list of layers to composite and render.
latefinal
- onFrameRedrawn ↔ void Function(Buffer buffer)?
-
Optional callback invoked whenever a composited frame is completely rendered.
getter/setter pair
- onKeyEvent ↔ bool Function(KeyEvent event)?
-
Optional callback to intercept key events before they are routed to the focused layer.
If this returns true, the event is consumed and not propagated.
getter/setter pair
- renderer → Renderer?
-
Exposes the internal renderer.
no setter
- renderingMode → RenderingMode
-
The rendering mode for the compositor.
final
- rippleManager → SubpixelRippleManager
-
Exposes the sub-pixel ripple manager for composite drop effects and click feedback.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- terminal → Terminal
-
The hardware/platform terminal wrapper.
final
Methods
-
addRipple(
Point< int> position, {Color color = Colors.white, int durationMs = 500}) → void -
Spawns a new expanding touch ripple at
positionand triggers composite rendering. -
dispose(
) → void - Clears resources and restores terminal hardware state if modified.
-
handleKeyEvent(
KeyEvent event) → void - Handles a keyboard event and routes it to the focused layer.
-
handleMouseEvent(
MouseEvent event) → void - Handles a mouse event, performing hit testing and routing to layers.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reassemble(
) → void -
Called during hot reload to force all layers and widget trees to rebuild and repaint.
override
-
render(
) → void - Composites all active layers into a single flattened terminal output and writes it to the terminal.
-
scheduleRender(
) → void - Schedules a render pass to recomposite layers, coalescing multiple requests.
-
showDialog<
T> ({required WidgetBuilder builder, bool barrierDismissible = true, double barrierScalar = 0.5, int width = 40, int height = 10}) → Future< T?> - Displays a modal dialog by adding it as a higher layer. Returns a Future that completes when the dialog is dismissed/completed.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited