This document covers the following topics:
Gives access to a specific context menu.
The following properties are available:
Used to navigate to the parent interface of this interface.
Natural Data Format | Variant Type | Remark |
---|---|---|
HANDLE OF OBJECT | VT_DISPATCH (INatAutoContextMenus) | Get only |
Used to navigate to the root interface.
Natural Data Format | Variant Type | Remark |
---|---|---|
HANDLE OF OBJECT | VT_DISPATCH (INatAutoStudio) | Get only |
The number of items (commands, separators and pop-up menus) in the menu.
Natural Data Format | Variant Type | Remark |
---|---|---|
I4 | VT_I4 | Get only |
A string used to identify the menu, as defined when the menu was created.
Natural Data Format | Variant Type | Remark |
---|---|---|
A | VT_BSTR | Get only |
The following methods are available:
Returns a specific item contained in the menu, based on an index.
Name | Natural Data Format | Variant Type | Remark |
---|---|---|---|
Return value | A | VT_BSTR | |
Index |
I4 |
VT_I4 |
The caption of the menu item (command or pop-up menu) identified by the value specified in Index. If the index identifies a separator, an empty string is returned.
The index of the item in the menu (a value between 1 and Count).
Returns a specific pop-up menu contained in the menu, based on an index.
Name | Natural Data Format | Variant Type | Remark |
---|---|---|---|
Return value | HANDLE OF OBJECT | VT_DISPATCH (INatAutoPopupMenu) | |
Index |
I4 |
VT_I4 |
The pop-up menu identified by the value specified in Index. If the specified index does not identify a pop-up menu, but a command or a separator, a null interface pointer (NULL-HANDLE) is returned.
As index either a number between 1 and Count or the caption of a pop-up menu can be specified.
Inserts a command into the menu.
Name | Natural Data Format | Variant Type | Remark |
---|---|---|---|
Command | HANDLE OF OBJECT | VT_DISPATCH (INatAutoCommand) | |
Index | I4 | VT_I4 | Optional |
A command to be added to the menu. The command must have been
defined before using the method INatAutoCommands::Add
.
The position in the menu where the command shall be inserted. If Index is omitted, the command is inserted at the last position.
Inserts a separator into the menu.
Name | Natural Data Format | Variant Type | Remark |
---|---|---|---|
Index | I4 | VT_I4 | Optional |
The position in the menu where the separator shall be inserted. If Index is omitted, the separator is inserted at the last position.
Creates a new pop-up menu and inserts it into the menu.
Name | Natural Data Format | Variant Type | Remark |
---|---|---|---|
Return value | HANDLE OF OBJECT | VT_DISPATCH (INatAutoPopupMenu) | |
Caption | A | VT_BSTR | |
Index | I4 | VT_I4 | Optional |
The newly created pop-up menu.
A string used to identify the pop-up menu.
The position in the menu where the pop-up menu shall be inserted. If Index is omitted, the pop-up menu is inserted at the last position.
Changes in a menu are not made visible immediately, in order to avoid flickering. After having finished modifying a menu, make the recent changes visible by calling this method.