Adobe InDesign CS4 (6.0) Object Model JS: Submenu

InDesign CS4

Class

Submenu

 A submenu. Base Class: MenuElement

QuickLinks

addEventListener, getElements, remove, removeEventListener, toSource, toSpecifier

Hierarchy

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

Properties

PropertyTypeAccessDescription
eventListenersEventListeners readonlyA collection of event listeners.
eventsEvents readonlyA collection of events.
indexnumber readonlyThe index of the Submenu within its containing object.
isValidbool readonlyReturns true if the object specifier resolves to valid objects.
menuElementsMenuElements readonlyA collection of menu elements.
menuItemsMenuItems readonlyA collection of menu items.
menuSeparatorsMenuSeparators readonlyA collection of menu separators.
namestring readonlyThe name of the Submenu.
parentMenuSubmenu readonlyThe parent of the Submenu (a Menu or Submenu).
propertiesObject r/wA property that allows setting of several properties at the same time.
submenusSubmenus readonlyA collection of submenus.
titlestring readonlyThe name of the Submenu 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.

Methods

Instances

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

ParameterTypeDescription
eventTypestringThe event type.
handlerFile
JavaScript Function
The event handler. Can accept: File or JavaScript Function.
capturesboolIf true, the handler is called only in the capturing phase of event propagation. If false, the handler is called in the bubbling phase if the event is an ancestor of the target, or in the at-target phase if the parent of the event listener is itself the target of the event. (Optional) (default: false)

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

void remove ()
Deletes the Submenu.

bool removeEventListener (eventType: string, handler: any[, 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.
capturesboolIf true, the handler responds only in the capture phase. (Optional) (default: false)

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

string toSpecifier ()
Retrieves the object specifier.

Element of

Event.parent

EventListener.parent

MenuElement.parent

MenuItem.parent

MenuSeparator.parent

Submenu.parent

Used in:

array of Submenu Submenus.itemByRange (from: any, to: any)

Submenu Submenus.nextItem (obj: Submenu)

Submenu Submenus.previousItem (obj: Submenu)

Return

Array of Submenu Submenu.getElements ()

Submenu Submenus.[] (index: number)

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

Submenu Submenus.anyItem ()

Array of Submenu Submenus.everyItem ()

Submenu Submenus.firstItem ()

Submenu Submenus.item (index: any)

Submenu Submenus.itemByName (name: string)

Array of Submenu Submenus.itemByRange (from: any, to: any)

Submenu Submenus.lastItem ()

Submenu Submenus.middleItem ()

Submenu Submenus.nextItem (obj: Submenu)

Submenu Submenus.previousItem (obj: Submenu)

Jongware, 20-Jun-2010 v3.0.3dContents :: Index