class
TUI::Popup
- TUI::Popup
- TUI::Widget
- Reference
- Object
Overview
A small, centered, non-full-screen Widget carrying a title and a message, dismissed by any key. Push it via NavStack#push directly (bypassing Runtime#push/#sync_size, per NavStack's own documented escape hatch for modals) so it keeps whatever size/position it's constructed with instead of being forced full-screen.
Defined in:
tui/popup.crConstructors
- .centered(screen : Screen, title : String, message : String) : Popup
- .new(x : Int32, y : Int32, width : Int32, height : Int32, title : String, message : String)
Instance Method Summary
-
#border_style : Style
Applied to the box border drawn by #render.
-
#border_style=(border_style : Style)
Applied to the box border drawn by #render.
-
#handle_key(ev : KeyEvent) : Bool
Returns true if the key was consumed.
-
#render : Nil
Draw into @buffer using LOCAL coordinates (0, 0 = this widget's own top-left).
-
#status_hint : String
Plain text describing the actions available in the widget's current state.
Instance methods inherited from class TUI::Widget
absolute(row : Int32, col : Int32) : NamedTuple(row: Int32, col: Int32)
absolute,
composite(screen : Screen) : Nil
composite,
focus_if(condition : Bool) : Nil
focus_if,
focused=(focused : Bool)
focused=,
focused? : Bool
focused?,
handle_key(ev : KeyEvent) : Bool
handle_key,
height : Int32
height,
height=(height : Int32)
height=,
local(row : Int32, col : Int32) : NamedTuple(row: Int32, col: Int32)
local,
render : Nil
render,
render_to(buffer : Buffer) : Nil
render_to,
status_hint : String
status_hint,
width : Int32
width,
width=(width : Int32)
width=,
x : Int32
x,
x=(x : Int32)
x=,
y : Int32
y,
y=(y : Int32)
y=
Constructor methods inherited from class TUI::Widget
new(x : Int32, y : Int32, width : Int32, height : Int32)
new
Constructor Detail
Instance Method Detail
Returns true if the key was consumed.
Draw into @buffer using LOCAL coordinates (0, 0 = this widget's own
top-left). Widgets never need to know their own x/y offset to draw
themselves — that arithmetic is handled entirely by composite.
Plain text describing the actions available in the widget's current state. Rendered by the App in the global status bar at the bottom of the screen — widgets must NOT draw their own hint lines.