InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IDrwEvtHandler.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: David Berggren
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 // If someone wants to process draw events, they must provide an implemenation
25 // of this interface. The Register()/UnRegister will allow them to install/uninstall
26 // themselves into the draw event dispatcher. The HandleEvent() method gets called
27 // when the event they've register for happens. This header file also defines the
28 // event data which is passed to HandleEvent().
29 //
30 //========================================================================================
31 
32 #ifndef __IDrwEvtHandler__
33 #define __IDrwEvtHandler__
34 
35 class IPMUnknown;
36 class IDrwEvtDispatcher;
37 class GraphicsData;
38 class PMRect;
39 class UIDRef;
40 class PMMatrix;
41 class ICallback;
42 class IVisitorHelper;
43 class IBaseVisitor;
44 
54 class IDrwEvtHandler : public IPMUnknown
55 {
56  public:
60  virtual void Register(IDrwEvtDispatcher * eventDispatcher) = 0;
61 
65  virtual void UnRegister(IDrwEvtDispatcher * eventDispatcher) = 0;
66 
74  virtual bool16 HandleDrawEvent(ClassID eventID, void *eventData) = 0;
75 };
76 
81 public:
87  int32 flags;
88 
93  CDrawEventData(IPMUnknown *c, int32 f) :
94  changedBy(c),
95  flags(f)
96  {}
97 };
98 
102 public:
106 
113  CDrawEventData(c, f),
114  gd(g)
115  {}
116 };
117 
121 public:
125 
129 
133 
137 
141 
145 
156  HitTestEventData(IPMUnknown *c, GraphicsData* g, const PMRect &x, UIDRef* t, int32 f, bool16 *b,
157  IVisitorHelper* h, IBaseVisitor* v) :
158  CDrawEventData(c, f),
163  pVisitable(h),
164  theVisitor(v)
165  {}
166 };
167 
171 public:
178 
186  CDrawEventData(c, f),
187  gd(g),
188  reasonForInval(r)
189  {}
190 };
191 
195 public:
198 // const PMMatrix* xform_ied;
199 
200 
204 
205 
206 
213  IterateEventData( IPMUnknown *c, /*const PMMatrix *m,*/ ICallback *cbInfo, int32 f) :
214  CDrawEventData(c, f),
215 // xform_ied(m),
216  callbackInfo(cbInfo)
217  {}
218 };
219 
223 public:
230 
237  CDrawEventData(c, 0),
238  gd(g),
239  bBox(b)
240  {}
241 };
242 
243 #endif
244