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.
Header
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.