Class: ModraUp::Menu
- Inherits:
-
Object
- Object
- ModraUp::Menu
Overview
Top-level menus or submenus. Obtain them using UI.menu or #add_submenu.
Instance Method Summary # collapse
-
#add_item(title) ⇒ Integer
Add an item. The string title must be in a block; alternatively, you can pass UI::Command.
-
#add_separator ⇒ true
Add a separator to the menu.
-
#add_submenu(title) ⇒ ModraUp::Menu
Add a sub-menu and return it. The top bar is available in both the context menu as defined by UI.add_context_menu_handler and the right-click menu.
-
#set_validation_proc(item_id) ⇒ true
Set a validation block for the id returned by #add_item, which should return values like MF_ENABLED.
Instance Method Details
menu.add_item(title) { } ⇒ Integermenu.add_item(command) ⇒ Integer
Add an item. The string title must be in a block; alternatively, you can pass UI::Command.
menu.add_separator ⇒ true
Add a separator to the menu.
menu.set_validation_proc(item_id) { } ⇒ true
Set a validation block for the id returned by #add_item, which should return values like MF_ENABLED.