![]() | InDesign SDK 20.5 |
#include <IPageItemScriptUtils.h>

Public Types | |
| enum | { kDefaultIID = IID_IPAGEITEMSCRIPTUTILS } |
| enum | MatchingPIOption { kParentOnly = 0, kChildrenOnly, kParentAndChildren, kChildrenIfNotParent } |
| typedef ErrorCode(* | CreatePageItemFunc )(IScriptRequestData *data, IScript *script, IPMUnknown *parent, const PMPointList &bounds, UIDRef &pageItem, const Transform::CoordinateSpace &boundsSpace) |
Public Member Functions | |
| virtual ScriptID | GetPageItemType (const IScript *script) const =0 |
| virtual int32 | CountPageItemChildren (IScript *parent, const IScriptRequestData *data) const =0 |
| virtual UID | GetNthPageItemChild (int32 piIndex, IScript *parent, const IScriptRequestData *data) const =0 |
| virtual UIDList | GetEveryPageItemChild (IScript *parent, const IScriptRequestData *data, bool16 allChildren=kFalse) const =0 |
| virtual ErrorCode | GetNthPageItemChild (int32 piIndex, IScript *parent, const IScriptRequestData *data, ScriptList &objectList) const =0 |
| virtual ErrorCode | GetEveryPageItemChild (IScript *parent, const IScriptRequestData *data, ScriptList &objectList, bool16 allChildren=kFalse) const =0 |
| virtual void | GetListOfInlines (ITextModel *model, TextIndex start, TextIndex end, UIDList *itemList, const IScriptRequestData *data, bool16 checkLastCharacter=kTrue, bool16 allChildren=kFalse) const =0 |
| virtual ErrorCode | DoCreatePageItem (IScriptRequestData *data, IScript *script, CreatePageItemFunc callbackFunction) const =0 |
| virtual ErrorCode | PreparePageItemParent (IScriptRequestData *data, IPMUnknown *parent, UIDRef &parentRef) const =0 |
| virtual UID | GetComposedLayerUID (IHierarchy *pageItem, const RequestContext &context, bool16 useLastFrameIfOverset=kFalse) const =0 |
| virtual UID | GetComposedSpreadUID (IHierarchy *pageItem, const RequestContext &context, bool16 useLastFrameIfOverset=kFalse) const =0 |
| virtual ErrorCode | GetReferencePoint (IScript *pageItem, PMPoint *refPoint, IScriptRequestData *data=nil) const =0 |
| virtual ErrorCode | GetSpreadOffsetPoint (IScript *pageItem, const RequestContext &context, PMPoint &offset) const =0 |
| virtual ErrorCode | GetOffsetPoint (IScript *script, IScriptRequestData *data, PMPoint &offset) const =0 |
| virtual ErrorCode | GetMeasurementPoint (ScriptListData &list, IScript *script, IScriptRequestData *data, PMPoint &point) const =0 |
| virtual ErrorCode | GetCoordinates (const ScriptData &scriptData, PMPoint &coordinates, IScript *script, const EngineContext &context) const =0 |
| virtual bool16 | IsEditable (IPMUnknown *pageItem) const =0 |
| virtual int32 | FilterByGraphicAttribute (UIDList &piList, ClassID attr) const =0 |
| virtual IScript * | QueryPageItemParent (const IScript *script, const RequestContext &context) const =0 |
| virtual ErrorCode | GetMatchingPageItems (const RequestContext &context, ScriptList *inPageItems, ScriptList *outPageItems, PMIID iidToLookFor, MatchingPIOption whatToInclude) const =0 |
| virtual ErrorCode | GetDefaultReferencePosition (const UIDList &itemList, IReferencePointData::ReferencePointPosition &refPosition) const =0 |
| virtual ErrorCode | GetDefaultReferenceLocation (const UIDList &itemList, ReferencePointLocation &refLocation) const =0 |
| virtual ErrorCode | AccessItemGeometry (IScriptRequestData *data, IScript *script, bool32 applyToTextWrap)=0 |
| virtual ErrorCode | AccessPathGeometry (ScriptID propID, IScriptRequestData *data, IScript *script, bool32 applyToTextWrap)=0 |
| virtual ErrorCode | AccessBoundingBox (ScriptID propID, IScriptRequestData *data, IScript *script)=0 |
| virtual ErrorCode | AccessGraphicBounds (ScriptID propID, IScriptRequestData *data, IScript *script)=0 |
| virtual ErrorCode | GetItemLayerMatrix (IPMUnknown *item, PMMatrix &m) const =0 |
| virtual ErrorCode | SetItemGeometryMatrix (const PMMatrix &m, DOMAttributeValue &g) const =0 |
| virtual ErrorCode | AccessItemTransform (IScriptRequestData *data, IScript *script, bool32 applyToTextWrap)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
Utilities related to page item scripting.
| pure virtual |
A routine to obtain or set the bounding box data in a page item's IGeometry. This routine can be used for properies whose data type is kRecBoundsTypeDefScriptElement.
| propID | - IN - the ID of the corresponding property. |
| data | - IN/OUT - The event data representing the property. |
| script | - IN - Represents the page item |
| pure virtual |
A routine to obtain or set the graphic bounds in a page item's IGraphicBounds. This routine can be used for properies whose data type is kRecBoundsTypeDefScriptElement.
| propID | - IN - the ID of the corresponding property. |
| data | - IN/OUT - The event data representing the property. |
| script | - IN - Represents the page item |
| pure virtual |
AccessItemGeometry is a routine which was defined in TextWrapScriptProvider and PageItemScriptProvider. It is used to obtain or set the points in a page item's IPathGeometry, the PathBoundingBox in its IGeometry, its IGraphicBounds (if it is a graphic), and its ITransform.
| data | - IN - Contains script data such as arguments for the various geometric commands. |
| script | - IN - Represents the page item |
| applyToTextWrap | - IN - if kTrue, the page items text wrap will be the focus of the operations. Otherwise, the page item represented by 'script' will be the focus. |
| pure virtual |
AccessItemTransform is a routine which was defined in TextWrapScriptProvider and PageItemScriptProvider. It is used to obtain its transform matrix.
| data | - IN - Contains script data such as arguments for the various geometric commands. |
| script | - IN - Represents the page item |
| applyToTextWrap | - IN - if kTrue, the page items text wrap will be the focus of the operations. Otherwise, the page item represented by 'script' will be the focus. |
| pure virtual |
AccessPathGeometry is a routine used by TextWrapScriptProvider and PageItemScriptProvider to obtain or set the path geometry in a page item's IPathGeometry. This routine can be used for properies whose data type is a variable arry of kGeoPathTypeDefScriptElement.
| propID | - IN - the ID of the corresponding property. |
| data | - IN/OUT - The event data representing the property. |
| script | - IN - Represents the page item |
| applyToTextWrap | - IN - if kTrue, the page item's text wrap will be the focus of the operations. Otherwise, the page item represented by 'script' will be the focus. |
| pure virtual |
Count the number of page item children of the type specified by data->GetDesiredType()
| pure virtual |
Similar to GetMeasurementPoint but doesn't add in the spread offset
| pure virtual |
Retrieve every page item child of the type specified by data->GetDesiredType()
| pure virtual |
Retrieve every page item child of the type specified by data->GetDesiredType()
| pure virtual |
GetItemLayerMatrix will return the item's transform matrix transformed to layer coordinates.
| item | - IN - The item. |
| m | - OUT - The processed matrix. |
| pure virtual |
Returns a list of all inline page items of the type specified by data->GetDesiredType()
| pure virtual |
GetMatchingPageItems takes a ScriptList* of one or more page items and returns all the children (1 level deep only) of each page item that support the passed in iid. If includeParents is true, the resutling list will also includes page items in the passed in ScriptList that support the iid.
| pure virtual |
GetMeasurementPoint takes a list, a script data interface and script representing a parent It then extracts the x and y value of the point, coverting the values to points depending on the x and y unit of measure. The point variable gets populated with the proper value, taking into account whatever offset is needed based on the parent.
| pure virtual |
Retrieve the nth page item child of the type specified by data->GetDesiredType()
| pure virtual |
Retrieve the nth page item child of the type specified by data->GetDesiredType()
| pure virtual |
GetOffsetPoint takes a spread/master spread/page/page item/document and returns an offset in spread coordinates. It is used during creation of page items and placing of files and when no explicit location was provided. If you pass in a spread/master spread -> It returns you the zero point of the spread (not accounting for the ruler origin). If you pass in a page -> It returns you the top left corner of the page. If you pass in a page item -> It returns you the top left corner of the page item. If you pass in a document -> It returns you the zero point of the spread (not accounting for the ruler origin) of the first spread.
Determine the type of a page item script object
| pure virtual |
GetSpreadOffsetPoint takes in a page item and will return you the zero point offset taking into account the ruler origin setting of the doc
| pageItem | is the page item |
| context | is the script request context |
| offset | is the offset [out] |
| pure virtual |
Returns kTrue if page item is not locked
| pure virtual |
SetItemGeometryMatrix will replace the PMMatrix data stored in the caller's p_ItemGeometry data.
| m | - IN - The new matrix. |
| g | - OUT - The value of the p_ItemGeometry property. |