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.

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com