InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ITextTiler.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: bparadie, ekenning, zwilliam
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 __ITextTiler__
25 #define __ITextTiler__
26 
27 #include "IPMUnknown.h"
28 
29 #include "CTextEnum.h"
30 #include "PMRect.h"
31 #include "ParcelKey.h"
32 #include "TextID.h"
33 #include "TextWrapRef.h"
34 
35 
39 class ITextTiler : public IPMUnknown
40 {
41  public:
42  enum { kDefaultIID = IID_ITEXTTILER };
43 
48  virtual bool16 GetIsAnArea() const = 0;
49 
54  virtual bool16 GetAppearsMultiplePlaces() const = 0;
55 
58  virtual PMMatrix GetToContentMatrix() const = 0;
59 
65  virtual PMRect GetContentBounds() const = 0;
66 
69  class Tiler
70  {
71  protected:
73  Tiler();
74 
75  private:
77  Tiler(const Tiler&);
79  Tiler& operator=(const Tiler&);
80 
81  public:
82  virtual ~Tiler();
83 
90  virtual PMRect GetNetContentAreaBounds() const = 0;
91 
97  virtual bool16 GetIsNetContentAreaASingleRectangle() const = 0;
98 
104  virtual bool16 GetTilesAt(PMReal yPosition,
105  PMReal minWidth,
106  PMReal height,
107  Text::GridAlignmentMetric alignmentMetric,
108  PMReal alignmentMetricOffset,
109  PMReal heightLeadingDiff,
110  PMRectCollection& tiles,
111  bool16 *pParcelPositionDependent,
112  PMReal *pLeftMargin,
113  PMReal *pRightMargin) const = 0;
114 
118  virtual bool16 GetMarginsAt(PMReal yPosition,
119  PMReal& leftMargin,
120  PMReal& rightMargin) const = 0;
121 
122 #ifdef NOT_YET
123 
128  virtual bool16 GetSliceAt(PMReal yPosition,
129  PMReal height,
130  PMRectCollection& tiles,
131  PMReal& leftMargin,
132  PMReal& rightMargin) const = 0;
133 
134 #endif
135 
139  virtual void ClearLocalWraps() = 0;
140 
146  virtual void AddLocalWrap(const TextWrapRef& wrapRef) = 0;
147 
148  };
149 
168  virtual Tiler* NewTiler(bool16 includeExternalInlineWraps = kTrue,
169  bool16 includeInternalInlineWrap = kFalse) const = 0;
170 
171 #ifdef ID_DEPRECATED // ParagraphComposer, Galley, GalleyInfo
172 
177  virtual PMRect GetNetContentAreaBounds() const;
178 
185  virtual bool16 GetIsNetContentAreaASingleRectangle() const;
186 
193  virtual bool16 GetLocalTiles(PMReal yPosition,
194  PMReal minWidth,
195  PMReal height,
196  Text::GridAlignmentMetric alignmentMetric,
197  PMReal alignmentMetricOffset,
198  PMReal heightLeadingDiff,
199  TextIndex nCurrentPosition,
200  PMRectCollection& tiles,
201  bool16 *pParcelPositionDependent,
202  PMReal *pLeftMargin,
203  PMReal *pRightMargin) const;
204 #endif
205 
206 };
207 
208 #endif