EtsT_Obj_Model_Menu_Click_Handler
Abstract
Callback: Used to specify a custom menu for an application’s response when a user right-clicks an object.
Syntax
<model_menu_click_handler_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 * |
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.
Header
ets_api_obj.h
Details
Model menu click handlers let you make changes to the Object pop-up menu that an application displays when the user right-clicks an object. If a model menu click handler is specified for an object, the application calls it when the user right-clicks that object. The handler is passed the object handle and a list of strings comprising the menu that the application intends to display to the user.
The model menu click handler can alter the menu contents or perform other processing. If the handler returns EtsC_Obj_Click_Continue, the application displays the menu and lets the user choose an item from it. In addition, if a model menu choose handler is specified, the application calls that function if the user makes a selection from the menu.
If the model menu click handler returns EtsC_Obj_Click_Handled, the right-click event is “consumed” and no menu is shown.