TOCStyle

A TOC style definition.

Methods:

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

Objects:

Boolean, EventListeners, Events, HorizontalOrVertical, Number, NumberedParagraphsOptions, Object, ParagraphStyle, String, TOCStyleEntries

Property Listing

Property

Type

Access

Description

createBookmarks

Boolean

read/write

If true, creates bookmarks for TOC entries.

eventListeners

EventListeners EventListener

readonly

A collection of event listeners.

events

Events Event

readonly

A collection of events.

id

Number

readonly

The unique ID of the TOCStyle.

includeBookDocuments

Boolean

read/write

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

includeHidden

Boolean

read/write

If true, the TOC includes entries from text on hidden layers.

index

Number

readonly

The index of the TOCStyle within its containing object.

isValid

Boolean

readonly

Returns true if the object specifier resolves to valid objects.

label

String

read/write

A property that can be set to any string.

makeAnchor

Boolean

read/write

If true, make text anchor in source paragraph.

name

String

read/write

The name of the TOCStyle.

numberedParagraphs

NumberedParagraphsOptions

NumberedParagraphsOptions.EXCLUDE_NUMBERS

NumberedParagraphsOptions.INCLUDE_FULL_PARAGRAPH

NumberedParagraphsOptions.INCLUDE_NUMBERS_ONLY

read/write

The format for importing numbered paragraphs into the TOC.

parent

Document

readonly

The parent of the TOCStyle (a Document).

properties

Object

read/write

A property that allows setting of several properties at the same time.

removeForcedLineBreak

Boolean

read/write

If true, remove forced line breaks.

runIn

Boolean

read/write

If true, the lowest-level TOC entries are placed on the same line as the previous entry.

setStoryDirection

HorizontalOrVertical

HorizontalOrVertical.HORIZONTAL

HorizontalOrVertical.VERTICAL

read/write

The table of contents story direction.

title

String

read/write

The TOC title.

titleStyle

ParagraphStyle

read/write

The paragraph style applied to the TOC title.

tocStyleEntries

TOCStyleEntries TOCStyleEntry

readonly

A collection TOC style entries.

Method Listing

EventListener addEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])

Adds an event listener.

Parameter

Type

Description

eventType

String

The event type.

handler

File

JavaScriptFunction

The event handler. Can accept: File or JavaScript Function.

captures

Boolean

This parameter is obsolete. (Optional)

(default: false)

TOCStyle duplicate ()

Duplicates the TOCStyle.

String extractLabel (key:String)

Gets the label value associated with the specified key.

Parameter

Type

Description

key

String

The key.

TOCStyle getElements ()

Resolves the object specifier, creating an array of object references.

undefined insertLabel (key:String, value:String)

Sets the label to the value associated with the specified key.

Parameter

Type

Description

key

String

The key.

value

String

The value.

undefined remove ()

Deletes the TOCStyle.

Boolean removeEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])

Removes the event listener.

Parameter

Type

Description

eventType

String

The registered event type.

handler

File

JavaScriptFunction

The registered event handler. Can accept: File or JavaScript Function.

captures

Boolean

This parameter is obsolete. (Optional)

(default: false)

String toSource ()

Generates a string which, if executed, will return the TOCStyle.

String toSpecifier ()

Retrieves the object specifier.

Object of

TypefiFrameItem.style

Event.parent

EventListener.parent

MutationEvent.parent

TOCStyleEntry.parent

Return

TOCStyles.add()

TOCStyle.duplicate()

TOCStyle.getElements()

TOCStyles.anyItem()

TOCStyles.everyItem()

TOCStyles.nextItem()

TOCStyles.previousItem()

TOCStyles.itemByID()

TOCStyles.item()

TOCStyles.[]()

TOCStyles.itemByName()

TOCStyles.itemByRange()

TOCStyles.firstItem()

TOCStyles.lastItem()

TOCStyles.middleItem()