24 #ifndef __ISplineUIUtils__ 25 #define __ISplineUIUtils__ 27 #include "SplineUIID.h" 28 #include "IPMUnknown.h" 32 #include "PMPathPoint.h" 34 #include "HitTestDragConstants.h" 35 #include "CursorSpec.h" 36 #include "ISplineState.h" 43 #define kInvalidParameter -1.0 //valid values for spline curve parameter are 0 <= u <= 1.0 46 const bool16 kUpdateMotion = kTrue;
47 const bool16 kDontUpdateMotion = kFalse;
48 const bool16 kDeleteMotion = kTrue;
49 const bool16 kDontDeleteMotion = kFalse;
58 enum { kDefaultIID = IID_ISPLINEUIUTILS };
62 kDontCheckSelection = 0,
89 const UIDRef& pathItem = UIDRef::gNull,
90 const UIDRef& motionItem = UIDRef::gNull,
91 const UIDRef& motionOwnerItem = UIDRef::gNull,
93 int32 pointIndex = -1,
94 bool16 bUpdateMotionItem = kUpdateMotion,
95 bool16 bDeleteMotionItem = kDeleteMotion,
96 bool16 bScheduleCmd = kFalse) = 0;
100 virtual bool16 HitTestCurrentPathBeginPoint(
const SysPoint& globalLocation ) = 0;
102 virtual bool16 HitTestCurrentPathEndPoint(
const SysPoint& globalLocation ) = 0;
104 virtual bool16 HitTestOtherPathEndPoints(
const SysPoint& globalLocation,
106 int32* pathIndex = nil,
107 int32* pointIndex = nil ) = 0;
109 virtual bool16 HitTestAnyPathEndPoints(
const SysPoint& globalLocation,
111 int32* pathIndex = nil,
112 int32* pointIndex = nil,
114 bool16 allVisibleSpreads = kTrue,
115 int32 tolerance = kHitTestTolerance) = 0;
117 virtual bool16 HitTestAnyPathMidPoints(
const SysPoint& globalLocation,
118 CheckOption checkOpt,
120 int32* pathIndex = nil,
121 int32* pointIndex = nil,
123 bool16 allVisibleSpreads = kTrue ) = 0;
125 virtual bool16 HitTestAnyPathPoints(
const SysPoint& globalLocation,
126 CheckOption checkOpt,
128 int32* pathIndex = nil,
129 int32* pointIndex = nil,
131 bool16 allVisibleSpreads = kTrue,
132 int32 tolerance = kHitTestTolerance) = 0;
134 virtual bool16 HitTestAnyPathHandles(
const SysPoint& globalLocation,
135 CheckOption checkOpt,
139 bool16 allVisibleSpreads = kTrue,
140 bool16 testTextFrameHandles = kFalse ) = 0;
142 virtual bool16 HitTestAnyPathSegments(
const SysPoint& globalLocation,
143 CheckOption checkOpt,
145 int32* pathIndex = nil,
146 int32* segmentIndex = nil,
147 PMReal* curveParameter = nil,
149 bool16 allVisibleSpreads = kTrue,
150 int32 tolerance = kHitTestTolerance) = 0;
153 virtual bool16 HitTestPathEndPoints(
const SysPoint& globalLocation,
IPMUnknown* pageItem, int32* pathIndex, int32* pointIndex, int32 tolerance = kHitTestTolerance ) = 0;
154 virtual bool16 HitTestPathMidPoints(
const SysPoint& globalLocation,
IPMUnknown* pageItem, int32* pathIndex, int32* pointIndex ) = 0;
155 virtual bool16 HitTestPathPoints(
const SysPoint& globalLocation,
IPMUnknown* pageItem, int32* pathIndex, int32* pointIndex, int32 tolerance = kHitTestTolerance ) = 0;
156 virtual bool16 HitTestPathPoint(
const SysPoint& globalLocation,
const PBPMPathPoint& pathPoint, int32 tolerance = kHitTestTolerance ) = 0;
158 virtual bool16 HitTestPathHandle(
const SysPoint& globalLocation,
PBPMPathPoint pathPoint, PathPointIndex& handleHit, int32 tolerance = kHitTestTolerance ) = 0;
159 virtual bool16 HitTestPathSegments(
const SysPoint& globalLocation,
IPMUnknown* pageItem, int32* pathIndex, int32* segmentIndex,
PMReal* curveParameter, int32 tolerance = kHitTestTolerance ) = 0;
161 virtual bool16 HitTestPathFills(
const PBPMPoint& location,
IPMUnknown* pageItem, int32* pathIndex ) = 0;
164 virtual bool16 HitTestPathSegment(
const PBPMPoint& location,
IPMUnknown* pageItem, int32 pathIndex, int32 segmentIndex,
PMReal* curveParameter ) = 0;
165 virtual bool16 HitTestPathSegment(
const PBPMRect& r,
IPMUnknown* pageItem, int32 pathIndex, int32 segmentIndex ) = 0;
170 virtual bool16 HasCenterPoint(
IGeometry* pageItem) = 0;
191 const PMReal& curveParameter,
198 virtual bool16 AnotherAnchorPointIntersects(
const UIDRef& theItem,
const PointSelector& currentPt,
const PBPMRect& pbBounds ) = 0;
201 virtual bool16 IsSplitAllowed(
const UIDRef& item ) = 0;
205 #endif // __ISplineUIUtils__