InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CTrackerEventHandler Class Reference

#include <CTrackerEventHandler.h>

Inheritance diagram for CTrackerEventHandler:
CEventHandlerIEventHandlerIPMUnknown

Public Member Functions

 CTrackerEventHandler (IPMUnknown *boss)
 
virtual ~CTrackerEventHandler ()
 
virtual bool16 LButtonDn (IEvent *theEvent)
 
virtual bool16 LButtonUp (IEvent *theEvent)
 
virtual bool16 MouseDrag (IEvent *e)
 
virtual bool16 KeyCmd (IEvent *e)
 
virtual bool16 KeyUp (IEvent *e)
 
virtual bool16 KeyDown (IEvent *e)
 
virtual bool16 Suspend (IEvent *theEvent)
 
virtual bool16 Deactivate (IEvent *theEvent)
 
virtual bool16 RButtonDn (IEvent *e)
 
virtual bool16 RButtonUp (IEvent *e)
 
virtual bool16 MouseWheel (IEvent *e)
 
- Public Member Functions inherited from CEventHandler
 CEventHandler (IPMUnknown *boss)
 
virtual ~CEventHandler ()
 
virtual bool16 Activate (IEvent *e)
 
virtual bool16 Resume (IEvent *e)
 
virtual bool16 MouseMove (IEvent *e)
 
virtual bool16 MouseExit (IEvent *e)
 
virtual bool16 MButtonDn (IEvent *e)
 
virtual bool16 MButtonUp (IEvent *e)
 
virtual bool16 ButtonDblClk (IEvent *e)
 
virtual bool16 ButtonTrplClk (IEvent *e)
 
virtual bool16 ButtonQuadClk (IEvent *e)
 
virtual bool16 ButtonQuintClk (IEvent *e)
 
virtual bool16 TabletEvent (IEvent *e)
 
virtual bool16 GestureEvent (IEvent *e)
 
virtual bool16 MultiTouchEvent (IEvent *e)
 
virtual bool16 ControlCmd (IEvent *e)
 
virtual void PreGetKeyFocus ()
 
virtual void PostGetKeyFocus ()
 
virtual void PreGiveUpKeyFocus ()
 
virtual void PostGiveUpKeyFocus ()
 
virtual bool16 WillingToGiveUpKeyFocus ()
 
virtual bool16 SuspendKeyFocus ()
 
virtual bool16 ResumeKeyFocus ()
 
virtual bool16 CanHaveKeyFocus () const
 
virtual bool16 WantsTabKeyFocus () const
 
virtual bool16 Update (IEvent *e)
 
virtual bool16 PlatformEvent (IEvent *e)
 
virtual bool16 CallSysEventHandler (IEvent *e)
 
virtual void SetView (IControlView *view)
 

Additional Inherited Members

- Public Types inherited from IEventHandler
enum  { kDefaultIID = IID_IEVENTHANDLER }
 
- Protected Attributes inherited from CEventHandler
IControlViewfView
 

Detailed Description

Implementation of IEventHandler that forwards events to CTracker.

Constructor & Destructor Documentation

CTrackerEventHandler::CTrackerEventHandler (IPMUnknownboss)

Constructor.

Parameters
bossobject on which this interface is aggregated
virtual CTrackerEventHandler::~CTrackerEventHandler ()
virtual

Destructor.

Member Function Documentation

virtual bool16 CTrackerEventHandler::Deactivate (IEventtheEvent)
virtual

Calls AbortTracking if the application is deactivated

Parameters
theEventevent of interest
Returns
kFalse

Reimplemented from CEventHandler.

virtual bool16 CTrackerEventHandler::KeyCmd (IEvente)
virtual

Disallow handling of keyboard shortcuts during tracking

Parameters
eevent of interest
Returns
kTrue, meaning that the event has been consumed

Reimplemented from CEventHandler.

virtual bool16 CTrackerEventHandler::KeyDown (IEvente)
virtual

Disallow handling of keyboard shortcuts during tracking

Parameters
eevent of interest
Returns
kTrue, meaning that the event has been consumed

Reimplemented from CEventHandler.

virtual bool16 CTrackerEventHandler::KeyUp (IEvente)
virtual

Disallow handling of keyboard shortcuts during tracking

Parameters
eevent of interest
Returns
kTrue, meaning that the event has been consumed

Reimplemented from CEventHandler.

virtual bool16 CTrackerEventHandler::LButtonDn (IEventtheEvent)
virtual

Begin tracking message will get sent out, if event in bounds.

Parameters
theEventevent being handled
Returns
kTrue if the event is within the bounds of the control-view of the tracker, kFalse otherwise

Reimplemented from CEventHandler.

virtual bool16 CTrackerEventHandler::LButtonUp (IEventtheEvent)
virtual

End tracking message will get sent to tracker.

Returns
value returned by ITracker::EndTracking

Reimplemented from CEventHandler.

virtual bool16 CTrackerEventHandler::MouseDrag (IEvente)
virtual

We still need to do this. It used to be that all mouse movement happened from a mouse tracker task. But that resulted in jerky tracking and fought with the drag event. Once solution would be to remove the mousedrag code and rely solely on the idle task but that results in an unwanted behaviour: For a quick drag (mouse down followed by mouse up) the idle task inserts a bogus mouse position into the tracker but before the tracker can handle the end tracking event. This gives a momentary flash of drawing the sprite where the mouse is and then redrawing the sprite to where the mouse button was let up. This effect will happen anytime the sequence of events is: GetNextEvent, mouse up inserted into event queue, run all tasks, GetNextEvent, mouse up handled.

Now the only thing the tracker thread is responsible for is generating mouse drag events when the mouse is outside the window and has not moved.

Parameters
eevent of interest
Returns
kTrue, meaning that the event has been consumed

Reimplemented from CEventHandler.

virtual bool16 CTrackerEventHandler::MouseWheel (IEvente)
virtual

Swallows the event to suppress wheel activity while tracking

Parameters
theEventevent of interest
Returns
kTrue if tracking, kFalse otherwise

Reimplemented from CEventHandler.

virtual bool16 CTrackerEventHandler::RButtonDn (IEvente)
virtual

Swallows the event to suppress right button activity while tracking

Parameters
theEventevent of interest
Returns
kTrue if tracking, kFalse otherwise

Reimplemented from CEventHandler.

virtual bool16 CTrackerEventHandler::RButtonUp (IEvente)
virtual

Swallows the event to suppress right button activity while tracking

Parameters
theEventevent of interest
Returns
kTrue if tracking, kFalse otherwise

Reimplemented from CEventHandler.

virtual bool16 CTrackerEventHandler::Suspend (IEventtheEvent)
virtual

Calls AbortTracking if the application is suspended

Parameters
theEventevent of interest
Returns
kFalse

Reimplemented from CEventHandler.