Class: TuiTui::Modal
- Inherits:
-
Object
- Object
- TuiTui::Modal
- Defined in:
- lib/tui_tui/modal.rb,
lib/tui_tui/modal/help.rb,
lib/tui_tui/modal/pager.rb,
lib/tui_tui/modal/prompt.rb,
lib/tui_tui/modal/select.rb,
lib/tui_tui/modal/confirm.rb,
lib/tui_tui/modal/command_palette.rb
Overview
Base protocol and shared centered-panel framing for overlay widgets.
Defined Under Namespace
Classes: CommandPalette, Confirm, Help, Pager, Prompt, Select
Constant Summary collapse
- PAD =
2
Instance Method Summary collapse
- #draw(_canvas, _size) ⇒ Object
- #handle(_key) ⇒ Object
-
#handle_mouse(_event) ⇒ Object
Optional mouse handling, same return contract as #handle (resolved value, or nil to stay open).
Instance Method Details
#draw(_canvas, _size) ⇒ Object
22 |
# File 'lib/tui_tui/modal.rb', line 22 def draw(_canvas, _size) = raise NotImplementedError, "#{self.class}#draw" |
#handle(_key) ⇒ Object
15 |
# File 'lib/tui_tui/modal.rb', line 15 def handle(_key) = raise NotImplementedError, "#{self.class}#handle" |
#handle_mouse(_event) ⇒ Object
Optional mouse handling, same return contract as #handle (resolved value, or nil to stay open). Default no-op so widgets opt in only as needed; the host routes MouseEvents here and KeyEvents to #handle.
20 |
# File 'lib/tui_tui/modal.rb', line 20 def handle_mouse(_event) = nil |