![]() | InDesign SDK 20.5 |
#include <IEventWatcher.h>

Public Types | |
| enum | { kDefaultIID = IID_IEVENTWATCHER } |
Public Member Functions | |
| virtual IEventDispatcher::EventTypeList | WatchEvent (IEvent *e)=0 |
| virtual void | StartWatching ()=0 |
| virtual void | StopWatching ()=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
This interface provides an easy way for snooping at events as they are dispatched
The event dispatcher maintains a list of event watchers. As events are dispatched to the event handlers, they are also passed to the EventWatchers. Some example uses of event watchers o drawing the mouse position in the rulers o drawing the mouse position in the transform panel o maintaining the shape of the mouse pointer o implementing tool tips Many of these used to be done in the IdleTaskMgr but caused some significant performance problems there.
| pure virtual |
This is a hook for implementations of register interest in events they want to watch. Typically calls the AddEventWatcher method of the app's only EventDispatcher for each event of interest.
Implemented in CIdleMouseWatcher.
| pure virtual |
This method is a hook for implmentations to unregister interest in events. Typically calls the RemoveEventWatcher method of the app's only EventDispatcher for each event of interest.
Implemented in CIdleMouseWatcher.
| pure virtual |
Called by the EventDispatcher before the event is dispatched. Returns the list of event kinds that are now of interest. If the EventList is empty, this IEventWatcher is removed from the EventDispatcher. (StopWatching would not be called)
| e | the event to watch |
Implemented in CIdleMouseWatcher.