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

#include <ISplineUIUtils.h>

Inheritance diagram for ISplineUIUtils:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ISPLINEUIUTILS }
 
enum  CheckOption { kDontCheckSelection = 0, kDoCheckSelection, kOnlyCheckSelection, kExcludeSelection }
 

Public Member Functions

virtual ISplineState::SplineState GetSplineState (IControlView *view=nil)=0
 
virtual ErrorCode SetSplineState (const UIDRef &document, IControlView *view=nil, const UIDRef &pathItem=UIDRef::gNull, const UIDRef &motionItem=UIDRef::gNull, const UIDRef &motionOwnerItem=UIDRef::gNull, int32 pathIndex=-1, int32 pointIndex=-1, bool16 bUpdateMotionItem=kUpdateMotion, bool16 bDeleteMotionItem=kDeleteMotion, bool16 bScheduleCmd=kFalse)=0
 
virtual ISplineStateQueryDocSplineState (IControlView *view=nil)=0
 
virtual bool16 HitTestCurrentPathBeginPoint (const SysPoint &globalLocation)=0
 
virtual bool16 HitTestCurrentPathEndPoint (const SysPoint &globalLocation)=0
 
virtual bool16 HitTestOtherPathEndPoints (const SysPoint &globalLocation, UIDRef *pathItem=nil, int32 *pathIndex=nil, int32 *pointIndex=nil)=0
 
virtual bool16 HitTestAnyPathEndPoints (const SysPoint &globalLocation, UIDRef *pathItem=nil, int32 *pathIndex=nil, int32 *pointIndex=nil, int32 hitTestFlags=IShape::kDirectSelect, bool16 allVisibleSpreads=kTrue, int32 tolerance=kHitTestTolerance)=0
 
virtual bool16 HitTestAnyPathMidPoints (const SysPoint &globalLocation, CheckOption checkOpt, UIDRef *pathItem=nil, int32 *pathIndex=nil, int32 *pointIndex=nil, int32 hitTestFlags=IShape::kDirectSelect, bool16 allVisibleSpreads=kTrue)=0
 
virtual bool16 HitTestAnyPathPoints (const SysPoint &globalLocation, CheckOption checkOpt, UIDRef *pathItem=nil, int32 *pathIndex=nil, int32 *pointIndex=nil, int32 hitTestFlags=IShape::kDirectSelect, bool16 allVisibleSpreads=kTrue, int32 tolerance=kHitTestTolerance)=0
 
virtual bool16 HitTestAnyPathHandles (const SysPoint &globalLocation, CheckOption checkOpt, UIDRef *pathItem, PointSelector *selector, int32 hitTestFlags=IShape::kDirectSelect, bool16 allVisibleSpreads=kTrue, bool16 testTextFrameHandles=kFalse)=0
 
virtual bool16 HitTestAnyPathSegments (const SysPoint &globalLocation, CheckOption checkOpt, UIDRef *pathItem=nil, int32 *pathIndex=nil, int32 *segmentIndex=nil, PMReal *curveParameter=nil, int32 hitTestFlags=IShape::kDirectSelect, bool16 allVisibleSpreads=kTrue, int32 tolerance=kHitTestTolerance)=0
 
virtual bool16 HitTestPathEndPoints (const SysPoint &globalLocation, IPMUnknown *pageItem, int32 *pathIndex, int32 *pointIndex, int32 tolerance=kHitTestTolerance)=0
 
virtual bool16 HitTestPathMidPoints (const SysPoint &globalLocation, IPMUnknown *pageItem, int32 *pathIndex, int32 *pointIndex)=0
 
virtual bool16 HitTestPathPoints (const SysPoint &globalLocation, IPMUnknown *pageItem, int32 *pathIndex, int32 *pointIndex, int32 tolerance=kHitTestTolerance)=0
 
virtual bool16 HitTestPathPoint (const SysPoint &globalLocation, const PBPMPathPoint &pathPoint, int32 tolerance=kHitTestTolerance)=0
 
virtual bool16 HitTestPathHandles (const SysPoint &globalLocation, IPMUnknown *pageItem, PointSelector *selector)=0
 
