InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IDrwEvtDispatcher Class Referenceabstract

#include <IDrwEvtDispatcher.h>

Inheritance diagram for IDrwEvtDispatcher:
IPMUnknown

Public Member Functions

virtual void RegisterHandler (ClassID eventID, IDrwEvtHandler *handler, DrwEvtHandlerPriority priority)=0
 
virtual void UnRegisterHandler (ClassID eventID, IDrwEvtHandler *handler)=0
 
virtual bool16 ProcessFilterEvent (IPMUnknown *changedBy, GraphicsData *gd, int32 flags)=0
 
bool16 ProcessHitTestFilterEvent (IPMUnknown *changedBy, GraphicsData *gd, int32 flags)
 
bool16 ProcessInvalFilterEvent (IPMUnknown *changedBy, GraphicsData *gd, int32 flags)
 
bool16 ProcessDrawFilterEvent (IPMUnknown *changedBy, GraphicsData *gd, int32 flags)
 
virtual bool16 ProcessDrawEvent (ClassID eventID, IPMUnknown *changedBy, GraphicsData *gd, int32 flags)=0
 
virtual bool16 ProcessHitTestEvent (ClassID eventID, IPMUnknown *changedBy, GraphicsData *gd, const PMRect &r, UIDRef *thingHit, int32 flags, bool16 *isHit)=0
 
virtual bool16 ProcessHitTestEvent (ClassID eventID, IPMUnknown *changedBy, GraphicsData *gd, const PMRect &r, UIDRef *thingHit, int32 flags, bool16 *isHit, IVisitorHelper *pVisitable, IBaseVisitor *theVisitor)=0
 
virtual bool16 ProcessInvalEvent (ClassID eventID, IPMUnknown *changedBy, GraphicsData *gd, ClassID reasonForInval, int32 flags)=0
 
virtual bool16 ProcessIterateEvent (ClassID eventID, IPMUnknown *changedBy, ICallback *callbackInfo, int32 flags)=0
 
virtual bool16 ProcessGetBBoxEvent (ClassID eventID, IPMUnknown *changedBy, GraphicsData *gd, PMRect *bBox)=0
 
virtual void RegisterDrawEventServices (ServiceID serviceID)=0
 
virtual void UnRegisterDrawEventServices (ServiceID serviceID)=0
 
virtual void Shutdown ()=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

The IDrwEvtDispatcher can be instaniated off the session in order to register a draw event handler (see IDrwEvtHandler). A draw event handler has to register using a particular priority. The handlers are called from high to lowest priority for each event. If any handler returns true from the HandleEvent call, it is assumed the event has been handled, and the remaining lower priority handlers are not called. The initialization priority is called before all other priorities, however the return code from HandleEvent is ignored.

See Also
IDrwEvtHandler

Member Function Documentation

virtual bool16 IDrwEvtDispatcher::ProcessFilterEvent (IPMUnknownchangedBy,
GraphicsDatagd,
int32 flags 
)
pure virtual

Propigate event throughout the registered handlers - this version usually called from the DrawShape methods on the different shapes. Data is packaged into DrawEventData class to be sent to ProcessEvent in IDrwEvtHandler.

Parameters
eventIDIN the event ID being executed - see DocumentContextID.h in kMessageIDSpace
changedByIN who is dispatching this event
gdIN current graphic data in place
flagsIN - See IShape.h for the drawing flags.
Returns
bool16 - kTrue if the handler handled the event and the calling code should not continue, kFalse otherwise
virtual bool16 IDrwEvtDispatcher::ProcessGetBBoxEvent (ClassID eventID,
IPMUnknownchangedBy,
GraphicsDatagd,
PMRectbBox 
)
pure virtual

Get the bounding box for the event. Data is packaged into GetBBoxEventData class to be sent to ProcessEvent in IDrwEvtHandler.

Parameters
eventIDIN the event ID being executed - see DocumentContextID.h in kMessageIDSpace
changedByIN who is dispatching this event
gdIN current graphic data in place
bBoxINOUT the bounding box for the event
Returns
bool16 - kTrue if the handler handled the event and the calling code should not continue, kFalse otherwise
virtual bool16 IDrwEvtDispatcher::ProcessHitTestEvent (ClassID eventID,
IPMUnknownchangedBy,
GraphicsDatagd,
const PMRectr,
UIDRefthingHit,
int32 flags,
bool16 * isHit 
)
pure virtual

Propigate event throughout the registered handlers - this version called from the hit test handlers. Data is packaged into HitTestEventData class to be sent to ProcessEvent in IDrwEvtHandler.

