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

#include <IFrameUtils.h>

Inheritance diagram for IFrameUtils:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IFRAMEUTILS }
 
enum  { kTF_InLink = 1, kTF_OutLink = 2, kTF_Overset = 4 }
 

Public Member Functions

virtual bool16 GetFrameThreadBBox (IHandleShape *shape, const PMMatrix &theMatrix, PMRect &bounds)=0
 
virtual UID GetTextFrameUID (IPMUnknown *graphicFrame, int32 *textflags=nil)=0
 
virtual bool16 IsTextFrame (IPMUnknown *graphicFrame, int32 *textflags=nil)=0
 
virtual void GetUIDListOfInlines (IMultiColumnTextFrame *frame, bool16 doDropCaps, UIDList *resultList)=0
 
virtual void GetUIDListOfInlines (ITextFrameColumn *frame, bool16 doDropCaps, UIDList *resultList)=0
 
virtual void GetUIDListOfPlacedPageItem (IMultiColumnTextFrame *frame, bool16 doDropCaps, UIDList *resultList, ClassID itemClassID=kInvalidClass)=0
 
virtual void GetUIDListOfPlacedPageItem (ITextFrameColumn *frame, bool16 doDropCaps, UIDList *resultList, ClassID itemClassID=kInvalidClass)=0
 
virtual void GetFrameThreadsBBox (GraphicsData *gd, const UIDList &frameLists, PMRect &invalRect)=0
 
virtual void DrawSelectedFrameEdges (GraphicsData *gd, const UIDList &frameLists)=0
 
virtual void DrawSelectedAnchorThreads (GraphicsData *gd, const UIDList &anchors)=0
 
virtual UIDList CheckForAnchorInText (ITextModel *model, TextIndex start, TextIndex end, UIDRef *pOtherFrame=nil, TextIndex *pLocation=nil)=0
 
virtual bool16 IsPageItemAnchoredObject (UIDRef pageItem, UIDRef *pOwningFrame=nil, UIDRef *pOwningStory=nil, TextIndex *pAnchorLocation=nil)=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 about text frames – mostly drawing text frames. Use: Utils<IFrameUtils>()->GetSelectedFrameLists( ... ) ;

Member Function Documentation

virtual UIDList IFrameUtils::CheckForAnchorInText (ITextModelmodel,
TextIndex start,
TextIndex end,
UIDRefpOtherFrame = nil,
TextIndex * pLocation = nil 
)
pure virtual

Handles 2 cases: 1) if the range contains inline graphics, it will return information about them. If not, this routine will see if the textmodel is actually within an anchored object and return information about the container.

Parameters
modelthe story to check.
startthe index to start looking for inlines at.
endthe final index when looking for inlines.
pOtherFrameis set to a contained textframe, or to the CONTAINING text frame if the model in from an inline.
pLocationis the TextIndex of the end of a contained textframe of the index within the container of the model's inline frame.
Returns
the list of contained inline graphics or the containing text frame.
virtual void IFrameUtils::DrawSelectedAnchorThreads (GraphicsDatagd,
const UIDListanchors 
)
pure virtual

Draw the line from the frame to the anchors.

Parameters
gdis the GraphicsData to use.
anchorsis the list of the anchored objects to draw lines for.
virtual void IFrameUtils::DrawSelectedFrameEdges (GraphicsDatagd,
const UIDListframeLists 
)
pure virtual

Draw the frame edges for the listed frame lists.

Parameters
gdis the GraphicsData to use.
frameListsare the frame lists to draw edges for.
virtual bool16 IFrameUtils::GetFrameThreadBBox (IHandleShapeshape,
const PMMatrixtheMatrix,
PMRectbounds 
)
pure virtual

Given a shape, return the frame threads bounding box in coordinates of the frame and its threads transformed by the provided matrix.

Parameters
shapeIN the frame to get the frame thread bounding box for.
theMatrixIN is the transform to apply.
boundsOUT is the resultant bounding box in the frame coordinates.
Returns
kTrue if the frame threads exist.
virtual void IFrameUtils::GetFrameThreadsBBox (GraphicsDatagd,
const UIDListframeLists,
PMRectinvalRect 
)
pure virtual

Get the frame Threads bounding bos for the list of frames.

Parameters
gdis the GraphicsData to use.
frameListsis the list of frames.
invalRectis the bounding box of the combined frame threads.
virtual UID IFrameUtils::GetTextFrameUID (IPMUnknowngraphicFrame,
int32 * textflags = nil 
)
pure virtual

Get the text frame inside a graphic frame

Parameters
graphicFrameis the pageitem in question.
textflags,ifnon-nil, is SET to reflect the status of the frame (in, out, overset).
Returns
the UID of the text frame.
virtual void IFrameUtils::GetUIDListOfInlines (IMultiColumnTextFrameframe,
bool16 doDropCaps,
UIDListresultList 
)
pure virtual

Returns the list of Inlines (kInlineBoss) that are associated with the TextFrame (inside the frame), including those that are within WaxAnchorPt owned items (such as tables). If the text within the frame isn't composed, the resultList will probably be empty.

Parameters
frameis which text frame to look at.
doDropCapsNOT USED ANYMORE.
resultListthe UIDList containing all of the inlines.
virtual void IFrameUtils::GetUIDListOfPlacedPageItem (IMultiColumnTextFrameframe,
bool16 doDropCaps,
UIDListresultList,
ClassID itemClassID = kInvalidClass 
)
pure virtual

Returns the list of wrapped page items (Inlines/Cell page items) that are associated with the TextFrame (inside the frame) If the text within the frame isn't composed, the resultList will probably be empty.

Parameters
frameis which text frame to look at.
doDropCapsNOT USED ANYMORE.
resultListthe UIDList containing all of the wrapped page items.
itemClassIDIf class Id is provided then it will return list of those items, otherwise all the item which support IPageItemAdapter interface
virtual bool16 IFrameUtils::IsPageItemAnchoredObject (UIDRef pageItem,
UIDRefpOwningFrame = nil,
UIDRefpOwningStory = nil,
TextIndex * pAnchorLocation = nil 
)
pure virtual

Is the pageItem actually an anchored object?

Parameters
pageItemis a UIDRef of the pageitem in question.
pOwningFramewill be the UIDRef of the textFrame that contains the pageItem if the pageItem is anchored.
pOwningStorywill be the UIDRef of the textmodel that contains the pageItem if it is anchored.
pAnchorLocationwill be the TextIndex of the pageItem, if it is anchored.
Returns
kTrue if the pageItem is anchored.
virtual bool16 IFrameUtils::IsTextFrame (IPMUnknowngraphicFrame,
int32 * textflags = nil 
)
pure virtual

Is the item a text frame?

Parameters
graphicFrameis the pageitem in question.
textflags,ifnon-nil, is SET to reflect the status of the frame (in, out, overset).
Returns
kTrue if graphicFrame is a text frame.