InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IWaxAnchorPt.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: dwaterfa
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 __IWaxAnchorPt__
25 #define __IWaxAnchorPt__
26 
27 #include "IPMUnknown.h"
28 #include "TextID.h"
29 #include "CTextEnum.h"
30 #include "IParagraphComposer.h"
31 #include "PMMatrix.h"
32 #include "PMPoint.h"
33 #include "PMRect.h"
34 #include "DrawPassInfo.h"
35 #include "PMTextUtils.h"
36 #include "ParcelKey.h"
37 #include "OwnedItemDataList.h"
38 
39 class ICallback;
40 class IParcel;
41 class GraphicsData;
42 class IComposeScanner;
43 class IWaxLine;
44 
45 
49 class IWaxAnchorPt : public IPMUnknown
50 {
51 public:
52  enum { kDefaultIID = IID_IWAXANCHORPT };
53 
60  };
61 
94  {
95  kWLDT_Other = 0, // other (destroyed, geometry, etc)
96  kWLDT_Keeps = 1, // "keeps" damaged
97  kWLDT_Content = 2 // "content" damaged
98  };
99 
100  virtual bool16 Recompose(const ITextParcelList* tpl,
101  const IParagraphComposer::Tiler* tiler,
102  TextIndex lineStartIndex,
103  TextIndex anchorPtIndex,
104  ParcelKey parcelKey,
105  PMReal yPosition,
106  waxLineDamageType waxLineDamage,
107  bool16 firstWaxLineInParcel,
108  bool16 waxLinePartOfKeepsBlock,
109  ParcelKey* pParcelKey,
110  PMRect* pBBox, // in content (Wax) coord.
111  PMReal* pSpaceAfter,
112  bool16* pHasBreak,
113  int32* pTextSpan,
114  bool16* pDamagePreviousWaxLine,
115  NextAnchorInfo* pNextAnchorInfo,
116  int32* pDamageFollowingNChars,
117  bool16* pDeferredCompositionDueToKeeps,
118  TextIndex noDamageBackTextIndex = -1) = 0;
119 
130  virtual void Move(TextIndex anchorPtIndex,
131  IParcelList* pl,
132  ParcelKey parcelKey,
133  PMReal yPosition,
134  PMReal yPosDelta) = 0;
135 
136 
137  // GetInkBounds() Returned bounds are in Wax coordinates.
138  // GetDrawPassInfo()
139 
144  virtual void GetBBox(PMRect* pBBox) const = 0;
145 
149  virtual int32 GetTextSpan() const = 0;
150 
155  virtual void GetInkBounds(PMRect* inkBounds) const = 0;
156 
161  virtual void GetDrawPassInfo(Text::DrawPassInfoList *passList) const = 0;
162 
170  virtual void IterateWaxAnchorPointDrawOrder(const PMMatrix* xform,
171  ICallback* callbackInfo,
172  int32 iShapeFlags) = 0;
173 
184  virtual void Draw(GraphicsData* gd, int32 iShapeFlags,
185  Text::DrawPassInfo::Pass pass,
186  const PMReal& xOffset, const PMReal& yOffset,
187  const PMRect* areaToDraw) = 0;
188 
195  virtual bool16 GetIsParcelPositionDependent() const = 0;
196 
207  virtual void MarkKeepsDamageFromText() = 0;
208 
214  virtual bool16 MarkExtendedDamageFromTextKeeps(bool16 paraHasKeepAllLines) = 0;
215 
224  virtual PMReal HitTest(const PMPoint& waxPt,
225  TextIndex* nextLine) const = 0;
226 
236  virtual void CollectOwnedItems(OwnedItemDataList* rList) const = 0;
237 
248  virtual PMReal GetTopKeepsContentBottom(const IWaxLine* waxLine) const = 0;
249 
264  virtual bool16 NotifyComposedPartOfKeepsBlock(IWaxLine* waxLine) = 0;
265 
275  virtual bool16 MarkCompositionDamage(IWaxLine* waxLine,
276  PMReal topYIntersect) = 0;
277 
284  virtual bool16 GetIsDivisible() const = 0;
285 
300  virtual bool16 GetIsOnlyOrFirstOfASet(bool16* pHasTopBreak) const = 0;
301 
320  virtual bool16 GetTextKeepsViolation(bool16 paraHasKeepAllLines) const = 0;
321 
358  virtual TextIndex BackupToStartOfKeepsFromTop(bool16 paraHasKeepAllLines,
359  bool16& topOfKeepsBlockNotTopOfWAPSet,
360  bool16& keepsBlockAtTopOfContainingWAP,
361  bool16& keepsBlockHasTopBreak,
362  bool16& keepsBlockDamaged) const = 0;
363 
385  virtual TextIndex BackupToStartOfKeepsFromBottom(bool16 paraHasKeepAllLines,
386  bool16& topOfKeepsBlockNotTopOfWAPSet,
387  bool16& keepsBlockAtTopOfContainingWAP,
388  bool16& keepsBlockHasTopBreak,
389  bool16& keepsBlockDamaged) const = 0;
390 
396  virtual bool16 GetIsCompositionExtending() const = 0;
397 
406  virtual void MarkParcelMoveDamage() = 0;
407 
416  virtual void MarkPreviousParcelMoveDamage() = 0;
417 
424  virtual void MarkParcelGridDamage() = 0;
425 
432  virtual void MarkPreviousParcelGridDamage() = 0;
433 };
434 
435 #endif