InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
BscDEHDrwEvtHandler Class Reference
Inheritance diagram for BscDEHDrwEvtHandler:
CPMUnknown< IDrwEvtHandler >IDrwEvtHandlerIPMUnknown

Public Member Functions

 BscDEHDrwEvtHandler (IPMUnknown *boss)
 
virtual ~BscDEHDrwEvtHandler ()
 
virtual void Register (IDrwEvtDispatcher *eventDispatcher)
 
virtual void UnRegister (IDrwEvtDispatcher *eventDispatcher)
 
virtual bool16 HandleDrawEvent (ClassID eventID, void *eventData)
 
- Public Member Functions inherited from CPMUnknown< IDrwEvtHandler >
IPMUnknownQueryInterface (PMIID interfaceID) const
 
void AddRef () const
 
void Release () const
 
void PreDirty (ImplementationID prop=kInvalidImpl, bool16 allowModification=kTrue)
 
void PreDirtyNoMessage (ImplementationID prop=kInvalidImpl, bool16 allowModification=kTrue)
 
 CPMUnknown (const CPMUnknown &)=delete
 
CPMUnknownoperator= (const CPMUnknown &)=delete
 

Additional Inherited Members

- Protected Member Functions inherited from CPMUnknown< IDrwEvtHandler >
 CPMUnknown (IPMUnknown *boss)
 
- Protected Attributes inherited from CPMUnknown< IDrwEvtHandler >
HelperInterface fHelperInterface
 

Detailed Description

BscDEHDrwEvtHandler This class provides the service of handling draw events. The class registers for draw events of interest. As a demo, this particular implementation registers for all draw events. Once registered, the class handles draw events sent by the draw event dispatcher.

Constructor & Destructor Documentation

Binds the C implementation class onto its ImplementationID making the C code callable by the application * BscDEHDrwEvtHandler::BscDEHDrwEvtHandler (IPMUnknownboss)

Constructor. Builds a list of event IDs of interest. The list ensures consistency in the register and unregister methods.

Parameters
bossinterface ptr from boss object on which this interface is aggregated.
BscDEHDrwEvtHandler::~BscDEHDrwEvtHandler ()
virtual

Destructor

Member Function Documentation

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

Takes action based on the event ID. Always returns kFalse, meaning that the draw event has not been handled. Returning kTrue would tell the draw event manager to stop calling draw event handlers, and would also tell the broadcasting agent (e.g. page item) to stop drawing.

Parameters
eventIDID of the specific event. Should never be something the DEH isn't registered for.
eventDataPtr to the draw event data. May be one of several classes, depending on the specific event.

Implements IDrwEvtHandler.

void BscDEHDrwEvtHandler::Register (IDrwEvtDispatchereventDispatcher)
virtual

Tells the draw event dispatcher what draw events this implementation wants to handle. Uses the list of event IDs built by the constructor.

Parameters
eventDispatcherActive draw event dispatcher.

Implements IDrwEvtHandler.

void BscDEHDrwEvtHandler::UnRegister (IDrwEvtDispatchereventDispatcher)
virtual

Tells the draw event dispatcher this class doesn't want to receive draw events anymore. Actually, this implementation will be unregistered automatically when the application quits because this draw event handler implementation appears on a service provider boss. However, this method explicitly unregisters using the list generated by the constructor so it could be used outside the context of a service provider.

Parameters
eventDispatcherActive draw event dispatcher.

Implements IDrwEvtHandler.