InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IDrwEvtDispatcher.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 // This interface registers, unregisters and calls draw event handlers who wish
25 // to process draw events.
26 //
27 //========================================================================================
28 
29 #ifndef __IDrwEvtDispatcher__
30 #define __IDrwEvtDispatcher__
31 
32 #include "IPMUnknown.h"
33 
34 class IDrwEvtHandler;
35 class GraphicsData;
36 class PMRect;
37 class UIDRef;
38 class PMMatrix;
39 class ICallback;
40 class IVisitorHelper;
41 class IBaseVisitor;
42 
45 enum
46 {
49  kDEHPostProcess,
50 
53  kDEHLowestPriority,
56  kDEHLowPriority,
59  kDEHMediumPriority,
62  kDEHHighPriority,
63 
66  kDEHInitialization
67 };
68 typedef int32 DrwEvtHandlerPriority;
69 
80 {
81  public:
88  virtual void RegisterHandler(ClassID eventID, IDrwEvtHandler *handler, DrwEvtHandlerPriority priority) = 0;
89 
95  virtual void UnRegisterHandler(ClassID eventID, IDrwEvtHandler *handler) = 0;
96 
105  virtual bool16 ProcessFilterEvent( IPMUnknown *changedBy, GraphicsData* gd, int32 flags) = 0;
106  bool16 ProcessHitTestFilterEvent( IPMUnknown *changedBy, GraphicsData* gd, int32 flags)
107  {
108  return ProcessFilterEvent( changedBy, gd, flags);
109  }
110  bool16 ProcessInvalFilterEvent( IPMUnknown *changedBy, GraphicsData* gd, int32 flags)
111  {
112  return ProcessFilterEvent( changedBy, gd, flags);
113  }
114  bool16 ProcessDrawFilterEvent( IPMUnknown *changedBy, GraphicsData* gd, int32 flags)
115  {
116  return ProcessFilterEvent( changedBy, gd, flags);
117  }
118  virtual bool16 ProcessDrawEvent(ClassID eventID, IPMUnknown *changedBy, GraphicsData* gd, int32 flags) = 0;
119 
131  virtual bool16 ProcessHitTestEvent(ClassID eventID, IPMUnknown *changedBy, GraphicsData* gd, const PMRect &r, UIDRef* thingHit, int32 flags, bool16 *isHit) = 0;
132 
146  virtual bool16 ProcessHitTestEvent(ClassID eventID, IPMUnknown *changedBy, GraphicsData* gd, const PMRect &r, UIDRef* thingHit, int32 flags, bool16 *isHit,
147  IVisitorHelper *pVisitable, IBaseVisitor *theVisitor) = 0;
148 
158  virtual bool16 ProcessInvalEvent(ClassID eventID, IPMUnknown *changedBy, GraphicsData *gd, ClassID reasonForInval, int32 flags) = 0;
159 
169  virtual bool16 ProcessIterateEvent(ClassID eventID, IPMUnknown *changedBy, /*const PMMatrix *xform,*/ ICallback *callbackInfo, int32 flags) = 0;
170 
178  virtual bool16 ProcessGetBBoxEvent(ClassID eventID, IPMUnknown *changedBy, GraphicsData *gd, PMRect* bBox) = 0;
179 
183  virtual void RegisterDrawEventServices(ServiceID serviceID) = 0;
184 
188  virtual void UnRegisterDrawEventServices(ServiceID serviceID) = 0;
189 
192  virtual void Shutdown() = 0;
193 };
194 
195 #endif
196