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

#include <CPathCreationTracker.h>

Inheritance diagram for CPathCreationTracker:
CTrackerITrackerIPMUnknownWaveTrackerSawWaveTrackerSineWaveTracker

Public Types

enum  CursorOptions {
  kDefaultCursor = 0, kShowWidthHeight, kShowXPosition, kShowYPosition,
  kShowXYPosition, kShowLineLength, kShowScale
}
 

Public Member Functions

 CPathCreationTracker (IPMUnknown *boss)
 
virtual ~CPathCreationTracker ()
 
virtual bool16 BeginTracking (IEvent *theEvent)
 
virtual void ContinueTracking (const PBPMPoint &where, bool16 mouseDidMove)
 
virtual bool16 EndTracking (IEvent *theEvent)
 
virtual void AbortTracking (IEvent *theEvent)
 
- Public Member Functions inherited from CTracker
 CTracker (IPMUnknown *boss)
 
virtual void SetupTracker (IControlView *theControlView, ISnapTo *theSnapper=NULL, IItemContext *context=NULL)
 
virtual IControlViewQueryControlView () const
 
virtual bool16 IsEnabled ()
 
virtual bool16 IsTracking ()
 
virtual void EnableTracking ()
 
virtual void DisableTracking ()
 
virtual void HandleContinueTracking (const GSysPoint &where)
 
virtual void TimerMessage (int32 flags)
 
virtual bool16 WantTimer (ClassID trackerTimerBoss)
 
- Public Member Functions inherited from ITracker
void SetupTracker (IControlView *theControlView)
 
void SetupSpecialTracker (IControlView *theControlView, ISnapTo *theSnapper, IItemContext *context)
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Protected Member Functions

virtual void CleanupTracking ()
 
virtual CursorOptions GetCursorOption (void) const
 
virtual void HandleMove (PMPoint &where)
 
virtual PMPoint AutoScroll (const PMPoint &scrollBy, const PMPoint &scrolledPoint)
 
virtual void MakePath (const PMPoint &startPt, const PMPoint &endPoint, IPathGeometry *pathGeometry)
 
virtual void ShiftConstrainPoint (PMPoint &where)
 
virtual bool16 MovedMinimumDistance (const PBPMPoint &newLocation)
 
virtual bool16 IsGraphicFrame ()
 
virtual void ProcessAdditionalCreationCommands (const UIDRef &newItem, const UIDRef &parent, const PMPointList &points, IPlaceBehavior::eAfterPlace afterPlace)
 
virtual UIDRef CreatePageItem (const UIDRef &parent, const PMPointList &points, const IEvent &theEvent, IPlaceBehavior::eAfterPlace *afterPlace=nil)
 
virtual void SetBoundingBox (const UIDRef &newItem, const UIDRef &parent, const PMPointList &points)
 
virtual void AddToHierarchy (const UIDRef &parent, const UIDRef &newItem)
 
virtual void ProcessAdditionalSelectionCommands (const UIDRef &newItem)
 
virtual void ProcessAddToSelectionCommand (IControlView *view, const UIDRef &newItem)
 
virtual void CompletelyCreateItem (IEvent *theEvent)
 
virtual bool16 SufficientSize (const PMPointList &points)
 
virtual void ConvertToPasteboardConstrained (PMPoint thePoint, PMPoint &convertedPoint)
 
virtual void ConvertToPasteboardConstrained (GSysPoint thePoint, PMPoint &convertedPoint)
 
virtual void SetUpParentTransforms (PMPoint *endPoint)
 
virtual UIDRef GetParent ()
 
virtual void CheckSmartDimensions (PBPMPoint &endPoint, PBPMPoint &startPoint, SnapType &snapType, const IControlView *view)
 
virtual Geometry::BoundsKind GetPathCreationBoundsKind ()
 
- Protected Member Functions inherited from CTracker
virtual void Initialize (IEvent *theEvent)
 
virtual bool16 DoBeginTracking (IEvent *theEvent)
 
virtual bool16 DoEndTracking (IEvent *theEvent)
 
virtual void NotifyBeginTracking (const PMPoint &startPt, IDynamicTrackerData::TrackingEffect effect=IDynamicTrackerData::kUnknown)
 
virtual void NotifyContinueTracking (const PMPoint &startPt, const PMPoint &endPoint, IDynamicTrackerData::TrackingEffect effect=IDynamicTrackerData::kUnknown)
 
virtual void NotifyEndTracking (const PMPoint &startPt, const PMPoint &endPoint, IDynamicTrackerData::TrackingEffect effect=IDynamicTrackerData::kUnknown)
 
virtual
IDynamicTrackerData::TrackingEffect 
GetTrackingEffect (IDynamicTrackerData::TrackingState state)
 