Parameters
eventIDIN the event ID being executed - see DocumentContextID.h in kMessageIDSpace
changedByIN who is dispatching this event
gdIN current graphic data in place
rIN the hit rectangle
thingHitINOUT the UIDRef of the thing that is hit
flagsIN see IShape.h for the drawing flags
isHitINOUT bool16 kTrue if the thing is hit, kFalse otherwise
Returns
bool16 - kTrue if the handler handled the event and the calling code should not continue, kFalse otherwise
virtual bool16 IDrwEvtDispatcher::ProcessHitTestEvent (ClassID eventID,
IPMUnknownchangedBy,
GraphicsDatagd,
const PMRectr,
UIDRefthingHit,
int32 flags,
bool16 * isHit,
IVisitorHelperpVisitable,
IBaseVisitortheVisitor 
)
pure virtual

Propigate event throughout the registered handlers - this version called from the hit test handlers. Data is packaged into HitTestEventData class to be sent to ProcessEvent in IDrwEvtHandler.

Parameters
eventIDIN the event ID being executed - see DocumentContextID.h in kMessageIDSpace
changedByIN who is dispatching this event
gdIN current graphic data in place
rIN the hit rectangle
thingHitINOUT the UIDRef of the thing that is hit
flagsIN see IShape.h for the drawing flags
isHitINOUT bool16 kTrue if the thing is hit, kFalse otherwise
pVisitableIN pointer to IVisitorHelper
theVisitorIN pointer to IBaseVisitor
Returns
bool16 - kTrue if the handler handled the event and the calling code should not continue, kFalse otherwise
virtual bool16 IDrwEvtDispatcher::ProcessInvalEvent (ClassID eventID,
IPMUnknownchangedBy,
GraphicsDatagd,
ClassID reasonForInval,
int32 flags 
)
pure virtual

Propigate event throughout the registered handlers - this version called from Inval handlers. Data is packaged into InvalEventData class to be sent to ProcessEvent in IDrwEvtHandler.

Parameters
eventIDIN the event ID being executed - see DocumentContextID.h in kMessageIDSpace
changedByIN who is dispatching this event
gdIN current graphic data in place
reasonForInvalIN ClassID of the reason for invalidation
flagsIN see IShape.h for the drawing flags
Returns
bool16 - kTrue if the handler handled the event and the calling code should not continue, kFalse otherwise
virtual bool16 IDrwEvtDispatcher::ProcessIterateEvent (ClassID eventID,
IPMUnknownchangedBy,
ICallbackcallbackInfo,
int32 flags 
)
pure virtual

Propigate event throughout the registered handlers - this version called from the iterate draw order handler. Data is packaged into IterateEventData class to be sent to ProcessEvent in IDrwEvtHandler.

Parameters
eventIDIN the event ID being executed - see DocumentContextID.h in kMessageIDSpace
changedByIN who is dispatching this event
xformIN current transformation
callbackInfoIN pointer to ICallback interface
flagsIN see IShape.h for the drawing flags
Returns
bool16 - kTrue if the handler handled the event and the calling code should not continue, kFalse otherwise
virtual void IDrwEvtDispatcher::RegisterDrawEventServices (ServiceID serviceID)
pure virtual

Loop through service registry registering sericeID handlers.

Parameters
serviceIDIN service ID to register
virtual void IDrwEvtDispatcher::RegisterHandler (ClassID eventID,
IDrwEvtHandlerhandler,
DrwEvtHandlerPriority priority 
)
pure virtual

Register an event handler using the supplied priority. NOTE: an AddRef will be called on the handler!

Parameters
eventIDIN the event ID you are registering for - see DocumentContextID.h in kMessageIDSpace
handlerIN the handler that will handle the dispatch
priorityIN which priority to be used - see DrwEvtHandlerPriority
virtual void IDrwEvtDispatcher::Shutdown ()
pure virtual

Removes all handlers from the table.

virtual void IDrwEvtDispatcher::UnRegisterDrawEventServices (ServiceID serviceID)
pure virtual

Loop through service registry unregistering sericeID handlers.

Parameters
serviceIDIN service ID to unregister
virtual void IDrwEvtDispatcher::UnRegisterHandler (ClassID eventID,
IDrwEvtHandlerhandler 
)
pure virtual

Unregister an event handler - the opposite of RegisterHandler. NOTE: a Release will be called on the handler!

Parameters
eventIDIN the event ID you are unregistering for
handlerIN the handler that you are unregistering