Class: Smartdict::Gui::MenuBar
- Inherits:
-
Gtk::MenuBar
- Object
- Gtk::MenuBar
- Smartdict::Gui::MenuBar
- Defined in:
- lib/smartdict/gui/menu_bar.rb
Instance Method Summary collapse
-
#initialize(controller) ⇒ MenuBar
constructor
A new instance of MenuBar.
Constructor Details
#initialize(controller) ⇒ MenuBar
Returns a new instance of MenuBar.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/smartdict/gui/menu_bar.rb', line 5 def initialize(controller) @controller = controller super() = Gtk::MenuItem.new("_File") file_exit_item = Gtk::MenuItem.new("_Exit") file_exit_item.signal_connect("activate") {@controller.quit} file_export_item = Gtk::MenuItem.new("_Export") file_export_item.signal_connect("activate") { @controller.open_export_dialog } = Gtk::Menu.new .add(file_export_item) .add(file_exit_item) . = = Gtk::MenuItem.new("_Help") help_about_item = Gtk::MenuItem.new("About") help_about_item.signal_connect("activate"){ @controller.open_about_window } = Gtk::Menu.new .add(help_about_item) . = append() append() end |