virtual void PushEventHandler ()
 
virtual void PopEventHandler ()
 
virtual bool16 WantsToAutoScroll (const PMPoint &currentPoint)
 
virtual void GlobalToPasteboard (const GSysPoint &thePoint, PBPMPoint &convertedPoint)
 
virtual PMPoint PasteboardToGlobal (const PBPMPoint &pbPoint)
 
virtual IPanoramaQueryPanorama (IControlView *pView) const
 
virtual void DisableUpdates ()
 
virtual void EnableUpdates ()
 
void DeselectAllItems ()
 
virtual void ComputeAdjustedPoint (PMPoint &adjustedPoint)
 
void InitializeModalCursor ()
 
void ChangeModalCursor (const CursorSpec &spec)
 
void UpdateModalCursor ()
 
void ReleaseModalCursor ()
 
virtual uint32 GetMouseMoveDelay ()
 
virtual uint32 GetMouseSteadyDelay ()
 
virtual bool16 AdjustPoint (PBPMPoint &point)
 
void StartTimer (ClassID trackerTimerBoss, uint32 milliSeconds, uint32 mouseMoveDelay=kDefaultMouseMoveDelay, uint32 mouseSteadyDelay=kDefaultMouseSteadyDelay)
 
void StopTimer (ClassID trackerTimerBoss)
 
bool16 GetTimerFlags ()
 
void SetTimerFlags (int32 flags)
 
uint32 GetElapsedTime ()
 
virtual IDataBaseGetTrackingDataBase () const
 

Protected Attributes

ClassID fClassID
 
PMPoint fStartPnt
 
PMPoint fStartGlobalPt
 
PMRect fPasteBoardBoundaries
 
PMRect fPasteBoardBoundsSpreadCoordinates
 
bool16 fShiftKeyPressed
 
bool16 fShownFirstTime
 
bool16 fOptionAltKeyPressed
 
bool16 fCmdCtrlKeyPressed
 
bool16 fCreatingFromCenter
 
PMMatrix fSpreadToPasteboardMatrix
 
PMMatrix fPasteboardToSpreadMatrix
 
PMMatrix fTransformMatrix
 
PMMatrix fBackTransformMatrix
 
IAbortableCmdSeqfTrackerSequence
 
PMRect fGraphicBBox
 
bool32 fCreateMultiple
 
int32 fRows
 
int32 fColumns
 
- Protected Attributes inherited from CTracker
IControlViewfControlView
 
IDataBasefDataBase
 
IItemContext * fItemContext
 
ISnapTofSnapTo
 
SnapType fSnapType
 
bool16 fIsTracking
 
bool16 fWantsToAutoScroll
 
PMPoint fPreviousPoint
 
PMPoint fFirstPoint
 
GSysPoint fFirstGlobalWhere
 
uint32 fFirstTicks
 
bool16 fEnabled
 
IRulerDatafHorzRuler
 
IRulerDatafVertRuler
 
AcquireModalCursorfModalCursor
 
AutoBusyCursorfAutoBusyCursor
 
uint32 fOldSchedulerMask
 
int32 fTimerFlags
 
K2Vector< ITrackerTimer * > fTimerPtrs
 

Static Protected Attributes

static PMReal fHSpacing
 
static PMReal fVSpacing
 

Additional Inherited Members

- Static Protected Member Functions inherited from CTracker
static void DeactivatePageItem ()
 

Detailed Description

Tracker for creating new page items. This tracker has the ability to create a grid of items when the user presses the arrow keys to increase the number of rows or columns in the grid. To enable this functionality, the tracker's boss must contain the following 2 interfaces: IID_ITRACKERKEYDATA, kIntDataImpl, // Used for storing key presses in event handler so tracker can access for altering polygon sides and star inset or grid attributes IID_IDYNAMICTRACKERDATA, kDynamicTrackerDataImpl, // Used for storing information about the grid and other dynamic information IID_ISPRITE, kNoHandleSpriteImpl, You could, of course, implement your own versions of any of these interfaces. However, these particular ones are already 'grid' savy.

Constructor & Destructor Documentation

CPathCreationTracker::CPathCreationTracker (IPMUnknownboss)

Constructor

Parameters
bossrefers to object on which this interface is aggregated
virtual CPathCreationTracker::~CPathCreationTracker ()
virtual

Destructor.

Member Function Documentation

virtual void CPathCreationTracker::AbortTracking (IEventtheEvent)
virtual

Immediately terminate tracking.

Parameters
theEventevent associated

Reimplemented from CTracker.

virtual void CPathCreationTracker::AddToHierarchy (const UIDRefparent,
const UIDRefnewItem 
)
protectedvirtual

Clients should override this method if they want a different behavior for adding to the hierarchy

