Class: Gtk::MenuItem

Inherits:
Object
  • Object
show all
Extended by:
GLib::Deprecatable
Defined in:
lib/gtk3/menu-item.rb,
lib/gtk3/deprecated.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ MenuItem

Returns a new instance of MenuItem.



20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/gtk3/menu-item.rb', line 20

def initialize(options={})
  label = options[:label]

  if label
    if options[:use_underline]
      initialize_new_with_mnemonic(label)
    else
      initialize_new_with_label(label)
    end
  else
    initialize_raw
  end
end

Instance Method Details

#initialize_rawObject



19
# File 'lib/gtk3/menu-item.rb', line 19

alias_method :initialize_raw, :initialize