Adobe InCopy CS5.5 (7.5) Object Model JS: MenuElement

InCopy CS5.5

Class

MenuElement

 

A menu elements

Superclass of MenuItem, MenuSeparator, and Submenu

QuickLinks

addEventListener, getElements, remove, removeEventListener, toSource, toSpecifier

Hierarchy

Menu | Submenu
MenuElement
MenuItem | MenuSeparator | Submenu
Event | EventListener | MutationEvent

Properties

PropertyTypeAccessDescription
eventListenersEventListeners EventListener readonlyA collection of event listeners.
eventsEvents Event readonlyA collection of events.
indexnumber readonlyThe index of the MenuElement within its containing object.
isValidbool readonlyReturns true if the object specifier resolves to valid objects.
parentMenuSubmenu readonlyThe parent of the MenuElement (a Menu or Submenu).
propertiesObject r/wA property that allows setting of several properties at the same time.

Methods

Instances

EventListener addEventListener (eventType: string, handler: varies[, captures: bool=false])
Adds an event listener.

ParameterTypeDescription
eventTypestringThe event type.
handlerFile
JavaScript Function
The event handler. Can accept: File or JavaScript Function.
capturesboolThis parameter is obsolete. (Optional) (default: false)

Array of MenuElement getElements ()
Resolves the object specifier, creating an array of object references.

void remove ()
Deletes the MenuElement.

bool removeEventListener (eventType: string, handler: varies[, captures: bool=false])
Removes the event listener.

ParameterTypeDescription
eventTypestringThe registered event type.
handlerFile
JavaScript Function
The registered event handler. Can accept: File or JavaScript Function.
capturesboolThis parameter is obsolete. (Optional) (default: false)

string toSource ()
Generates a string which, if executed, will return the MenuElement.

string toSpecifier ()
Retrieves the object specifier.

Used in:

MenuElement MenuElements.nextItem (obj: MenuElement)

MenuElement MenuElements.previousItem (obj: MenuElement)

MenuItem MenuItems.add (associatedMenuAction: MenuAction[, at: LocationOptions=LocationOptions.AT_END][, reference: MenuElement][, withProperties: Object])

MenuSeparator MenuSeparators.add ([at: LocationOptions=LocationOptions.AT_END][, reference: MenuElement][, withProperties: Object])

Submenu Submenus.add (title: string[, at: LocationOptions=LocationOptions.AT_END][, reference: MenuElement][, withProperties: Object])

Return

Array of MenuElement MenuElement.getElements ()

MenuElement MenuElements.[] (index: number)

MenuElement MenuElements.anyItem ()

Array of MenuElement MenuElements.everyItem ()

MenuElement MenuElements.firstItem ()

MenuElement MenuElements.item (index: varies)

Array of MenuElement MenuElements.itemByRange (from: varies, to: varies)

MenuElement MenuElements.lastItem ()

MenuElement MenuElements.middleItem ()

MenuElement MenuElements.nextItem (obj: MenuElement)

MenuElement MenuElements.previousItem (obj: MenuElement)

Jongware, 29-Apr-2012 v3.0.3iContents :: Index