InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IFrameUtils.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Bernd Paradies
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __IFrameUtils__
25 #define __IFrameUtils__
26 
27 #include "TextID.h"
28 #include "IPMUnknown.h"
29 #include "Utils.h"
30 #include "UIDRef.h"
31 #include "PMTypes.h"
32 
33 class IGraphicsContext;
34 class IHandleShape;
35 class ILayoutControlData;
37 class ITextFrameColumn;
38 class ITextModel;
39 class UIDList;
40 class PMRect;
41 class PMMatrix;
42 class GraphicsData;
43 
44 const PMReal kThreadHandleSize = 8.0;
45 
46 
47 
53 class IFrameUtils : public IPMUnknown
54 {
55 public:
56  enum { kDefaultIID = IID_IFRAMEUTILS };
57 
58 
59  enum { kTF_InLink = 1, kTF_OutLink = 2, kTF_Overset = 4 };
60 
61 
69  virtual bool16 GetFrameThreadBBox(IHandleShape* shape, const PMMatrix& theMatrix, PMRect& bounds) = 0;
70 
71 
77  virtual UID GetTextFrameUID(IPMUnknown* graphicFrame, int32 *textflags = nil) = 0;
78 
84  virtual bool16 IsTextFrame(IPMUnknown* graphicFrame, int32* textflags = nil) = 0;
85 
86 
94  virtual void GetUIDListOfInlines(IMultiColumnTextFrame* frame, bool16 doDropCaps, UIDList* resultList) = 0;
95  virtual void GetUIDListOfInlines(ITextFrameColumn* frame, bool16 doDropCaps, UIDList* resultList) = 0;
96 
106  virtual void GetUIDListOfPlacedPageItem(IMultiColumnTextFrame* frame, bool16 doDropCaps, UIDList* resultList, ClassID itemClassID = kInvalidClass) = 0;
107  virtual void GetUIDListOfPlacedPageItem(ITextFrameColumn* frame, bool16 doDropCaps, UIDList* resultList, ClassID itemClassID = kInvalidClass) = 0;
108 
109 
115  virtual void GetFrameThreadsBBox(GraphicsData *gd, const UIDList& frameLists, PMRect& invalRect) = 0;
116 
121  virtual void DrawSelectedFrameEdges(GraphicsData *gd, const UIDList& frameLists) = 0;
122 
123 
128  virtual void DrawSelectedAnchorThreads(GraphicsData *gd, const UIDList& anchors) = 0;
129 
139  virtual UIDList CheckForAnchorInText(ITextModel *model, TextIndex start, TextIndex end, UIDRef *pOtherFrame = nil, TextIndex *pLocation = nil) = 0;
140 
148  virtual bool16 IsPageItemAnchoredObject(UIDRef pageItem, UIDRef *pOwningFrame = nil, UIDRef *pOwningStory = nil, TextIndex *pAnchorLocation = nil) = 0;
149 
150 };
151 
152 
153 #endif // __IFrameUtils__