Class: Gtk::Menu
- Defined in:
- lib/knj/jruby-gtk2/menu.rb,
lib/knj/ironruby-gtk2/gtk_menu.rb
Instance Method Summary collapse
-
#initialize ⇒ Menu
constructor
A new instance of Menu.
- #popup(*paras) ⇒ Object
- #prepend(object) ⇒ Object
Constructor Details
#initialize ⇒ Menu
Returns a new instance of Menu.
2 3 4 5 6 7 8 9 10 11 12 |
# File 'lib/knj/jruby-gtk2/menu.rb', line 2 def initialize if Gtk.takeob @ob = Gtk.takeob Gtk.takeob = nil else splitted = self.class.to_s.split("::") classname = splitted[splitted.length - 1] class_spawn = Gtk.evalob("org.gnome.gtk." + classname) @ob = class_spawn.new end end |