InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IPageItemUtils Class Referenceabstract

#include <IPageItemUtils.h>

Inheritance diagram for IPageItemUtils:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IPAGEITEMUTILS }
 
enum  InvalidateCacheType { kInvalidateAll, kInvalidateGuides, kInvalidateNonGuides }
 

Public Member Functions

virtual void InvalidatePageItemCache (IDocument *doc, InvalidateCacheType type=kInvalidateAll) const =0
 
virtual void InvalidatePageItemCacheForSpread (ISpread *spread, InvalidateCacheType type=kInvalidateAll) const =0
 
virtual void NotifyDocumentObservers (IDataBase *iDataBase, ClassID theChange, const PMIID &interestedIn, void *changedBy, LazyNotificationData *data=nil) const =0
 
virtual void NotifyDocumentObservers (ISubject *originalSubject, IDataBase *iDataBase, ClassID theChange, const PMIID &interestedIn, void *changedBy, LazyNotificationData *data=nil) const =0
 
virtual void GetTextFrameHandlePositions (IHandleShape *shape, PMPoint *point1, PMPoint *point2) const =0
 
virtual void SortDisplayList (UIDList *items)=0
 
virtual IHierarchyQueryInlineParentPageItem (IHierarchy *itemHierarchy) const =0
 
virtual UID GetFirstPageItemUID (IDataBase *db, UID pageItemUID) const =0
 
virtual UIDListStripIfParentIsLocked (UIDList *items)=0
 
virtual IHierarchyQueryPlacedItemParentPageItem (IHierarchy *itemHierarchy) const =0
 
virtual IHierarchyQueryInlineImmediateParentPageItem (IHierarchy *itemHierarchy) const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

Utilities for page items. Please use the IPageItemUtils directly via the Utils boss if possible:

 Utils<IPageItemUtils>()->GetPathInfo( ... ) ;
See Also
Utils.h

Member Enumeration Documentation

Types of cache invalidation.
Enumerator
kInvalidateAll 

The entire cache

kInvalidateGuides 

Guides only

kInvalidateNonGuides 

Everything but guides

Member Function Documentation

virtual UID IPageItemUtils::GetFirstPageItemUID (IDataBasedb,
UID pageItemUID 
) const
pure virtual

Get the first page item UID associated with the passed in item. For non-text items it just returns the given UID. For text items it returns the UID of the first frame that contains the text.

Parameters
IDataBase*db: The document containing the page item and data link.
UIDpageitem: The page item of the associated data link.
Returns
UID: Return kInvalidUID on failure.
virtual void IPageItemUtils::GetTextFrameHandlePositions (IHandleShapeshape,
PMPointpoint1,
PMPointpoint2 
) const
pure virtual

Calculate the in-port and out-port positions for the textframe

Parameters
shape[IN] an IHandleShape pointer for the textframe page item
point1[IN/OUT] pointer to the location of the in-port for the textframe
point2[IN/OUT] pointer to the location of the out-port for the textframe
virtual void IPageItemUtils::InvalidatePageItemCache (IDocumentdoc,
InvalidateCacheType type = kInvalidateAll 
) const
pure virtual

Invalidates the entire page item bounds cache for a document.

Parameters
doc[IN]The document whose cache to invalidate.
type[IN] What to invalidate.
virtual void IPageItemUtils::InvalidatePageItemCacheForSpread (ISpreadspread,
InvalidateCacheType type = kInvalidateAll 
) const
pure virtual

Invalidates the page item bounds cache for one spread.

Parameters
spread[IN] The spread whose cache to invalidate.
type[IN] What to invalidate.
virtual void IPageItemUtils::NotifyDocumentObservers (IDataBaseiDataBase,
ClassID theChange,
const PMIIDinterestedIn,
void * changedBy,
LazyNotificationDatadata = nil 
) const
pure virtual

Notify observers attached to the document's ISubject that the document has been changed.

Parameters
theChangeis the actual change, often times the classID of a command.
interestedInspecifies the interface of the object that was modified.
changedByis a generic pointer to the object that caused the change.
datais a cookie passed to observers, data could be nil. This is usually a pointer to a command object
virtual void IPageItemUtils::NotifyDocumentObservers (ISubjectoriginalSubject,
IDataBaseiDataBase,
ClassID theChange,
const PMIIDinterestedIn,
void * changedBy,
LazyNotificationDatadata = nil 
) const
pure virtual

Notify observers attached to the document's ISubject that the document has been changed. The difference between this method and the other NotifyDocumentObservers method is that the original Subject is passed along to the observers as the object that was changed, not the object this subject is part of.

Parameters
originalSubjectis the original subject of the object that was changed
theChangeis the actual change, often times the classID of a command.
interestedInspecifies the interface of the object that was modified.
changedByis a generic pointer to the object that caused the change.
datais a cookie passed to observers, data could be nil. This is usually a pointer to a command object
See Also
ISubject
virtual IHierarchy* IPageItemUtils::QueryInlineImmediateParentPageItem (IHierarchyitemHierarchy) const
pure virtual

Finds the immediate text frame pageitem parent of an inline (handles nested inlines).

Parameters
itemHierarchy[IN] the IHierarchy interface for an inline item.
Returns
An IHierarchy interface for the text frame which is the immediate ancestor of the inline, or nil if itemHierarchy is not an inline (or if inline is overset). The reference count is incremented; caller is responsible for calling Release().
virtual IHierarchy* IPageItemUtils::QueryInlineParentPageItem (IHierarchyitemHierarchy) const
pure virtual

Finds the top-level pageitem parent of an inline (handles nested inlines).

Parameters
itemHierarchy[IN] the IHierarchy interface for an inline item.
Returns
An IHierarchy interface for the pageitem which is the highest ancestor of the inline, or nil if itemHierarchy is not an inline (or if inline is overset). The reference count is incremented; caller is responsible for calling Release().
virtual IHierarchy* IPageItemUtils::QueryPlacedItemParentPageItem (IHierarchyitemHierarchy) const
pure virtual

Finds the top-level pageitem parent of an placed item (which either is inline or image inside table cell).

Parameters
itemHierarchy[IN] the IHierarchy interface for an placed item.
Returns
An IHierarchy interface for the pageitem which is the highest ancestor of the placed item, or nil if itemHierarchy is not an placed item. The reference count is incremented; caller is responsible for calling Release().
virtual void IPageItemUtils::SortDisplayList (UIDListitems)
pure virtual

Sort a list of page items in drawing order. Assumes that all items in the list share the same ultimate root, but may have different parents.

Parameters
items[IN/OUT] A pointer to a UIDList of the items.
virtual UIDList* IPageItemUtils::StripIfParentIsLocked (UIDListitems)
pure virtual

Strips items from the list if their parent is locked. Does not strip if item is outermost item and is locked.

Parameters
items[IN/OUT] a UIDList of the pageitems
Returns
a pointer the UIDList of the pageitems.