Adobe InCopy CS5 (7.0) Object Model JS: Window

InCopy CS5

Class

Window

 A window.

QuickLinks

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

Hierarchy

Document
Window
Event | EventListener | MutationEvent

Properties

PropertyTypeAccessDescription
activePagePage r/wThe front-most page.
activeSpreadMasterSpreadSpread r/wThe front-most spread. Can return: Spread or MasterSpread.
bounds Array 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 Window within its containing object.
isValidbool readonlyReturns true if the object specifier resolves to valid objects.
namestring readonlyThe name of the Window.
parentDocument readonlyThe parent of the Window (a Document).
propertiesObject r/wA property that allows setting of several properties at the same time.
screenModeScreenModeOptions:
ScreenModeOptions.PREVIEW_OFF
ScreenModeOptions.PREVIEW_TO_PAGE
r/wThe screen mode for layout view.
selection Array of Object r/wThe selected object(s). Can also accept: Object or NothingEnum enumerator.
viewTabViewTabs:
ViewTabs.LAYOUT_VIEW
ViewTabs.GALLEY_VIEW
ViewTabs.STORY_VIEW
r/wThe view in which to display the document.
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 Window 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 Window. This event bubbles. This event is not cancelable. (default: afterAttributeChanged)
AFTER_CLOSEstring readonlyDispatched when a Window 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 Window 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 Window is closed. This event bubbles. This event is cancelable. (default: beforeClose)
BEFORE_DEACTIVATEstring readonlyDispatched before the Window 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 Window.

Array of Window 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
selectableItems Array 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
The selection status of the Window in relation to previously selected objects. (Optional) (default: SelectionOptions.REPLACE_WITH)

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

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:

Window Windows.nextItem (obj: Window)

Window Windows.previousItem (obj: Window)

Return

Array of Window Window.getElements ()

Window Windows.[] (index: number)

Window Windows.add ([withProperties: Object])

Window Windows.anyItem ()

Array of Window Windows.everyItem ()

Window Windows.firstItem ()

Window Windows.item (index: varies)

Window Windows.itemByName (name: string)

Array of Window Windows.itemByRange (from: varies, to: varies)

Window Windows.lastItem ()

Window Windows.middleItem ()

Window Windows.nextItem (obj: Window)

Window Windows.previousItem (obj: Window)

Jongware, 23-Mar-2011 v3.0.3dContents :: Index