Menu Display Handler Functions
Abstract
Used to specify a custom menu for an application's response when a user right-clicks an object.
Syntax
Menu Display Handler Function Name (obj_handle, menu_item_list_ptr)
| Argument | Type | Description |
|---|---|---|
obj_handle |
EtsT_Obj_Handle |
Handle to the object that was clicked. |
menu_item_list_ptr |
PrgT_List |
Pointer to a list of menu items to be displayed. |
Return Type
EtsT_Obj_Click_Return
One of the following constants:
EtsC_Obj_Click_Continue—indicates that the application should continue handling the click by displaying the menu.EtsC_Obj_Click_Handled—indicates that the click has been handled and the application should not do any further processing.
Details
The menu display handler function allows a model developer to make changes to the object pop-up menu that the ODK application displays when the user right-clicks an object. If a menu display handler function is specified for an object, the application calls the function when the user right-clicks that object. The function is passed the object handle and a list of strings comprising the menu that the application intends to display to the user.
The menu display handler function can alter the menu contents or perform other processing. If the function returns EtsC_Obj_Click_Continue, the ODK application displays the menu and lets the user choose an item from it. In addition, if a menu choose handler is specified, the application calls that function if the user makes a selection from the menu.
If the menu display handler function returns EtsC_Obj_Click_Handled, the right-click event is "consumed" and no menu is shown.