InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IAdornmentHandleShape.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: jargast
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 handle shape interface for page item adornments. This interface can
25 // return trackers just like a normal handle shape. Keep in mind, however, that
26 // it is the page item which is in the selection, not the adornment.
27 //
28 //========================================================================================
29 
30 #ifndef __IAdornmentHandleShape__
31 #define __IAdornmentHandleShape__
32 
33 #include "IPMUnknown.h"
34 #include "GraphicsData.h"
35 #include "IHandleShape.h"
36 
37 class ITip;
38 
40 {
41 //XFIssue this api called only in:
42 // source/public/pageitems/basicinterfaces/CHandleShape.cpp
43 // source/components/pageitems/generic/PageItemAdornmentList.cpp
44 // as of May 2006
45 public:
46 
48  {
49  // These values represent when the adornment is to be drawn.
50  // Upon calling AddAdornment, the adornment is inserted into
51  // the list based when it is to be drawn. If more the one of
52  // the flags are & together, the adornment is put on the list
53  // in all specified locations.
60  };
61 
62  enum AdornmentDrawNumber
63  {
64  kNumberOfAdornments = 2
65  };
66 
67  enum AdornmentDrawMode
68  {
69  // These values represent when the adornment is to be drawn.
70 
71  kNonTouchDrawMode = 0, // draw in non touch mode
72  kTouchDrawMode, // draw only in touch mode
73  kBothDrawMode // draw in both modes
74  };
75 
82 
92  virtual void DrawAdornmentHandleShape
93  (
94  IHandleShape* iHandleShape, // The owning page item
95  AdornmentDrawOrder adornmentDrawOrder, // In case this adornment is used more than once
96  GraphicsData* gd,
97  IConcreteSelection* concreteSelection,
98  int32 flags = 0
99  ) = 0;
100 
109  virtual void DrawControlPointPath
110  (
111  IHandleShape* iHandleShape, // The owning page item
112  AdornmentDrawOrder adornmentDrawOrder, // In case this adornment is used more than once
113  GraphicsData* gd,
114  int32 flags = 0
115  ) = 0;
116 
128  virtual bool16 HitTest
129  (
130  IHandleShape* iHandleShape, // The owning page item
131  AdornmentDrawOrder adornmentDrawOrder, // In case this adornment is used more than once
132  GraphicsData* gd,
133  const PMRect& r,
134  PointSelector* handleIndex,
135  bool16 bDragging = kFalse
136  ) = 0;
137 
147  virtual bool16 HitTestControlPointPath
148  (
149  IHandleShape* iHandleShape, // The owning page item
150  AdornmentDrawOrder adornmentDrawOrder, // In case this adornment is used more than once
151  GraphicsData* gd,
152  const PMRect& r
153  ) = 0;
154 
165  (
166  IHandleShape* iHandleShape, // The owning page item
167  AdornmentDrawOrder adornmentDrawOrder, // In case this adornment is used more than once
168  const PMRect& itemBounds, // This is the painted bounds of the page item
169  const PMMatrix& innertoview // NOTE: this is inner to view, not pb to view
170  ) = 0;
171 
183  virtual ITracker* QueryTracker
184  (
185  IHandleShape* iHandleShape, // The owning page item
186  AdornmentDrawOrder adornmentDrawOrder, // In case this adornment is used more than once
187  IControlView* layView,
188  const PBPMPoint& where,
189  int32 selectionMode,
190  const PointSelector& index
191  ) = 0;
192 
200  virtual ITip* QueryTip
201  (
202  const PointSelector* handleIndex
203  ) = 0;
204 
211  virtual AdornmentDrawMode GetAdornmentDrawMode() = 0;
212 
213 protected:
214 
224  (
225  IHandleShape* iHandleShape, // The owning page item
226  AdornmentDrawOrder adornmentDrawOrder, // In case this adornment is used more than once
227  GraphicsData* gd,
228  IConcreteSelection* concreteSelection,
229  int32 flags = 0
230  ) = 0;
231 };
232 
233 #endif