Object Hierarchy | Related C++ Class: MenuItem
SIObject UIObject MenuItem
The MenuItem object represents an individual item of a custom Menu. With the MenuItem object you can attach a command or a callback function to a menu item and fire it when you click on the menu item.
Other features of custom menu items include:
- Menu items set with a command are greyed out if the command is disabled.
- Menu items will show the origin of the command or callback ([u] for user, [w] for workgroup).
- Menu items that point to a command will show the hotkey associated with the command.
- Set them with a Filter to validate the menu items against the selected/target object(s) before opening the menu. Custom menus are greyed out or removed if the filter criteria is not satisfied.
- Callback functions are undoable provided that commands or object model methods they used supports undo and redo.
A menu item can be defined as a standard menu item on which you can attach a command or callback function (Note: If for some reasons you assign both a command and a callback to your menu item, the callback will have precedence over the command when the menu item is selected). You can also create a menu item as a separator or as a sub menu. See the Menu object documentation for more details about adding menu items to a custom menu.
• See MenuItem.1.js
Autodesk Softimage 2011