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

Classes | |
| class | EventTypeList |
Public Types | |
| enum | { kDefaultIID = IID_IEVENTDISPATCHER } |
| enum | PushWhere { kPushOnTop, kPushOnBottom } |
Public Member Functions | |
| virtual void | Push (IEventHandler *newHandler, PushWhere pushWhere=kPushOnTop)=0 |
| virtual void | Remove (IEventHandler *ehToRemove)=0 |
| virtual IEventHandler * | Peek (int32 ehIndex=0) const =0 |
| virtual int32 | Depth () const =0 |
| virtual void | Init ()=0 |
| virtual void | CleanUp ()=0 |
| virtual bool16 | DispatchEvent (IEvent *theEvent, IEvent::SystemHandledState initialState=IEvent::kShouldCall)=0 |
| virtual void | AddEventWatcher (IEventWatcher *newWatcher, EventTypeList interest)=0 |
| virtual void | AddEventWatcher (IEventWatcher *newWatcher, IEvent::EventType interest)=0 |
| virtual void | RemoveEventWatcher (IEventWatcher *newWatcher, EventTypeList interest)=0 |
| virtual void | RemoveEventWatcher (IEventWatcher *newWatcher, IEvent::EventType interest)=0 |
| virtual void | StopAllEventWatchers ()=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
The event dispatcher maintains a stack of event handlers. Events are dispatched to the event handlers, starting with the topmost event event handler on the stack. The event will be passed on to the next handler in the stack, until a handler returns that it has handled the event.
| anonymous enum |
DefaultIID so that UseDefaultIID() can work for this interface
enum for where on the stack to add
| pure virtual |
Terminates the dispatcher
| pure virtual |
Return the number of event handlers on the stack.
| pure virtual |
Dispatch the event. The event is passed to the topmost event handler. If it is not handled, it is passed on to the next handler, and so on, until either the event has been handled, or it has been passed to all the event handlers on the stack. Returns true if the event was handled, false otherwise.
| pure virtual |
Initializes the dispatcher
| pure virtual |
Return a pointer to the indicated event handler on the stack. By default, return the top event handler. ehIndex can range from 0 (top EH) to Depth() - 1 (bottom EH).
| pure virtual |
Add a new handler to the top or bottom of the stack. Stack may be enlarged to fit the new handler. An event handler may only be added once or else an assertion violation will occur and Push will do nothing.
| pure virtual |
Remove the ehToRemove from the stack. If ehToRemove is not on the stack, does nothing.