mbRegisterMenuItem
mbRegisterMenuItem(t_viewType l_menuItemDef t_enableCB) =>t_menuItemId/nil
Description
Registers a menu item with the menu builder that has been defined using the older menu creation syntax. mbSetContextData needs to be called before the menu item is visible.
Arguments
|
Name of the view type for which this action has been registered. |
|
|
List containing the old style menu definition. The list is specified in the following format: |
|
Values Returned
Example
MyNewItem = '(NewItem "&New..." "deFileNew()")
mbRegisterMenuItem("maskLayout" MyNewItem "t")
mbSetContextData("maskLayout" "NewItem" "Shape" "Canvas" "Common")
Returns hiMenuItem@0x1cdaa020, t.
You can use
symbolToString(car(MyNewItem)) to get the second argument for the function mbSetContextData().
Registers the menu item MyNewItem with the menu builder. is called to make this menu item visible. Also, the unique ID of the menu item, NewItem is the first entry in the sublist passed as the second argument to mbRegisterMenuItem.
Return to top