InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IEventUtils.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Lonnie Millett
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 __IEventUtils__
25 #define __IEventUtils__
26 
27 // ----- Interfaces -----
28 
29 #include "IPMUnknown.h"
30 
31 #include "VirtualKey.h"
32 #include "KeyStates.h"
33 #include "PMTypes.h"
34 
35 // ----- ID.h files -----
36 
37 #include "AppUIID.h"
38 
39 // ----- Forward declarations -----
40 
41 class IEvent;
42 class IControlView;
43 class CursorSpec;
44 
51 class IEventUtils : public IPMUnknown
52 {
53 public:
54  enum { kDefaultIID = IID_IEVENTUTILS };
55 
59  virtual GSysPoint GetGlobalMouseLocation() = 0;
60 
64  virtual bool16 IsMouseButtonDown() = 0;
65 
70  virtual bool16 IsMouseButtonReleased() = 0;
71 
78  virtual bool16 IsUserStartingDrag(IEvent *e, bool16 &isPatientUser, const CursorSpec* patientCursor = nil) = 0;
79 
87  virtual bool16 IsUserStartingDrag(IEvent *e, bool16 &isPatientUser, const SysRect& startOnExitGRect, const CursorSpec* patientCursor = nil) = 0;
88 
94  virtual void PMCaptureMouse(IControlView* theView) = 0;
95 
98  virtual void PMReleaseMouse(void) = 0;
99 
103  virtual void RemoveNextKeyCmd(IEvent* e) = 0;
104 
108  virtual bool16 IsDragOrTrackInProgress() = 0;
109 
110 #ifdef MACINTOSH
111 
114  virtual void MovePaletteWindowsOffScreen(bool16 off) = 0;
115 #endif
116 
121  virtual int16 GetModifiersFromEvent(const IEvent* e) = 0;
122 
123 #ifdef WINDOWS
124 
137  virtual bool16 HandleSysCommandMessage(HWND hWnd, UINT sysMsg, WPARAM wParam, LPARAM lParam) = 0;
138 #endif
139 
142  virtual bool16 IsTrackInProgress() = 0;
143 
148  virtual bool16 IsUserEventPending(bool16 needPendingKeyEventOnly = kFalse) = 0;
149 
153  virtual void EmulateAsynModalLoop() = 0;
154 };
155 
156 #endif