Class: Gtk2AppLib::AppMenu
- Inherits:
-
Widgets::Menu
- Object
- Gtk::Menu
- Widgets::Menu
- Gtk2AppLib::AppMenu
- Defined in:
- lib/gtk2applib/app_menu.rb
Overview
This is the application/program menu
Constant Summary
Constant Summary
Constants included from Missing
Instance Attribute Summary
Attributes included from Widgets
Instance Method Summary (collapse)
-
- (Object) _set_menu(window)
Sets (connects) the main aplication window.
-
- (AppMenu) initialize(window, &block)
constructor
Creates a new application window and appends :fs, :about, :help, :dock, :close, :quit.
Methods inherited from Widgets::Menu
#append_menu_item, #append_menu_items
Methods included from Widgets
_each, autoloads, autoloads_buttons, autoloads_others, autoloads_texts, #class_symbol, #common, #connect, define, define_composite, define_evented, #execute, execute, get_options, #initialize_image, method_missing, #pack, pack, #set_options, #set_signals, symbol_check, widgets
Methods included from Missing
Constructor Details
- (AppMenu) initialize(window, &block)
Creates a new application window and appends :fs, :about, :help, :dock, :close, :quit
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/gtk2applib/app_menu.rb', line 24 def initialize(window, &block) super() [:fs, :about, :help, :dock, :close, :quit].each do |type| if prompt = SysConfig::MENU[type] then (prompt, type, &block) end end (window) show_all end |
Instance Method Details
- (Object) _set_menu(window)
Sets (connects) the main aplication window
10 11 12 13 14 15 16 17 18 |
# File 'lib/gtk2applib/app_menu.rb', line 10 def (window) # linux's version window.add_events(Gdk::Event::BUTTON_PRESS_MASK) window.signal_connect('button_press_event') do |, event| if event. == 3 then self.popup(nil, nil, 3, event.time) end end end |