class

Opal::UI::Screen

Inherits Opal::UI::Control < Opal::UI::InputHookable < Opal::UI::Element < Opal::UI::Themable < Reference < Object

Base application screen inspired by Python Textual's Screen. Manages local key bindings, root element tree, and lifecycle callbacks.

Constructors

new(name : String, title : String | Nil = nil, root : Element | Nil = nil)
Source
new(name : String, title : String | Nil = nil, &)
Source

Instance methods

children

Returns child elements for hierarchical tree traversal and DOM querying

Source
compose

Declaratively composes or re-composes the screen root element

Source
handle_key(event : Terminal::KeyEvent) : Bool

Default key event handler. Override in subclasses if not using @default_input_proc.

Source
handle_mouse(event : Terminal::MouseEvent) : Bool

Default mouse event handler. Override in subclasses if not using @default_input_proc.

Source
mounted=(mounted : Bool)
Source
mounted?
Source
name
Source
name=(name : String)
Source
on_mount

Called when the screen is pushed onto the active screen stack

Source
on_resize(width : Int32, height : Int32) : Nil
Source
on_unmount

Called when the screen is removed from the active screen stack

Source
preferred_size(available_w : Int32, available_h : Int32) : Tuple(Int32, Int32)
Source
record_cast(output_path : String, width : Int32 = 80, height : Int32 = 24, title : String | Nil = nil, &block : Asciicast::ScreenRecorder -> Nil) : Nil
Source
render(buffer : Buffer, x : Int32, y : Int32, width : Int32, height : Int32) : Nil
Source
root
Source
root=(root : Element | Nil)
Source
title
Source
title=(title : String | Nil)
Source