ContextMenuAddArgs are used to add a plug-in to an object context menu in Author-it. The enabling criteria are used to define the conditions for when the menu item is visible. The enabling criteria are the properties whose name starts with 'Selected'.
ContextMenuAddArgs have the following properties:
String. The name of the plug-in. Must be unique. This will be displayed as the menu item text when IsSeparator is false.
String. Do not set. Internal use only.
Integer. (Optional). Use this to specify the position at which the new menu item will be inserted. 1 = top, 2 = second from top, etc. If null or zero, the item will be added at the bottom of the menu. Position only includes Author-it menu items. If there are other plug-ins, then position cannot be guaranteed.
Boolean. If true, a separator (horizontal line) will be added to the menu. No text will be displayed. Do not use the OnClick or Icon... properties when this is set to true.
Integer. The minimum number of objects that must be selected to enable the plug-in. Default is 1.
Integer. The maximum number of objects that must be selected to enable the plug-in. Default is Integer.MaxValue.
ObjectType array. A list of object types which must be selected to enable the plug-in. (Enum ObjectType) Default is All.
Boolean. Set to true to indicate that all selected objects must be of the same object type to enable the plug-in. Default is false.
String array. A list of template names which may selected to enable the plug-in. The plug-in will be enabled when an object is selected that is based on this template. Default is All.
Gets or sets a System.Drawing.Icon or System.Drawing.Bitmap object that specifies the image to display for the context menu item. Use this property to reference an image that you include in the plug-in assembly.
Note: The image size for the context menu item should be 16x16 pixels.For the menu item the image size should be 16x16 pixels.
Gets or sets the path to an image file that specifies the image to display for the context menu item.
The file may be of type the following types.
The path can be relative or absolute. Use this property when the image is external to the plug-in assembly.
Note: Author ignores this property when you set a value for the IconImage property.
Delegate. The method in the plug-in which will be called when the button is clicked. This method will receive the AuthoritEventArgs.