InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IAdornmentShape.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Heath Lynn
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 // Purpose:
24 // This is the interface used to add adornments to page items. For an example see...
25 //
26 //========================================================================================
27 
28 #ifndef __IAdornmentShape__
29 #define __IAdornmentShape__
30 
31 #include "IPMUnknown.h"
32 #include "IGraphicsContext.h"
33 #include "IShape.h"
34 
44 {
45 
46 public:
47 
48  enum { kDefaultIID = IID_IADORNMENTSHAPE };
49 
50  enum AdornmentDrawOrder
51  {
52  kNone = 0,
53  kBeforeShape = 1,
54  kAfterFill = 2,
55  kBeforeTextBackground = 4,
56  kBeforeText = 8,
57  kBeforeTextForeground = 16,
58  kAfterTextForeground = 32,
59  kBeforeStroke = 64,
60  kAfterStroke = 128,
61  kAfterShape = 256,
62 
63  kBeforeFill = 512, // Corresponds to kAfterFill
64  kBeforeContent = 1024, // Before content, whatever that content is (text/graphic).
65  kAfterContent = 2048, // After content, whatever that content is (text/graphic).
66 
67  kAfterEndShape = 4096, // After kEndShapeMessage
68 
69  kAfterSpread = 8192,
70 
71  kAllAdornmentFlags = 16383
72  };
73 
74  enum AdornmentDrawNumber
75  {
76  kNumberOfAdornments = 14
77  };
78 
87  virtual AdornmentDrawOrder GetDrawOrderBits() = 0;
88 
95  virtual void DrawAdornment
96  (
97  IShape* iShape, // owning page item
98  AdornmentDrawOrder drawOrder, // for items that registered for more than one order
99  GraphicsData* gd,
100  int32 flags
101  ) = 0;
102 
103 
111  (
112  IShape* iShape,
113  AdornmentDrawOrder drawOrder,
114  const PMRect& itemBounds, // This is the painted bounds of the owing page item
115  const PMMatrix& innertoview // NOTE: this is inner to view not pb to view
116  ) = 0;
117 
125  (
126  IShape* iShape,
127  AdornmentDrawOrder drawOrder,
128  const PMRect& itemBounds, // This is the painted bounds of the owing page item
129  const PMMatrix& innertoview // NOTE: this is inner to view not pb to view
130  ) = 0;
131 
145  virtual void AddToContentInkBounds(IShape* iShape, PMRect* inOutBounds) = 0;
146 
150  virtual PMReal GetPriority() = 0;
151 
167  virtual void Inval
168  (
169  IShape* iShape,
170  AdornmentDrawOrder drawOrder,
171  GraphicsData* gd,
172  ClassID reasonForInval,
173  int32 flags
174  ) = 0;
175 
182  virtual bool16 WillPrint() = 0;
183 
192  virtual bool16 WillDraw
193  (
194  IShape* iShape, // owning page item
195  AdornmentDrawOrder drawOrder, // for items that registered for more than one order
196  GraphicsData* gd,
197  int32 flags
198  ) = 0;
199 
208  virtual bool16 HitTest
209  (
210  IShape* iShape, // The owning page item
211  AdornmentDrawOrder adornmentDrawOrder, // In case this adornment is used more than once
212  IControlView * layoutView,
213  const PMRect& mouseRect
214  ) = 0;
215 
216 
217 };
218 
219 #endif