virtual bool16 HitTestPathHandle (const SysPoint &globalLocation, PBPMPathPoint pathPoint, PathPointIndex &handleHit, int32 tolerance=kHitTestTolerance)=0
 
virtual bool16 HitTestPathSegments (const SysPoint &globalLocation, IPMUnknown *pageItem, int32 *pathIndex, int32 *segmentIndex, PMReal *curveParameter, int32 tolerance=kHitTestTolerance)=0
 
virtual bool16 HitTestPathFills (const PBPMPoint &location, IPMUnknown *pageItem, int32 *pathIndex)=0
 
virtual bool16 HitTestPathSegment (const PBPMPoint &location, IPMUnknown *pageItem, int32 pathIndex, int32 segmentIndex, PMReal *curveParameter)=0
 
virtual bool16 HitTestPathSegment (const PBPMRect &r, IPMUnknown *pageItem, int32 pathIndex, int32 segmentIndex)=0
 
virtual bool16 HasCenterPoint (IGeometry *pageItem)=0
 
virtual bool16 HitTestCenterPoint (IControlView *view, IGeometry *pageItem, const PBPMPoint &where, int16 tolerance)=0
 
virtual void GetRotationCursor (const PBPMPoint &where, const PBPMPoint &centerPoint, CursorSpec &spec)=0
 
virtual void GetNewPathPoints (IPathGeometry *pathGeom, int32 pathIndex, int32 pointIndex, const PMReal &curveParameter, PBPMPathPoint &newPathPtBefore, PBPMPathPoint &newPathPtAt, PBPMPathPoint &newPathPtAfter)=0
 
virtual bool16 AnotherAnchorPointIntersects (const UIDRef &theItem, const PointSelector &currentPt, const PBPMRect &pbBounds)=0
 
virtual bool16 IsSplitAllowed (const UIDRef &item)=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

UI-related utilities for creating splines, mostly used by spline tool.

See Also
ISplineState.h

Member Function Documentation

virtual void ISplineUIUtils::GetRotationCursor (const PBPMPointwhere,
const PBPMPointcenterPoint,
CursorSpecspec 
)
pure virtual

Given and point and a center reference point, compute a cursor. Used in conjunction with handle hittesting to return a cursor that indicates that a handle will rotate around a center point.

Parameters
where[IN] Pasteboard coordinates of point to test. Typically the point that hits a handle.
centerPoint[IN] Pasteboard coordinates of point to rotate around. Typically the center point of the selection.
spec[OUT] The cursor spec for the rotation cursor.
virtual ISplineState::SplineState ISplineUIUtils::GetSplineState (IControlViewview = nil)
pure virtual

Return state of spline tool creation/editing

Parameters
nilcontrol view to check (will check the document corresponding to this view)
Returns
SplineState enum value, can be kOff, kCreation, kMotion
virtual ErrorCode ISplineUIUtils::SetSplineState (const UIDRefdocument,
IControlViewview = nil,
const UIDRefpathItem = UIDRef::gNull,
const UIDRefmotionItem = UIDRef::gNull,
const UIDRefmotionOwnerItem = UIDRef::gNull,
int32 pathIndex = -1,
int32 pointIndex = -1,
bool16 bUpdateMotionItem = kUpdateMotion,
bool16 bDeleteMotionItem = kDeleteMotion,
bool16 bScheduleCmd = kFalse 
)
pure virtual

Fire a command to set the document in edit/creation state (SplineTool) if values are passed, or to turn off spline edit/creation state if all default values are used.

Parameters
documentthe document to use
view,thecontrol view to check
pathItemwhich page item and is being modified
motionItemwhich motion page item and is being modified
motionOwnerItemwhich item does the motion page item belong to
pathIndexthe index of the path on the pathItem that is being modified
pointIndexthe index of the point being modified
bUpdateMotionItemkTrue to take motion item points an store back to main item, kFalse to skip this. When motionItem us UIDRef::gNull, uses previous motion item to update animation data.
bDeleteMotionItemkTrue to delete motion item, kFalse to leave it. When motionItem us UIDRef::gNull, deletes any previous motion item.
Returns
ErrorCode, the result of the ProcessCommand to change the spline state.