Module: MenuExtension

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.

### Methods

add_item add_separator create method_missing new

### Included Modules

Gtk

### Attributes

menu | [R] | Returns the menu.
treeview | [R] | Returns the Gtk::TreeView of this menu.

### Public Class methods

new(treeview)

Creates a Menu, that includes MenuExtension. treeview is the Gtk::TreeView, on which it operates.

### Public Instance methods

add_item(label, keyval = nil, klass = MenuItem, &callback)

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.

add_separator()

Adds a Gtk::SeparatorMenuItem to this instance‘s menu.

create()

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.

method_missing(*a, &b)

[Validate]