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

#include <ITracker.h>

Inheritance diagram for ITracker:
IPMUnknownCTrackerCLayoutTrackerCPathCreationTrackerCSliderTrackerSnapTrackerWaveTrackerSawWaveTrackerSineWaveTracker

Public Member Functions

void SetupTracker (IControlView *theControlView)
 
void SetupSpecialTracker (IControlView *theControlView, ISnapTo *theSnapper, IItemContext *context)
 
virtual IControlViewQueryControlView () const =0
 
virtual bool16 IsEnabled ()=0
 
virtual bool16 IsTracking ()=0
 
virtual void EnableTracking ()=0
 
virtual void DisableTracking ()=0
 
virtual bool16 BeginTracking (IEvent *theEvent)=0
 
virtual void HandleContinueTracking (const GSysPoint &where)=0
 
virtual void ContinueTracking (const PBPMPoint &where, bool16 mouseDidMove)=0
 
virtual bool16 EndTracking (IEvent *theEvent)=0
 
virtual void AbortTracking (IEvent *theEvent)=0
 
virtual void TimerMessage (int32 data)=0
 
virtual bool16 DoBeginTracking (IEvent *theEvent)=0
 
virtual bool16 DoEndTracking (IEvent *theEvent)=0
 
virtual void Initialize (IEvent *theEvent)=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

Abstract interface for trackers.

See Also
CTracker.h

Member Function Documentation

virtual void ITracker::AbortTracking (IEventtheEvent)
pure virtual

Immediately terminate tracking. Typically called in error state situations.

Parameters
theEvent[IN] the event

Implemented in CTracker, CPathCreationTracker, CLayoutTracker, and CSliderTracker.

virtual bool16 ITracker::BeginTracking (IEventtheEvent)
pure virtual

Start tracking the mouse. Usually called as the result of a mouse down event.

Parameters
theEvent[IN] the event that starts the tracker.
Returns
bool16 return kTrue to continue tracking, kFalse if tracking should stop.

Implemented in SnapTracker, CTracker, CPathCreationTracker, CLayoutTracker, and CSliderTracker.

virtual void ITracker::ContinueTracking (const PBPMPointwhere,
bool16 mouseDidMove 
)
pure virtual

Called after BeginTracking and before EndTracking. ContinueTracking is called repeatedly even when the mouse is not moving (to support things like auto scrolling)

Parameters
where[IN] current mouse position in pasteboard coordinates
mouseDidMove[IN] did the mouse actually move from previous call?

Implemented in CTracker, CPathCreationTracker, CLayoutTracker, and CSliderTracker.

virtual void ITracker::DisableTracking ()
pure virtual

Remove the tracker's eventhandler from the stack and terminate the mouse tracking thread.

Parameters
none

Implemented in CTracker.

virtual bool16 ITracker::DoBeginTracking (IEventtheEvent)
pure virtual

Called by BeginTracking, does the action of tracking without setting up the tracker

Parameters
theEvent
Returns
bool16

Implemented in CTracker, and CLayoutTracker.

virtual bool16 ITracker::DoEndTracking (IEventtheEvent)
pure virtual

Called by EndTracking, does the action end tracking would do without ending the tracking

Parameters
theEvent[IN] the IEvent
Returns
bool16 return value undefined, though typical trackers return kTrue.

Implemented in CTracker.

virtual void ITracker::EnableTracking ()
pure virtual

Push the tracker's eventhandler on the event handling stack. Create the mouse tracking thread. Tracking however will not start until a mouse down occurs. Should not be necessary for external callers since EnableTracking is called automatically for tracker clients in CTracker::BeginTracking.

Parameters
none

Implemented in CTracker.

virtual bool16 ITracker::EndTracking (IEventtheEvent)
pure virtual

Tracking is completed (user has releasted mouse). Clean up any loose ends and post any dynamic commands.

Parameters
theEvent[IN] the event at end tracking time (typically a mouse up event).
Returns
bool16 return code appears to be unused (typically trackers return kTrue)

Implemented in CTracker, CPathCreationTracker, CLayoutTracker, and CSliderTracker.

virtual void ITracker::HandleContinueTracking (const GSysPointwhere)
pure virtual

Called by the tracker event handler. This is a cover routine for ContinueTracking for things like autoscrolling. Generally this is not overridden in subclasses of CTracker.

Parameters
where[IN] global system coordinate at time of the call. Can convert to a pasteboard coordinate via GlobalToPasteboard method in CTracker.h.

Implemented in CTracker.

virtual void ITracker::Initialize (IEventtheEvent)
pure virtual

Initializes the starting point (fFirstPoint) and other values the tracker needs to run. Typically called automatically by base class CTracker, BeginTracking. Clients may want to override if they have additional private initialization tasks to do.

Parameters
theEvent[IN] the IEvent

Implemented in CTracker, and CLayoutTracker.

virtual bool16 ITracker::IsEnabled ()
pure virtual

The tracker's eventhandler is on the stack ready to accept events.

Parameters
none
Returns
bool16 kTrue if enabled, kFalse otherwise.

Implemented in CTracker.

virtual bool16 ITracker::IsTracking ()
pure virtual

Has BeginTracking been called?

Parameters
none
Returns
bool16 return kTrue if the tracker's BeginTracking method has been called, i.e. the tracker is actually tracking the mouse. Otherwise return kFalse.

Implemented in CTracker.

virtual IControlView* ITracker::QueryControlView () const
pure virtual

Return a bumped reference to the trackers IControlView.

Parameters
none
Returns
IControlView*

Implemented in CTracker.

void ITracker::SetupSpecialTracker (IControlViewtheControlView,
ISnapTotheSnapper,
IItemContext * context 
)
inline

Initialize the state of the tracker with a control-view and other optional abstractions. Typically called just prior to BeginTracking to see the tracker with various information needed during tracking. Indicate which control view the tracker is modifying. Used for access to graphics context. Snap to interface is optional, but it must be present if the tracker needs to do snap to.

Parameters
theControlView[IN] the control view to track in.
theSnapper[IN] the ISnapTo interface if the tracker want snap to behavior. Applies to tracker in the layout widget.
context[IN] the IItemContext for the tracker to use.
See Also
SetupTracker
ISnapTo.h
IItemContext.h
void ITracker::SetupTracker (IControlViewtheControlView)
inline

Initialize the state of the tracker with a control-view. Called just prior to BeginTracking. This differs from SetupSpecialTracker in that it just requires a control view. Trackers for widgets, or trackers that don't require snap to behavior or other layout-special behavior would likely use this method before calling BeginTracking.

Parameters
theControlView[IN] the control view to track in.
theSnapper[IN] the ISnapTo interface if the tracker want snap to behavior. Applies to tracker in the layout widget.
context[IN] the IItemContext for the tracker to use.
See Also
SetupSpecialTracker
ISnapTo.h
IItemContext.h
virtual void ITracker::TimerMessage (int32 data)
pure virtual

Used by certain timer threads to indicate that they have fired.

Parameters
data[IN] int32 value, elapsed time in milliseconds

Implemented in CTracker, and CLayoutTracker.