Class: TopinambourWindow
- Inherits:
-
Gtk::ApplicationWindow
- Object
- Gtk::ApplicationWindow
- TopinambourWindow
- Includes:
- TopinambourWindowActions
- Defined in:
- lib/window.rb
Overview
Main window of Topinambour
Instance Attribute Summary collapse
-
#overlay ⇒ Object
readonly
Returns the value of attribute overlay.
-
#terminal ⇒ Object
readonly
Returns the value of attribute terminal.
Instance Method Summary collapse
- #add_terminal(cmd = '/usr/bin/zsh') ⇒ Object
- #create_header_bar ⇒ Object
- #exit_overlay_mode ⇒ Object
-
#initialize(application) ⇒ TopinambourWindow
constructor
A new instance of TopinambourWindow.
Methods included from TopinambourWindowActions
#display_about, #quit_gracefully, #show_color_selector, #show_font_selector, #show_shortcuts
Constructor Details
#initialize(application) ⇒ TopinambourWindow
Returns a new instance of TopinambourWindow.
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/window.rb', line 51 def initialize(application) super(application) @application = application set_icon_name('utilities-terminal-symbolic') set_name('topinambour-window') set_position(:center) @overlay = TopinambourOverlay.new signal_connect 'key-press-event' do |, event| TopinambourShortcuts.handle_key_press(, event) end add(@overlay) end |
Instance Attribute Details
#overlay ⇒ Object (readonly)
Returns the value of attribute overlay.
48 49 50 |
# File 'lib/window.rb', line 48 def @overlay end |
#terminal ⇒ Object (readonly)
Returns the value of attribute terminal.
48 49 50 |
# File 'lib/window.rb', line 48 def terminal @terminal end |
Instance Method Details
#add_terminal(cmd = '/usr/bin/zsh') ⇒ Object
67 68 69 70 71 |
# File 'lib/window.rb', line 67 def add_terminal(cmd = '/usr/bin/zsh') terminal = TopinambourTermBox.new(cmd, self) @terminal = terminal.term @overlay.(terminal) end |
#create_header_bar ⇒ Object
73 74 75 76 77 78 |
# File 'lib/window.rb', line 73 def = Gtk::HeaderBar.new .name = 'topinambour-headerbar' . = true () end |
#exit_overlay_mode ⇒ Object
80 81 82 |
# File 'lib/window.rb', line 80 def @overlay. end |