InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IGlobalTextAdornment.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 __IGlobalTextAdornment__
25 #define __IGlobalTextAdornment__
26 
27 #include "IPMUnknown.h"
28 #include "TextID.h"
29 #include "TextDrawPriority.h"
30 
31 class GraphicsData;
32 class PMRect;
33 class IWaxRun;
34 class IWaxRenderData;
35 class IWaxGlyphs;
36 class IParcelShape;
37 class ITextOptions;
38 
39 
40 
57 {
58 public:
59  enum { kDefaultIID = IID_IGLOBALTEXTADORNMENT };
60 
62  virtual Text::DrawPriority GetDrawPriority() = 0;
63 
65  virtual bool16 GetCheckIsActive() = 0;
66 
84  virtual bool16 GetIsActive(const IParcelShape *parcelShape,
85  const ITextOptions *textOptions,
86  int32 iShapeFlags) = 0;
87 
89  virtual bool16 GetCheckCouldDraw() = 0;
90 
110  virtual bool16 GetCouldDraw(const IWaxRun *waxRun,
111  const IWaxRenderData *waxRenderData,
112  const IWaxGlyphs *waxGlyphs) = 0;
113 
115  virtual bool16 GetHasInkBounds() = 0;
116 
134  virtual void GetInkBounds(PMRect *inkBounds,
135  const IWaxRun *waxRun,
136  const IWaxRenderData *waxRenderData,
137  const IWaxGlyphs *waxGlyphs) = 0;
138 
146  virtual void Draw(GraphicsData *gd, int32 iShapeFlags,
147  const IWaxRun *waxRun,
148  const IWaxRenderData *waxRenderData,
149  const IWaxGlyphs *waxGlyphs) = 0;
150 
155  virtual void StartOfParcelDraw(GraphicsData* gd, int32 iShapeFlags,
156  const IParcelShape *parcelShape) = 0;
157 
162  virtual void EndOfParcelDraw(GraphicsData* gd, int32 iShapeFlags,
163  const IParcelShape *parcelShape) = 0;
164 
165 };
166 
167 
168 //
169 // Draw priorities of some well known Adobe Global adornments.
170 //
171 #define kTAPriHnJKeepsViolations Text::DrawPriority(Text::kTAPassPriBackground + -0.54)
172 #define kTAPriMissingFont Text::DrawPriority(Text::kTAPassPriBackground + -0.52)
173 #define kTAPriMissingGlyphs Text::DrawPriority(Text::kTAPassPriBackground + -0.50)
174 #define kTAPriKinsoku Text::DrawPriority(Text::kTAPassPriBackground + -0.49)
175 #define kTAPriCustomCharWidths Text::DrawPriority(Text::kTAPassPriBackground + -0.49)
176 #define kTAPriNotes Text::DrawPriority(Text::kTAPassPriText + 0.30)
177 #define kTAPriPositionMarker Text::DrawPriority(Text::kTAPassPriText + 0.35)
178 #define kTAPriXMLMarkers Text::DrawPriority(Text::kTAPassPriText + 0.48)
179 #define kTAPriShowInvisibles Text::DrawPriority(Text::kTAPassPriForeground + 0.50)
180 #define kTAPriDynamicSpellCheck Text::DrawPriority(Text::kTAPassPriForeground + 0.52)
181 
182 #endif