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

Public Types | |
| enum | { kDefaultIID = IID_IPREFLIGHTOBJECTMODEL } |
The preflight object model interface is the application-wide access point for mapping objects in the preflight model. The preflight model follows the InDesign document model in many places but not all – for example objects like marking operations don't exist in the InDesign model but rules can still check them and operate on them. The preflight object model is an attempt to abstract the differences via the interface mechanism.
This interface is really the high-level access point to the model. The model is based on services (see IPreflightObjectModelService) but normally you ask questions at this level, not an individual service level.
A typical use of IPreflightObjectModel is to get an IPreflightObject from a PreflightObjectID, for example:
InterfacePtr<IPreflightObjectModel> iModel(Utils<IPreflightUtils>()->QueryObjectModel()); InterfacePtr<IPreflightObject> iObj(iModel->QueryObject(myObjID));
Other uses are related to user interaction. For example, GetObjectDescription(), CanBeSelected(), SelectObject(), GetPage(), and so on, are all useful for presenting results or other info to the user.
| pure virtual |
Asks whether a given object can be selected.
| objID | IN The object you're interested in. |
| pure virtual |
Given a parent object, expand the children. This delegates to the object model services.
| helper | IN The utility interface that provides expansion services. |
| pure virtual |
Returns a vector of all registered object class IDs.
| pure virtual |
Given an object class encoded as a string from the scripting world, get the object class ID. Returns kInvalidClass if there is no mapping for that string.
| classID | IN The class you want to get the string for. |
| pure virtual |
Given an object class, get the string representing that class in the scripting world. Returns an empty string if the class does not exist in the object model lookup tables (ie no service offers mapping for it).
| classID | IN The class you want to get the string for. |
| pure virtual |
Given a given 'child' class, return all the classes that are hierarchy ancestors of that class. An expansion parent is a class that when expanded may produce the child. An expansion ancestor is an expansion parent recursively.
Typically this is used to determine which classes to expand when building search trees. For example, if you want to get to objects of class X, the only nodes you want to expand are those which are ancestors of X.
| childClass | IN The class you want to get ancestors for (not including the child). |
| ancestorClasses | OUT The vector of ancestors. The ancestors are unioned with the incoming list state. |
| pure virtual |
Given a vector of child classes, produce a vector of expansion ancestor classes. Note: the results are added to, not cleared first.
| childClasses | IN The classes you want to get ancestors for. |
| ancestorClasses | OUT The vector of ancestors. The ancestors are unioned with the incoming list state. |
| pure virtual |
Given a given 'child' class, return all the classes that are hierarchy ancestors of that class. A hierarchy parent is a class that when expanded may produce the child. A hierarchy ancestor is a hierarchy parent recursively.
Typically this is used to determine which classes to expand when building search trees. For example, if you want to get to objects of class X, the only nodes you want to expand are those which are ancestors of X.
| childClass | IN The class you want to get ancestors for (not including the child). |
| ancestorClasses | OUT The vector of ancestors. The ancestors are unioned with the incoming list state. |
| pure virtual |
Given a vector of child classes, produce a vector of hierarchy ancestor classes. Note: the results are added to, not cleared first.
| childClasses | IN The classes you want to get ancestors for. |
| ancestorClasses | OUT The vector of ancestors. The ancestors are unioned with the incoming list state. |
| pure virtual |
Provides a description of the object.
| objID | IN The object you want a description of. |
| pure virtual |
Provide a sorting string for the object. This should be a string that can be used to determine the order of results so they're consistently presented in the UI and reports.
| objID | IN The object to provide a sort-string for. |
| pure virtual |
Get the page (or pages) on which the object appears.
| objID | IN The object to provide a description for. |
Given a subpart ID, obtain a UI-friendly name for the subpart. For example, the subpart name
for kPreflightOSP_NativeFill is "fill".
| subpartID | IN The ID of the subpart. |
| pure virtual |
Indicates whether the given object may still be valid. This is primarily used by debug code to verify that the database is still in good shape. A return value of true is not necessarily a true positive; it simply means there's no particular reason to believe it's bad.
| The | object ID to validate. |
| pure virtual |
Called by the preflight manager; you shouldn't call this.
| pure virtual |
Notification that the given object is being invalidated. Note that this is not a comprehensive indicator that a given object is no longer valid; it's only called to let services know that an invalidation took place, in case they want to monitor patterns.
| The | object ID being invalidated. |
| pure virtual |
Returns whether there is a parent child relationship between the specified classes.
| parentClass | IN The class ID of the parent. |
| parentClass | IN The class ID of the child. |
| pure virtual |
Given a preflight object (simple reference), obtain a pointer to an interface you can get concrete implementations from via QueryInterface, or pass on to functions that need it. Note that the returned interface is very short lived; any invalidation of the document can cause it to be out of date. DO NOT store this interface away as a member variable unless it will exist only over an atomic operation that does not modify the document.
| objID | IN The object you want to map to an interface. |
| pure virtual |
Select the object.
| objID | IN The object to provide a description for. |
| pure virtual |
Called by the preflight manager; you shouldn't call this.
| pure virtual |
Called by the preflight manager; you shouldn't call this.