InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IEventHandler.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: ?
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 __IEVENTHANDLER__
25 #define __IEVENTHANDLER__
26 
27 #include "IPMUnknown.h"
28 #include "ShuksanID.h" // for IID_IEVENTHANDLER
29 
30 
31 class IEvent;
32 class IEventHandler;
33 class IControlView;
34 
44 class INTERFACE_DECL IEventHandler : public IPMUnknown
45 {
46  public:
47  enum { kDefaultIID = IID_IEVENTHANDLER }; // for UseDefaultIID()
48 
54  virtual bool16 Activate(IEvent* e) = 0;
55 
61  virtual bool16 Deactivate(IEvent* e) = 0;
62 
68  virtual bool16 Suspend(IEvent* e) = 0;
69 
75  virtual bool16 Resume(IEvent* e) = 0;
76 
81  virtual bool16 MouseMove(IEvent* e) = 0;
82 
87  virtual bool16 MouseExit(IEvent* e) = 0;
88 
93  virtual bool16 MouseDrag(IEvent* e) = 0;
94 
99  virtual bool16 LButtonDn(IEvent* e) = 0;
100 
105  virtual bool16 RButtonDn(IEvent* e) = 0;
106 
111  virtual bool16 MButtonDn(IEvent* e) = 0;
112 
117  virtual bool16 LButtonUp(IEvent* e) = 0;
118 
123  virtual bool16 RButtonUp(IEvent* e) = 0;
124 
129  virtual bool16 MButtonUp(IEvent* e) = 0;
130 
135  virtual bool16 ButtonDblClk(IEvent* e) = 0;
136 
141  virtual bool16 ButtonTrplClk(IEvent* e) = 0;
142 
147  virtual bool16 ButtonQuadClk(IEvent* e) = 0;
148 
153  virtual bool16 ButtonQuintClk(IEvent* e) = 0;
154 
159  virtual bool16 MouseWheel(IEvent* e) = 0;
160 
166  virtual bool16 TabletEvent(IEvent* e) = 0;
167  virtual bool16 GestureEvent(IEvent* e) = 0;
168 
174  virtual bool16 MultiTouchEvent(IEvent* e) = 0;
175 
180  virtual bool16 ControlCmd(IEvent* e) = 0;
181 
182 
183  // Keyboard Related Events
184 
189  virtual bool16 KeyDown(IEvent* e) = 0;
190 
195  virtual bool16 KeyCmd(IEvent* e) = 0;
196 
201  virtual bool16 KeyUp(IEvent* e) = 0;
202 
203 
204  // Keyboard Focus Related Functions
205 
210  virtual void PreGetKeyFocus() = 0;
211 
216  virtual void PostGetKeyFocus() = 0;
217 
222  virtual void PreGiveUpKeyFocus() = 0;
223 
228  virtual void PostGiveUpKeyFocus() = 0;
229 
234  virtual bool16 WillingToGiveUpKeyFocus() = 0;
235 
241  virtual bool16 SuspendKeyFocus() = 0;
242 
247  virtual bool16 ResumeKeyFocus() = 0;
248 
253  virtual bool16 CanHaveKeyFocus() const = 0;
254 
263  virtual bool16 WantsTabKeyFocus() const = 0;
264 
265 #if 0 // OBSOLETE AS OF CC
266 
270  virtual bool16 Update(IEvent* e) = 0;
271 
276  virtual bool16 PlatformEvent(IEvent* e) = 0;
277 
282  virtual bool16 CallSysEventHandler(IEvent* e) = 0;
283 #endif // OBSOLETE AS OF CC
284 
285 
288  virtual void SetView(IControlView* view) = 0;
289 
290 };
291 
292 // All the event handler's methods for handling specific event types
293 // share the EHandlerMethod prototype.
294 //
295 typedef bool16 (IEventHandler::*EHandlerMethod)(IEvent* e);
296 
297 
298 
299 #endif // __IEVENTHANDLER__