Class: TuiTui::Modal
- Inherits:
-
Object
- Object
- TuiTui::Modal
- Defined in:
- lib/tui_tui/modal.rb
Overview
Base protocol and shared centered-panel framing for overlay widgets.
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
18 |
# File 'lib/tui_tui/modal.rb', line 18 def draw(_canvas, _size) = raise NotImplementedError, "#{self.class}#draw" |
#handle(_key) ⇒ Object
11 |
# File 'lib/tui_tui/modal.rb', line 11 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.
16 |
# File 'lib/tui_tui/modal.rb', line 16 def handle_mouse(_event) = nil |