Parameters
parent
newItem
virtual PMPoint CPathCreationTracker::AutoScroll (const PMPointscrollBy,
const PMPointscrolledPoint 
)
protectedvirtual
Parameters
scrollBy
scrolledPoint

Reimplemented from CTracker.

virtual bool16 CPathCreationTracker::BeginTracking (IEventtheEvent)
virtual

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

Parameters
theEventevent associated

Reimplemented from CTracker.

virtual void CPathCreationTracker::CheckSmartDimensions (PBPMPointendPoint,
PBPMPointstartPoint,
SnapType & snapType,
const IControlViewview 
)
protectedvirtual

This method is called from ConvertToPasteboardConstrained() to do SmartDimensions snapping.

virtual void CPathCreationTracker::CleanupTracking ()
protectedvirtual

Destroy sprite and do general cleanup for EndTracking and AbortTracking cases.

virtual void CPathCreationTracker::CompletelyCreateItem (IEventtheEvent)
protectedvirtual

Do the whole thing - typically not overridden

Parameters
theEvent
virtual void CPathCreationTracker::ContinueTracking (const PBPMPointwhere,
bool16 mouseDidMove 
)
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
wherelocation of mouse
mouseDidMovespecifies whether mouse-move event is behind this call

Reimplemented from CTracker.

virtual UIDRef CPathCreationTracker::CreatePageItem (const UIDRefparent,
const PMPointListpoints,
const IEventtheEvent,
IPlaceBehavior::eAfterPlaceafterPlace = nil 
)
protectedvirtual

Clients should override this method if the item is not a kSplineItemBoss

Parameters
parent
virtual bool16 CPathCreationTracker::EndTracking (IEventtheEvent)
virtual

Called when tracking is completed. Clean up any loose ends and post any dynamic commands.

Parameters
theEventevent associated

Reimplemented from CTracker.

virtual CursorOptions CPathCreationTracker::GetCursorOption (void ) const
protectedvirtual

Override this method to make the cursor show dynamic metric info.

virtual void CPathCreationTracker::HandleMove (PMPointwhere)
protectedvirtual
Parameters
where
virtual bool16 CPathCreationTracker::IsGraphicFrame ()
protectedvirtual

Clients should override this and return kTrue if they want to be graphic frames

virtual void CPathCreationTracker::MakePath (const PMPointstartPt,
const PMPointendPoint,
IPathGeometrypathGeometry 
)
protectedvirtual
Parameters
startPt
endPoint
pathGeometry

Reimplemented in SawWaveTracker, and SineWaveTracker.

virtual bool16 CPathCreationTracker::MovedMinimumDistance (const PBPMPointnewLocation)
protectedvirtual

Returns kTrue if the distance between the first screen point and the most recent screen point is greater than the min drag distance. The pb point here gets converted to global coordinates inside the method.

Parameters
newLocation
Returns
kTrue if the distance between the first screen point and the most recent screen point is greater than the min drag distance, kFalse otherwise
virtual void CPathCreationTracker::ProcessAdditionalCreationCommands (const UIDRefnewItem,
const UIDRefparent,
const PMPointListpoints,
IPlaceBehavior::eAfterPlace afterPlace 
)
protectedvirtual

Clients should override this method if the client needs to perform special additional commands.

virtual void CPathCreationTracker::ProcessAdditionalSelectionCommands (const UIDRefnewItem)
protectedvirtual

Clients should override this method if client needs special selection (i.e. no selection). By default, path item created will be selected. Note that this method will not be called if in grid mode (i.e. we are creating multiple items in this one tracking session.)

Parameters
newItem
virtual void CPathCreationTracker::ProcessAddToSelectionCommand (IControlViewview,
const UIDRefnewItem 
)
protectedvirtual

Clients should override this method if client needs special selection (i.e. no selection). when in 'grid' mode (i.e. we are creating multiple items in this one tracking session.) By default, this method will perform a layout selection on all newly created page items.

Parameters
newItem
virtual void CPathCreationTracker::SetBoundingBox (const UIDRefnewItem,
const UIDRefparent,
const PMPointListpoints 
)
protectedvirtual

Clients should override this method if the client needs to make the item a special size. By default a SetBoundingBoxCmd is issued to set the stroke bounding box to be 'points'.

Parameters
newItem
parent
points

Reimplemented in WaveTracker.

virtual void CPathCreationTracker::ShiftConstrainPoint (PMPointwhere)
protectedvirtual
Parameters
where

Reimplemented in WaveTracker.

virtual bool16 CPathCreationTracker::SufficientSize (const PMPointListpoints)
protectedvirtual

Gives the chance to restrict creation. Must be true to create. Default returns true if both points are not equal.

Parameters
points
Returns
kTrue