This function is called when a user right-clicks an item in the library to display a shortcut menu. HotDocs passes information about the selected library item(s), which can be used to determine which entries to include in the submenu, or how submenu commands should operate. The plug-in can then tell HotDocs the name of the submenu, where it should appear in the shortcut menu, and whether it should be preceded or followed by a separator bar. Finally, the plug-in can also enable or disable the submenu as needed.
ContextGetMenuTitle ( string libraryPath , HotDocs.LibraryEntity caretEntry , ref string menuTitle , ref int menuPosition , ref bool enabled , ref bool separatorBefore , ref bool separatorAfter )
Parameter | Description |
libraryPath | The file path for the open library. |
caretEntry | A HotDocs.LibraryEntity object representing the item selected in the library. |
menuTitle | Returns the title of the menu to add. |
menuPosition | The position in the shortcut menu where the new menu should be placed. A value of -1 represents the bottom of the menu. |
enabled | Specifies whether the menu entry should be enabled (TRUE) or disabled (FALSE). |
separatorBefore | Specifies whether or not a separator bar will be placed in the shortcut menu before the title. |
separatorAfter | Specifies whether or not a separator bar will be placed in the shortcut menu after the title. |
The following Visual C# example implements the ContextGetMenuTitle function:
public void ContextGetMenuTitle(string libraryPath, LibraryEntity caretEntry, ref string menuTitle, ref int menuPosition, ref bool enabled, ref bool separatorBefore, ref bool separatorAfter) { menuTitle = "My Submenu"; menuPosition = -1; }