Adobe InDesign CS6 (8.0) Object Model JS: LayoutWindow

InDesign CS6

Class

LayoutWindow

 A layout window. Base Class: Window

QuickLinks

addEventListener, bringToFront, close, getElements, maximize, minimize, removeEventListener, restore, select, toSource, toSpecifier, zoom

Hierarchy

Document
Window
LayoutWindow
Event | EventListener | MutationEvent

Properties

PropertyTypeAccessDescription
activeLayerLayerString r/wThe active layer. Can also accept: String.
activePagePage r/wThe front-most page.
activeSpreadMasterSpread
Spread
r/wThe front-most spread. Can return: Spread or MasterSpread.
boundsArray of number r/wThe bounds of the window (specified in pixels) in the form [top, left, bottom, right].
eventListenersEventListeners readonlyA collection of event listeners.
eventsEvents readonlyA collection of events.
indexnumber readonlyThe index of the LayoutWindow within its containing object.
isValidbool readonlyReturns true if the object specifier resolves to valid objects.
namestring readonlyThe name of the LayoutWindow.
overprintPreviewbool r/wIf true, display a simulation of overprinting.
parentDocument readonlyThe parent of the LayoutWindow (a Document).
preserveColorNumbersbool r/wIf true, leaves color values unchanged for CMYK objects without embedded profiles and native objects such as line art or type. Note: Converts images whose profiles differ from the profile of the simulated device. Valid only when proofing type is custom.
proofingProfilestring r/wThe profile used for proofing colors.
proofingTypeProofingType:
ProofingType.PROOF_OFF
ProofingType.DOCUMENT_CMYK
ProofingType.WORKING_CMYK
ProofingType.CUSTOM
r/wThe method of proofing colors.
propertiesObject r/wA property that allows setting of several properties at the same time.
screenModeScreenModeOptions:
ScreenModeOptions.PREVIEW_OFF
ScreenModeOptions.PREVIEW_TO_PAGE
ScreenModeOptions.PREVIEW_TO_BLEED
ScreenModeOptions.PREVIEW_TO_SLUG
ScreenModeOptions.PRESENTATION_PREVIEW
r/wThe screen mode for layout view.
selectionArray of NothingEnum
Object
Object
r/wThe selected object(s). Can also accept: Object or NothingEnum enumerator.
selectionKeyObjectNothingEnum
PageItem
r/wThe key object of the selection. Can also accept: NothingEnum enumerator.
simulateInkBlackbool r/wIf true, simulates the dark gray produced by many printers in place of solid black, according to the proofing profile. Note: Valid only when proofing type is custom.
simulatePaperWhitebool r/wIf true, simulates the dingy white of real paper, according to the proofing profile. Note: Valid only when proofing type is custom.
transformReferencePointAnchorPoint
Array of 2 Units
r/wThe default anchor point around which to transform objects. Can return: AnchorPoint enumerator or Array of 2 Units.
viewDisplaySettingViewDisplaySettings:
ViewDisplaySettings.HIGH_QUALITY
ViewDisplaySettings.TYPICAL
ViewDisplaySettings.OPTIMIZED
r/wThe display performance preferences override for the view.
zoomPercentagenumber (range: 5 - 4000) r/wThe size (as a percentage) to which to enlarge or reduce the view of the document. (Range: 5 to 4000)

Class

PropertyTypeAccessDescription
AFTER_ACTIVATEstring readonlyDispatched after the LayoutWindow becomes active. This event bubbles. This event is not cancelable. (default: afterActivate)
AFTER_ATTRIBUTE_CHANGEDstring readonlyDispatched when the value of a property changes on this LayoutWindow. This event bubbles. This event is not cancelable. (default: afterAttributeChanged)
AFTER_CLOSEstring readonlyDispatched when a LayoutWindow is closing. Since the close has been committed, it can no longer be canceled. This event bubbles. This event is not cancelable. (default: afterClose)
AFTER_OPENstring readonlyDispatched after a LayoutWindow is opened. This event bubbles. This event is not cancelable. (default: afterOpen)
AFTER_SELECTION_ATTRIBUTE_CHANGEDstring readonlyDispatched after an attribute on the active selection changes. This event bubbles. This event is not cancelable. (default: afterSelectionAttributeChanged)
AFTER_SELECTION_CHANGEDstring readonlyDispatched after the active selection changes. This event bubbles. This event is not cancelable. (default: afterSelectionChanged)
BEFORE_CLOSEstring readonlyDispatched before a LayoutWindow is closed. This event bubbles. This event is cancelable. (default: beforeClose)
BEFORE_DEACTIVATEstring readonlyDispatched before the LayoutWindow becomes inactive. This event bubbles. This event is not cancelable. (default: beforeDeactivate)

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)

void bringToFront ()
Brings the object to the front.

void close ()
Closes the LayoutWindow.

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

void maximize ()
Maximizes the window.

void minimize ()
Minimizes the window.

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)

void restore ()
Restores the window.

void select (selectableItems: varies[, existingSelection: SelectionOptions=SelectionOptions.REPLACE_WITH])
Selects the specified object(s).

ParameterTypeDescription
selectableItemsArray of Objects
NothingEnum
Object
SelectAll
The objects to select. Can accept: Object, Array of Objects, NothingEnum enumerator or SelectAll enumerator.
existingSelectionSelectionOptions:
SelectionOptions.ADD_TO
SelectionOptions.REMOVE_FROM
SelectionOptions.REPLACE_WITH
SelectionOptions.SET_KEY
The selection status of the LayoutWindow in relation to previously selected objects. (Optional) (default: SelectionOptions.REPLACE_WITH)

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

string toSpecifier ()
Retrieves the object specifier.

void zoom (given: ZoomOptions)
Magnifies or reduces the window to the specified display size.

ParameterTypeDescription
givenZoomOptions:
ZoomOptions.ZOOM_IN
ZoomOptions.ZOOM_OUT
ZoomOptions.FIT_SPREAD
ZoomOptions.FIT_PAGE
ZoomOptions.SHOW_PASTEBOARD
ZoomOptions.ACTUAL_SIZE
The display size.

Element of

Application.activeWindow

Used in:

LayoutWindow LayoutWindows.nextItem (obj: LayoutWindow)

LayoutWindow LayoutWindows.previousItem (obj: LayoutWindow)

Return

Array of LayoutWindow LayoutWindow.getElements ()

LayoutWindow LayoutWindows.[] (index: number)

LayoutWindow LayoutWindows.anyItem ()

Array of LayoutWindow LayoutWindows.everyItem ()

LayoutWindow LayoutWindows.firstItem ()

LayoutWindow LayoutWindows.item (index: varies)

LayoutWindow LayoutWindows.itemByName (name: string)

Array of LayoutWindow LayoutWindows.itemByRange (from: varies, to: varies)

LayoutWindow LayoutWindows.lastItem ()

LayoutWindow LayoutWindows.middleItem ()

LayoutWindow LayoutWindows.nextItem (obj: LayoutWindow)

LayoutWindow LayoutWindows.previousItem (obj: LayoutWindow)

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