Class: Gtk2AppLib::Widgets::Menu
- Inherits:
-
Gtk::Menu
- Object
- Gtk::Menu
- Gtk2AppLib::Widgets::Menu
- Includes:
- Gtk2AppLib::Widgets
- Defined in:
- lib/gtk2applib/widgets/menu.rb
Overview
I'm a menu!
Constant Summary
Constant Summary
Constants included from Missing
Instance Attribute Summary
Attributes included from Gtk2AppLib::Widgets
Instance Method Summary (collapse)
Methods included from Gtk2AppLib::Widgets
_each, autoloads, autoloads_buttons, autoloads_others, autoloads_texts, #class_symbol, #common, #connect, define, define_composite, define_evented, execute, #execute, get_options, #initialize, #initialize_image, method_missing, pack, #pack, #set_options, #set_signals, symbol_check, widgets
Methods included from Missing
Instance Method Details
- (Object) append_menu_item(item, key = item)
8 9 10 11 12 13 14 |
# File 'lib/gtk2applib/widgets/menu.rb', line 8 def (item, key=item) item = Gtk::MenuItem.new(item) if item.class == String self.append(item) item.signal_connect('activate') { yield(key) } if block_given? item.show return item end |
- (Object) append_menu_items(keys, &block)
16 17 18 19 20 21 22 23 |
# File 'lib/gtk2applib/widgets/menu.rb', line 16 def (keys, &block) keys = [keys] unless keys.kind_of?(Array) items = [] keys.each do |key, item| items.push(self.((item || key), key, &block)) end return items end |