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

#include <ITrackerFactory.h>

Inheritance diagram for ITrackerFactory:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ITRACKERFACTORY }
 

Public Member Functions

virtual void Startup ()=0
 
virtual void InstallTracker (ClassID widgetID, ClassID toolID, ClassID trackerID)=0
 
virtual void RemoveTracker (ClassID widgetID, ClassID toolID)=0
 
virtual bool16 HasTracker (ClassID widgetID, ClassID toolID)=0
 
virtual ITrackerQueryTracker (ClassID widgetID, ClassID toolID)=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 the tracker factory. There is a single implementation of this interface installed on the kSessionBoss. It handles installing all trackers, which get registered via the ITrackerRegister interface.

Provides an extensible mechanism for creating new tracking behavior. Trackers are uniquely identified by two classIDs. These IDs usually identify the context in which the tracker will be created. For example the tracker that is used for rotation of page items is installed with a widgetID of kLayoutWidgetBoss, a toolID of kRotateToolBoss. When a mouse down occurs in the layout widget and the active tool is the rotate tool, a tracker with a class of kRotateTrackerBoss will be created. Trackers can be installed on the fly with Install or at startup with ITrackerRegister.

See Also
ITrackerRegister.h
ITracker.h

Member Function Documentation

virtual bool16 ITrackerFactory::HasTracker (ClassID widgetID,
ClassID toolID 
)
pure virtual

Determine if a tracker has already been installed with these ID values.

Parameters
widgetID[IN] the widget associated with this tracker.
toolID[IN] the tool the tracker is associated with.
Returns
bool16 return kTrue if tracker with these ID values, kFalse otherwise.
virtual void ITrackerFactory::InstallTracker (ClassID widgetID,
ClassID toolID,
ClassID trackerID 
)
pure virtual

Install a tracker with the indicated widgetID and toolID. These can be any ID values and are not required to be IDs of actual widgets or tools.

Parameters
widgetID[IN] the widget associated with this tracker.
toolID[IN] the tool the tracker is associated with. If not associated with a toolbox tool (e.g. a widget tracker) just use the same value as widgetID.
trackerID[IN] the boss ID for the tracker.
virtual ITracker* ITrackerFactory::QueryTracker (ClassID widgetID,
ClassID toolID 
)
pure virtual

Returns an instantiated tracker if registered

Parameters
widgetID[IN] the widget associated with this tracker.
toolID[IN] the tool the tracker is associated with.
Returns
ITracker* return a bumped reference to the tracker. May return nil.
virtual void ITrackerFactory::RemoveTracker (ClassID widgetID,
ClassID toolID 
)
pure virtual

Remove the tracker if it exists

Parameters
widgetID[IN] the widget associated with this tracker.
toolID[IN] the tool the tracker is associated with.
virtual void ITrackerFactory::Startup ()
pure virtual

Registers all trackers for classes that implement the ITrackerRegister interface