Ets_Tool_Popup_Menu_Open()

Note: Requires OPNET Development Kit

Abstract

Opens a pop-up menu in the current tool window.

Syntax

Ets_Tool_Popup_Menu_Open (menu_item_lptr, callback_proc, state_ptr)
Argument Type Description
menu_item_lptr PrgT_List* A list of strings specifying the items in the pop-up menu.
callback_proc EtsT_Tool_Popup_Menu_Callback A function to be called when the user selects an item from the pop-up menu; it will be passed the value of state_ptr, as well as the index and text of the selected item.
state_ptr void * An arbitrary value which is passed along to the callback procedure.

Return Type

void

No return value.

ets_api_tool.h

Details

This function opens a pop-up menu in the current tool window. For example, it might be called from a mouse click handler function in response to a right click. The contents of the menu are specified by the menu_item_lptr argument. When the user selects an item from the menu, the callback procedure specified by the callback_proc argument is called; it will be passed the same value of state_ptr that was passed to this function.

The appearance of items within the menu may be controlled by specifying certain meta-characters as the first character in the menu item string:

  • "!"—The menu item is disabled; its text appears dimmed and it cannot be selected by the user.
  • "^"—The menu item is a toggle and can appear with a leading checkmark. To add the checkmark, include an asterisk (*) after the "^".

To add a separator line to the menu, specify an empty string at the desired position in the item list.

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · 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