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

InCopy CS5.5

Class

Menu

 A menu.

QuickLinks

addEventListener, getElements, removeEventListener, toSource, toSpecifier

Hierarchy

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

Properties

PropertyTypeAccessDescription
eventListenersEventListeners EventListener readonlyA collection of event listeners.
eventsEvents Event readonlyA collection of events.
indexnumber readonlyThe index of the Menu within its containing object.
isValidbool readonlyReturns true if the object specifier resolves to valid objects.
menuElementsMenuElements MenuElement readonlyA collection of menu elements.
menuItemsMenuItems MenuItem readonlyA collection of menu items.
menuSeparatorsMenuSeparators MenuSeparator readonlyA collection of menu separators.
namestring readonlyThe name of the Menu.
parentApplication readonlyThe parent of the Menu (a Application).
propertiesObject r/wA property that allows setting of several properties at the same time.
submenusSubmenus Submenu readonlyA collection of submenus.
titlestring readonlyThe name of the Menu for display in the user interface. The title includes any ampersand characters (&), which are used to tell the Windows OS to underline the following character in the name for use with the Alt key to navigate to a menu item. Double ampersands are used to display an actual ampersand character in the name. The Mac OS ignores and removes the extra ampersand characters.

Class

PropertyTypeAccessDescription
BEFORE_DISPLAYstring readonlyDispatched before the Menu is displayed. This event does not bubble. This event is not cancelable. (default: beforeDisplay)

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 Menu getElements ()
Resolves the object specifier, creating an array of object references.

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 Menu.

string toSpecifier ()
Retrieves the object specifier.

Element of

MenuElement.parent

MenuItem.parent

MenuSeparator.parent

Submenu.parent

Used in:

Menu Menus.nextItem (obj: Menu)

Menu Menus.previousItem (obj: Menu)

Return

Array of Menu Menu.getElements ()

Menu Menus.[] (index: number)

Menu Menus.anyItem ()

Array of Menu Menus.everyItem ()

Menu Menus.firstItem ()

Menu Menus.item (index: varies)

Menu Menus.itemByName (name: string)

Array of Menu Menus.itemByRange (from: varies, to: varies)

Menu Menus.lastItem ()

Menu Menus.middleItem ()

Menu Menus.nextItem (obj: Menu)

Menu Menus.previousItem (obj: Menu)

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