TUI::Runtime
Owns the generic TUI application lifecycle: terminal setup/teardown, the render/read-key/dispatch loop, SIGWINCH-driven resize, and the push/pop/render mechanics of a stack of full-screen Widgets. Consumers build their own widgets, wrap them in a NavStack(Widget), and hand it here along with a callback for everything that isn't Ctrl-C/Ctrl-D — this class owns no opinion about what any printable key (including 'q') should do.
Once a Runtime owns a NavStack, push/pop through Runtime#push/#pop (not NavStack#push/#pop or #handle_esc directly) so revealed/pushed widgets get resized to the current screen before their next render.
Constructors
Instance methods
The "delegate to child, pop only if unconsumed" idiom for Esc, routed through Runtime#pop (not NavStack#pop directly) so the revealed widget gets resized in case it went stale while backgrounded — mirrors NavStack#handle_esc's contract exactly, but callers that own a Runtime should use this one instead.
Pop back to the previous widget, resyncing its size in case it went stale while backgrounded.
The render/read-key/dispatch loop itself, without the surrounding terminal setup/teardown/signal trap — split out so it's exercisable against an injected IO (see @io) without touching real terminal state, e.g. in specs.
Forces a synchronous full render+flush outside the normal read/dispatch loop. Intended for a long blocking operation (e.g. a pkg apply) that emits progress via callbacks and needs the screen repainted between the loop's normal render points.
Swaps the widget at the bottom of the stack, resizing it to the current screen first — for a root screen whose structure changes based on runtime state.