#include <ITracker.h>
Abstract interface for trackers.
- See Also
- CTracker.h
| virtual void ITracker::AbortTracking | ( | IEvent * | theEvent | ) | |
| pure virtual |
| virtual bool16 ITracker::BeginTracking | ( | IEvent * | theEvent | ) | |
| pure virtual |
| virtual void ITracker::ContinueTracking | ( | const PBPMPoint & | where, | | | 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
Implemented in CTracker.
| virtual bool16 ITracker::DoBeginTracking | ( | IEvent * | theEvent | ) | |
| pure virtual |
Called by BeginTracking, does the action of tracking without setting up the tracker
- Parameters
- Returns
- bool16
Implemented in CTracker, and CLayoutTracker.
| virtual bool16 ITracker::DoEndTracking | ( | IEvent * | theEvent | ) | |
| pure virtual |
Called by EndTracking, does the action end tracking would do without ending the tracking
- Parameters
- 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
Implemented in CTracker.
| virtual bool16 ITracker::EndTracking | ( | IEvent * | theEvent | ) | |
| 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 GSysPoint & | where | ) | |
| 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 | ( | IEvent * | theEvent | ) | |
| 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
Implemented in CTracker, and CLayoutTracker.
| virtual bool16 ITracker::IsEnabled | ( | | ) | |
| pure virtual |
The tracker's eventhandler is on the stack ready to accept events.
- Parameters
- Returns
- bool16 kTrue if enabled, kFalse otherwise.
Implemented in CTracker.
| virtual bool16 ITracker::IsTracking | ( | | ) | |
| pure virtual |
Has BeginTracking been called?
- Parameters
- 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.
Return a bumped reference to the trackers IControlView.
- Parameters
- Returns
- IControlView*
Implemented in CTracker.
| void ITracker::SetupSpecialTracker | ( | IControlView * | theControlView, | | | ISnapTo * | theSnapper, | | | 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
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.