Snippet
An IDML snippet.
Go to Property Listing | Method Listing
Methods:
addEventListener, extractLabel, getElements, insertLabel, remove, removeEventListener, toSource, toSpecifier
Objects:
Boolean, Buttons, CheckBoxes, ComboBoxes, EPSTexts, EPSs, EventListeners, Events, FormFields, GraphicLines, Graphics, Groups, Images, ListBoxes, MultiStateObjects, Number, Object, Ovals, PDFs, PICTs, PageItems, Polygons, RadioButtons, Rectangles, SVGs, SignatureFields, SplineItems, String, TextBoxes, TextFrames, WMFs
Property Listing
Property |
Type |
Access |
Description |
---|---|---|---|
readonly |
A collection of buttons. |
||
readonly |
A collection of checkboxes. |
||
readonly |
A collection of comboboxes. |
||
readonly |
A collection of EPS files. |
||
readonly |
EPSTexts |
||
readonly |
A collection of event listeners. |
||
readonly |
A collection of events. |
||
readonly |
A collection of form fields. |
||
readonly |
A collection of graphic lines. |
||
readonly |
A collection of imported graphics in any graphic file format (vector, metafile, or bitmap). |
||
readonly |
A collection of groups. |
||
readonly |
The unique ID of the Snippet. |
||
readonly |
A collection of bitmap images in any bitmap file format (including TIFF, JPEG, or GIF). |
||
readonly |
The index of the Snippet within its containing object. |
||
readonly |
Returns true if the object specifier resolves to valid objects. |
||
read/write |
A property that can be set to any string. |
||
readonly |
A collection of listboxes. |
||
readonly |
A collection of multi-state objects. |
||
read/write |
The name of the Snippet; this is an alias to the Snippet's label property. |
||
readonly |
A collection of ellipses. |
||
readonly |
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. |
||
readonly |
The parent of the Snippet (a PlaceGun). |
||
readonly |
A collection of PDF files. |
||
readonly |
A collection of PICT graphics. |
||
readonly |
A collection of polygons. |
||
read/write |
A property that allows setting of several properties at the same time. |
||
readonly |
A collection of radio buttons. |
||
readonly |
A collection of rectangles. |
||
readonly |
A collection of signature fields. |
||
readonly |
The spline items collection. |
||
readonly |
A collection of SVG files. |
||
readonly |
A collection of text boxes. |
||
readonly |
A collection of text frames. |
||
readonly |
A collection of WMF graphics. |
Constants/Events
Name |
Type |
Access |
Description |
---|---|---|---|
readonly |
Dispatched before a Snippet is placed. This event bubbles. This event is cancelable. |
Method Listing
EventListener addEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])
Adds an event listener.
Parameter |
Type |
Description |
---|---|---|
eventType |
The event type. |
|
handler |
JavaScriptFunction |
The event handler. Can accept: File or JavaScript Function. |
captures |
This parameter is obsolete. (Optional) (default: false) |
String extractLabel (key:String)
Gets the label value associated with the specified key.
Parameter |
Type |
Description |
---|---|---|
key |
The key. |
Snippet 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.
undefined remove ()
Deletes the Snippet.
Boolean removeEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])
Removes the event listener.
Parameter |
Type |
Description |
---|---|---|
eventType |
The registered event type. |
|
handler |
JavaScriptFunction |
The registered event handler. Can accept: File or JavaScript Function. |
captures |
This parameter is obsolete. (Optional) (default: false) |
String toSource ()
Generates a string which, if executed, will return the Snippet.
String toSpecifier ()
Retrieves the object specifier.
Object of
Button.parent
CheckBox.parent
ComboBox.parent
EPS.parent
EPSText.parent
Event.parent
EventListener.parent
FormField.parent
Graphic.parent
GraphicLine.parent
Group.parent
Image.parent
ListBox.parent
MultiStateObject.parent
MutationEvent.parent
Oval.parent
PDF.parent
PICT.parent
PageItem.parent
Polygon.parent
RadioButton.parent
Rectangle.parent
SVG.parent
SignatureField.parent
SplineItem.parent
TextBox.parent
TextFrame.parent
WMF.parent