LayoutSnippet

An IDML snippet.

Static Properties

Name Description
BEFORE_PLACE = "beforePlace" string Dispatched before a Snippet is placed. This event bubbles. This event is cancelable.

Instance Properties

Name Description Access
buttons Buttons A collection of buttons. read-only
checkBoxes CheckBoxes A collection of checkboxes. read-only
comboBoxes ComboBoxes A collection of comboboxes. read-only
epss EPSs A collection of EPS files. read-only
epstexts EPSTexts EPSTexts read-only
eventListeners EventListeners A collection of event listeners. read-only
events Events A collection of events. read-only
formFields FormFields A collection of form fields. read-only
graphicLines GraphicLines A collection of graphic lines. read-only
graphics Graphics A collection of imported graphics in any graphic file format (vector, metafile, or bitmap). read-only
groups Groups A collection of groups. read-only
id number The unique ID of the Snippet. read-only
images Images A collection of bitmap images in any bitmap file format (including TIFF, JPEG, or GIF). read-only
index number The index of the Snippet within its containing object. read-only
isValid bool Returns true if the object specifier resolves to valid objects. read-only
label string A property that can be set to any string. read-write
listBoxes ListBoxes A collection of listboxes. read-only
multiStateObjects MultiStateObjects A collection of multi-state objects. read-only
name string The name of the Snippet; this is an alias to the Snippet's label property. read-write
ovals Ovals A collection of ellipses. read-only
pageItems PageItems The page items collection, which can be used to process all page items in a container (such as a document, page, or group), regardless of type. read-only
parent PlaceGun The parent of the Snippet (a PlaceGun). read-only
pdfs PDFs A collection of PDF files. read-only
picts PICTs A collection of PICT graphics. read-only
polygons Polygons A collection of polygons. read-only
properties Object A property that allows setting of several properties at the same time. read-write
radioButtons RadioButtons A collection of radio buttons. read-only
rectangles Rectangles A collection of rectangles. read-only
signatureFields SignatureFields A collection of signature fields. read-only
splineItems SplineItems The spline items collection. read-only
textBoxes TextBoxes A collection of text boxes. read-only
textFrames TextFrames A collection of text frames. read-only
wmfs WMFs A collection of WMF graphics. read-only

Methods

addEventListener(
eventType, handler ​[, captures])
 → EventListener
extractLabel(
key)
 → string
getElements(
)
 → Snippet
insertLabel(
key, value)
remove(
)
removeEventListener(
eventType, handler ​[, captures])
 → bool
toSource(
)
 → string
toSpecifier(
)
 → string
addEventListener(
eventType, handler ​[, captures=false])
 → EventListener
Adds an event listener.
eventType string The event type.
handler The event handler. Can accept: File or JavaScript Function.
captures bool This parameter is obsolete. (Optional)
extractLabel(
key)
 → string
Gets the label value associated with the specified key.
key string The key.
getElements(
)
 → Snippet
Resolves the object specifier, creating an array of object references.
insertLabel(
key, value)
Sets the label to the value associated with the specified key.
key string The key.
value string The value.
remove(
)
Deletes the Snippet.
removeEventListener(
eventType, handler ​[, captures=false])
 → bool
Removes the event listener.
eventType string The registered event type.
handler The registered event handler. Can accept: File or JavaScript Function.
captures bool This parameter is obsolete. (Optional)
toSource(
)
 → string
Generates a string which, if executed, will return the Snippet.
toSpecifier(
)
 → string
Retrieves the object specifier.