Adobe InDesign CS6 (8.0) Object Model JS: TOCStyle

InDesign CS6

Class

TOCStyle

 A TOC style definition.

QuickLinks

addEventListener, duplicate, extractLabel, getElements, insertLabel, remove, removeEventListener, toSource, toSpecifier

Hierarchy

Document
TOCStyle
Event | EventListener | MutationEvent | TOCStyleEntry

Properties

PropertyTypeAccessDescription
createBookmarksbool r/wIf true, creates bookmarks for TOC entries.
eventListenersEventListeners readonlyA collection of event listeners.
eventsEvents readonlyA collection of events.
idnumber readonlyThe unique ID of the TOCStyle.
includeBookDocumentsbool r/wIf true, includes the entire book in the TOC. If false, includes only the TOC entries in the current document. Note: Valid when the current document is part of a book.
includeHiddenbool r/wIf true, the TOC includes entries from text on hidden layers.
indexnumber readonlyThe index of the TOCStyle within its containing object.
isValidbool readonlyReturns true if the object specifier resolves to valid objects.
labelstring r/wA property that can be set to any string.
namestring r/wThe name of the TOCStyle.
numberedParagraphsNumberedParagraphsOptions:
NumberedParagraphsOptions.INCLUDE_FULL_PARAGRAPH
NumberedParagraphsOptions.INCLUDE_NUMBERS_ONLY
NumberedParagraphsOptions.EXCLUDE_NUMBERS
r/wThe format for importing numbered paragraphs into the TOC.
parentDocument readonlyThe parent of the TOCStyle (a Document).
propertiesObject r/wA property that allows setting of several properties at the same time.
runInbool r/wIf true, the lowest-level TOC entries are placed on the same line as the previous entry.
setStoryDirectionHorizontalOrVertical:
HorizontalOrVertical.HORIZONTAL
HorizontalOrVertical.VERTICAL
r/wThe table of contents story direction.
titlestring r/wThe TOC title.
titleStyleParagraphStyle r/wThe paragraph style applied to the TOC title.
tocStyleEntriesTOCStyleEntries readonlyA collection TOC style entries.

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)

TOCStyle duplicate ()
Duplicates the TOCStyle.

string extractLabel (key: string)
Gets the label value associated with the specified key.

ParameterTypeDescription
keystringThe key.

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

void insertLabel (key: string, value: string)
Sets the label to the value associated with the specified key.

ParameterTypeDescription
keystringThe key.
valuestringThe value.

void remove ()
Deletes the TOCStyle.

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

string toSpecifier ()
Retrieves the object specifier.

Element of

TOCStyleEntry.parent

Used in:

array of Story Document.createTOC (using: TOCStyle[, replacing: bool=false][, fromBook: Book][, placePoint: Array of Measurement Unit (Number or String)][, includeOverset: bool=false][, destinationLayer: Layer])

TOCStyle TOCStyles.nextItem (obj: TOCStyle)

TOCStyle TOCStyles.previousItem (obj: TOCStyle)

Return

TOCStyle TOCStyle.duplicate ()

Array of TOCStyle TOCStyle.getElements ()

TOCStyle TOCStyles.[] (index: number)

TOCStyle TOCStyles.add ([withProperties: Object])

TOCStyle TOCStyles.anyItem ()

Array of TOCStyle TOCStyles.everyItem ()

TOCStyle TOCStyles.firstItem ()

TOCStyle TOCStyles.item (index: varies)

TOCStyle TOCStyles.itemByID (id: number)

TOCStyle TOCStyles.itemByName (name: string)

Array of TOCStyle TOCStyles.itemByRange (from: varies, to: varies)

TOCStyle TOCStyles.lastItem ()

TOCStyle TOCStyles.middleItem ()

TOCStyle TOCStyles.nextItem (obj: TOCStyle)

TOCStyle TOCStyles.previousItem (obj: TOCStyle)

Jongware, 28-Apr-2012 v3.0.3hContents :: Index