HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DM_MouseHook Class Referenceabstract

#include <DM_MouseHook.h>

Public Member Functions

 DM_MouseHook (const char *hook_name, int priority)
 
virtual ~DM_MouseHook ()
 
const char * getName () const
 
int getPriority () const
 
virtual DM_MouseEventHooknewEventHook (DM_VPortAgent &vport)=0
 Called when a viewport needs to create a new hook. More...
 
virtual void retireEventHook (DM_VPortAgent &vport, DM_MouseEventHook *hook)=0
 Called when a viewport no longer requires the hook. More...
 

Detailed Description

A DM_MouseHook creates new DM_MouseEventHook objects when new viewports are created.

Examples:
DM/DM_GreedyMouseHook.C.

Definition at line 91 of file DM_MouseHook.h.

Constructor & Destructor Documentation

DM_MouseHook::DM_MouseHook ( const char *  hook_name,
int  priority 
)

Create a mouse hook which creates mouse event hook instances for specific viewports. Only one mouse hook is ever created, and it is responsible for managing the mouse event hooks for viewports. Each hook requires a name (for error reporting) and a priority level to resolve multiple mouse hook conflicts.

virtual DM_MouseHook::~DM_MouseHook ( )
virtual

Member Function Documentation

const char* DM_MouseHook::getName ( void  ) const
inline

Definition at line 103 of file DM_MouseHook.h.

int DM_MouseHook::getPriority ( ) const
inline

Definition at line 104 of file DM_MouseHook.h.

virtual DM_MouseEventHook* DM_MouseHook::newEventHook ( DM_VPortAgent vport)
pure virtual

Called when a viewport needs to create a new hook.

Each viewport has its own event hook.

virtual void DM_MouseHook::retireEventHook ( DM_VPortAgent vport,
DM_MouseEventHook hook 
)
pure virtual

Called when a viewport no longer requires the hook.

When a viewport is destroyed, it retires all its hooks. Because a hook could be shared between all viewports, this method gives the mouse hook the opportunity to delete it, dereference it, etc. The viewport doing the retiring is passed in along with the hook it is retiring.


The documentation for this class was generated from the following file: