InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IAnchoredObjectData.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Eric Menninga
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 __IANCHOREDOBJECTDATA__
25 #define __IANCHOREDOBJECTDATA__
26 
27 #include "IPMUnknown.h"
28 #include "TextID.h"
29 
30 
31 class IParcel;
32 class PMMatrix;
33 class IWaxLine;
34 
43 {
44 public:
45  enum { kDefaultIID = IID_IANCHOREDOBJECTDATA };
46 
48  typedef enum { kStandardInline, kAnchoredObject, kAboveLine /* kBelowLine not supported yet */ } AnchoredPosition;
50  typedef enum { kRightSide, kCenter, kLeftSide, kTextAlignment } AnchoredHorizontal;
52  typedef enum { kObjectTop, kObjectCenter, kObjectBottom } AnchoredVertical;
54  typedef enum { kColumnRelativeV, kFrameRelativeV, kMarginRelativeV, kPageRelativeV,
55  // line relative positions MUST be after then others. Doing "v >= kLineBaseline" in places
56  kLineBaseline, kLineXHeight, kLineCapheight, kLineAscent, kLineLeading,
57  kEmBoxTop, kEmBoxMiddle, kEmBoxBottom } VerticalAnchorPointObject;
59  typedef enum { kColumnRelativeH, kFrameRelativeH, kMarginRelativeH, kPageRelativeH, kAnchorRelativeH } HorizontalAnchorPointObject;
60 
62  enum { kCmdSelector_Position = 0x0100,
63  kCmdSelector_AnchorTypeH = 0x0200, kCmdSelector_ObjectH = 0x0400, kCmdSelector_RelativeH = 0x0800,
64  kCmdSelector_AnchorTypeV = 0x01000, kCmdSelector_ObjectV = 0x02000, kCmdSelector_RelativeV = 0x04000,
65  kCmdSelector_XOffset = 0x08000, kCmdSelector_YOffset = 0x010000, kCmdSelector_SpineRelative = 0x020000,
66  kCmdSelector_YOffsetAbove = 0x040000, kCmdSelector_PinPosition = 0x080000, kCmdSelector_LockPosition = 0x0100000 };
67 
71  virtual void SetPosition(IAnchoredObjectData::AnchoredPosition position) = 0;
76 
80  virtual void SetSpineRelative(bool16 spineRelative) = 0;
84  virtual bool16 GetSpineRelative() const = 0;
85 
94 
103 
112 
121 
130 
139 
146  virtual void SetXOffset(PMReal xoffset) = 0;
150  virtual void SetYOffset(PMReal yoffset) = 0;
151 
155  virtual PMPoint GetOffset() const = 0;
156 
161  virtual void SetYOffsetAbove(PMReal yoffset) = 0;
166  virtual PMReal GetYOffsetAbove() const = 0;
167 
171  virtual void SetPinPosition(bool16 pinPos) = 0;
175  virtual bool16 GetPinPosition() const = 0;
176 
181  virtual void SetLockPosition(bool16 lockPos) = 0;
186  virtual bool16 GetLockPosition() const = 0;
187 
195  virtual bool16 CalculateWaxLineImpact(PMReal lineHeight,
196  PMReal& width,
197  PMReal& height,
198  PMReal& leftStrokeOffset) const = 0;
199 
206  virtual bool16 RegisterInlineAt(const IWaxLine *waxLine, const IParcel *pParcel, PMMatrix &waxToILGMatrix) const = 0;
207 
212  virtual bool16 AdjustInkBounds(PMRect& bounds) const = 0;
213 
218  virtual bool16 AdjustLineBounds(PMLineSeg& line) const = 0;
219 
224  virtual bool16 SpineRelativePositionFlipped() const = 0;
225 
229  virtual void CopyData(IAnchoredObjectData *pCopyTo ) const = 0;
230 
234  virtual bool16 NeedsRecalculation() const = 0;
235 
238  virtual void ForceRecalculation() = 0;
239 
243  virtual void CobaltFixupInlines() = 0;
244 
245 };
246 
247 #endif
248  // __IANCHOREDOBJECTDATA__
249