Module | MenuExtension |
In: |
lib/json/editor.rb
|
This module bundles some method, that can be used to create a menu. It should be included into the class in question.
menu | [R] | Returns the menu. |
treeview | [R] | Returns the Gtk::TreeView of this menu. |
Creates a Menu, that includes MenuExtension. treeview is the Gtk::TreeView, on which it operates.
Adds a Gtk::MenuItem to this instance‘s menu. label is the label string, klass is the item type, and callback is the procedure, that is called if the item is activated.
This method should be implemented in subclasses to create the menu of this instance. It has to be called after an instance of this class is created, to build the menu.