ContextMenuAddArgs - Cloud - Author-it

Development Documentation

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:

PluginName

String. The name of the plug-in. Must be unique. This will be displayed as the menu item text when IsSeparator is false.

PluginFolderPath

String. Do not set. Internal use only.

Position

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.

IsSeparator

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.

SelectedObjectsMin

Integer. The minimum number of objects that must be selected to enable the plug-in. Default is 1.

SelectedObjectsMax

Integer. The maximum number of objects that must be selected to enable the plug-in. Default is Integer.MaxValue.

SelectedObjectsTypes

ObjectType array. A list of object types which must be selected to enable the plug-in. (Enum ObjectType) Default is All.

SelectedObjectsSameType

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.

SelectedObjectsTemplateNames

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.

Type: System.Object

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.

Type: System.String

The file may be of type the following types.

  • .ico
  • .gif
  • .jpg
  • .png.

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.

OnClick

Delegate. The method in the plug-in which will be called when the button is clicked. This method will receive the AuthoritEventArgs.