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

#include <IDrwEvtHandler.h>

Inheritance diagram for IDrwEvtHandler:
IPMUnknownCPMUnknown< IDrwEvtHandler >BscDEHDrwEvtHandlerPrnSelDrawHandler

Public Member Functions

virtual void Register (IDrwEvtDispatcher *eventDispatcher)=0
 
virtual void UnRegister (IDrwEvtDispatcher *eventDispatcher)=0
 
virtual bool16 HandleDrawEvent (ClassID eventID, void *eventData)=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

Any draw event handler must supply the following three routines. Register is called so the handler can register for particular draw events using the RegisterHandler() method in IDrwEvtDispatcher.h. UnRegister is the reverse of Register. HandleEvent is called when the event happens. If the handler returns true from HandleEvent, it is assumed the event has been handled, and lower priority handlers will not be called.

See Also
IDrwEvtDispatcher

Member Function Documentation

virtual bool16 IDrwEvtHandler::HandleDrawEvent (ClassID eventID,
void * eventData 
)
pure virtual

Take care of event that has been registered for.

Parameters
eventIDIN the event ID you are registering for - see DocumentContextID.h in kMessageIDSpace
eventDataIN event data in the form of a subclass of CDrawEventData depending on what the event is. For example, Draw events will be passed DrawEventData, Hit test events will be passed HitTestEventData, Inval events will be passed InvalEventData, Iterate events will be passed IterateEventData and Get BBox events will be passed GetBBoxEventData.

Implemented in PrnSelDrawHandler, and BscDEHDrwEvtHandler.

virtual void IDrwEvtHandler::Register (IDrwEvtDispatchereventDispatcher)
pure virtual

Install self to handle events.

Parameters
eventDispatcherIN the IDrwEvtDispatcher to handle the event

Implemented in PrnSelDrawHandler, and BscDEHDrwEvtHandler.

virtual void IDrwEvtHandler::UnRegister (IDrwEvtDispatchereventDispatcher)
pure virtual

Uninstall self to handle events - reverse of Register

Parameters
eventDispatcherIN the IDrwEvtDispatcher to unregister

Implemented in PrnSelDrawHandler, and BscDEHDrwEvtHandler.