Class: TopinambourOverlay
- Inherits:
-
Gtk::Overlay
- Object
- Gtk::Overlay
- TopinambourOverlay
- Defined in:
- lib/window.rb
Overview
This overlay contains the main terminal and allows another widgets to be
displayed on top of it.
Instance Method Summary collapse
- #add_main_widget(terminal) ⇒ Object
-
#add_secondary_widget(widget) ⇒ Object
Add a widget over the main widget of the overlay.
-
#exit_overlay_mode ⇒ Object
Display only the main widget.
-
#in_overlay_mode? ⇒ Boolean
Check if there is a widget displayed on top of the main widget.
-
#initialize ⇒ TopinambourOverlay
constructor
A new instance of TopinambourOverlay.
- #toggle_overlay(klass) ⇒ Object
Constructor Details
#initialize ⇒ TopinambourOverlay
Returns a new instance of TopinambourOverlay.
88 89 90 |
# File 'lib/window.rb', line 88 def initialize super() end |
Instance Method Details
#add_main_widget(terminal) ⇒ Object
92 93 94 95 |
# File 'lib/window.rb', line 92 def (terminal) @terminal = terminal add(@terminal) end |
#add_secondary_widget(widget) ⇒ Object
Add a widget over the main widget of the overlay.
98 99 100 101 |
# File 'lib/window.rb', line 98 def () () (, false) end |
#exit_overlay_mode ⇒ Object
Display only the main widget.
109 110 111 |
# File 'lib/window.rb', line 109 def children[1].destroy if end |
#in_overlay_mode? ⇒ Boolean
Check if there is a widget displayed on top of the main widget.
104 105 106 |
# File 'lib/window.rb', line 104 def children.size > 1 end |
#toggle_overlay(klass) ⇒ Object
113 114 115 116 117 118 119 120 121 |
# File 'lib/window.rb', line 113 def (klass) if && @overlay.children[1].class == klass @terminal.term.grab_focus else (klass.new(@terminal.toplevel)) children[1].show_all end end |