Class: Sketchup::Menu
- Inherits:
-
Object
- Object
- Sketchup::Menu
Overview
An interface to a menu.
Instance Method Summary # collapse
-
#add_item(*args) ⇒ Object
The #add_item method is used to add a menu item to the specified menu.
-
#add_separator ⇒ nil
The #add_separator method is used to add a menu separator to a menu.
-
#add_submenu(title) ⇒ Sketchup::Menu
The #add_submenu method is used to add a sub-menu to a menu.
-
#set_validation_proc(item) { ... } ⇒ Object
The #set_validation_proc method is used to specify the menu validation procedure.
Instance Method Details
↑ #add_item(title) { ... } ⇒ Integer #add_item(command) ⇒ Integer
The #add_item method is used to add a menu item to the specified menu.
This method takes a block that defines the action to perform when the menu item is selected.
The item id that is returned can be used when adding an optional validation procedure for the menu item.
↑ #add_separator ⇒ nil
The #add_separator method is used to add a menu separator to a menu.
↑ #add_submenu(title) ⇒ Sketchup::Menu
The #add_submenu method is used to add a sub-menu to a menu.
↑ #set_validation_proc(item) { ... } ⇒ Object
The #set_validation_proc method is used to specify the menu validation procedure. Your procedure should return either MF_ENABLED, MF_DISABLED, MF_CHECKED, MF_UNCHECKED, or MF_GRAYED.