Index

An index.

Methods:

addEventListener, capitalize, extractLabel, generate, getElements, importTopics, insertLabel, removeEventListener, removeUnusedTopics, toSource, toSpecifier, update

Objects:

Boolean, EventListeners, Events, IndexSections, Number, Object, String, Topic, Topics

Property Listing

Property

Type

Access

Description

allTopics

Array of Topic

readonly

The topics in the specified index section.

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

index

Number

readonly

The index of the Index within its containing object.

indexSections

IndexSections IndexSection

readonly

A collection of index sections.

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.

name

String

read/write

The name of the Index; this is an alias to the Index's label property.

parent

Document

readonly

The parent of the Index (a Document).

properties

Object

read/write

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

topics

Topics Topic

readonly

A collection of index topics.

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)

undefined capitalize ([capitalizationOption:IndexCapitalizationOptions=IndexCapitalizationOptions])

Makes the initial letter for the specified index topic or group of index topics upper case.

Parameter

Type

Description

capitalizationOption

IndexCapitalizationOptions

IndexCapitalizationOptions.ALL_ENTRIES

IndexCapitalizationOptions.ALL_LEVEL_1_ENTRIES

IndexCapitalizationOptions.INCLUDE_SUBENTRIES

IndexCapitalizationOptions.SELECTED_ENTRY

The entry or entries to capitalize. (Optional)

(default: IndexCapitalizationOptions.ALL_ENTRIES)

String extractLabel (key:String)

Gets the label value associated with the specified key.

Parameter

Type

Description

key

String

The key.

Story generate (on:Varies Page Spread MasterSpread, placePoint:Array of Number String, destinationLayer:Layer, [autoflowing:Boolean=Boolean], [includeOverset:Boolean=Boolean])

Generates a new index story.

Parameter

Type

Description

on

Page

Spread

MasterSpread

The spread or page on which to place the story. Can accept: Page, Spread or MasterSpread. (Optional)

placePoint

Array of Number

Array of String

The coordinates of the upper left corner of the story bounding box, in the format [x, y]. (Optional)

destinationLayer

Layer

The layer on which to place the story. (Optional)

autoflowing

Boolean

If true, allows the story to flow onto subsequent pages if the story does not fit on the specified page. If no subsequent pages exist in the document, creates the necessary pages. (Optional)

(default: false)

includeOverset

Boolean

If true, includes topics in overset text in the story. (Optional)

(default: false)

Index getElements ()

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

undefined importTopics (from:File)

Imports a list of index topics.

Parameter

Type

Description

from

File

The file from which to import the topics.

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.

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)

undefined removeUnusedTopics ()

Removes all index topics that do not have any index entries.

String toSource ()

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

String toSpecifier ()

Retrieves the object specifier.

undefined update ()

Updates the index preview pane. Note: Does not update the index.

Object of

IndexSection.parent

Topic.parent

Return

Indexes.add()

Index.getElements()

Indexes.anyItem()

Indexes.everyItem()

Indexes.nextItem()

Indexes.previousItem()

Indexes.itemByID()

Indexes.item()

Indexes.[]()

Indexes.itemByName()

Indexes.itemByRange()

Indexes.firstItem()

Indexes.lastItem()

Indexes.middleItem()