class

Opal::UI::ScreenStack

Inherits Reference < Object

Screen stack orchestrator inspired by Python Textual's Screen Stack. Manages navigation flow, modal dialog layering, backdrop dimming, and dismissal callbacks.

Constructors

new(initial_screen : Screen | Nil = nil)
Source

Instance methods

active_screen

Returns the currently focused top-of-stack screen

Source
empty?
Source
handle_key(event : Terminal::KeyEvent) : Bool
Source
handle_mouse(event : Terminal::MouseEvent) : Bool
Source
pop_screen

Pops and unmounts the active screen

Source
push_screen(screen : Screen, &callback : ModalResult -> Nil) : Screen

Pushes a new screen onto the stack with optional dismissal callback

Source
push_screen(screen : Screen) : Screen

Pushes a screen without a dismissal block

Source
record_cast(output_path : String, width : Int32 = 80, height : Int32 = 24, title : String = "Opal Session", &block : Asciicast::ScreenRecorder -> Nil) : Nil
Source
render(buffer : Buffer, x : Int32 = 0, y : Int32 = 0, width : Int32 = buffer.width, height : Int32 = buffer.height) : Nil

Renders the screen stack with automatic modal backdrop compositing

Source
size
Source
stack
Source
switch_screen(screen : Screen) : Screen

Replaces entire stack or top screen with a new screen

Source