<> <> <> <> <<>> DIRECTORY GGError, GGModelTypes, GGShapes, GGSlice, Rope; GGSliceImplC: CEDAR PROGRAM IMPORTS GGError, GGShapes EXPORTS GGSlice = BEGIN PointGenerator: TYPE = GGModelTypes.PointGenerator; PointPairGenerator: TYPE = GGModelTypes.PointPairGenerator; Slice: TYPE = GGModelTypes.Slice; SliceDescriptor: TYPE = GGModelTypes.SliceDescriptor; SliceBoundBoxProc: TYPE = GGModelTypes.SliceBoundBoxProc; SliceCopyProc: TYPE = GGModelTypes.SliceCopyProc; SliceDrawPartsProc: TYPE = GGModelTypes.SliceDrawPartsProc; SliceDrawTransformProc: TYPE = GGModelTypes.SliceDrawTransformProc; SliceDrawSelectionFeedbackProc: TYPE = GGModelTypes.SliceDrawSelectionFeedbackProc; SliceDrawAttractorFeedbackProc: TYPE = GGModelTypes.SliceDrawAttractorFeedbackProc; SliceTransformProc: TYPE = GGModelTypes.SliceTransformProc; SliceDescribeProc: TYPE = GGModelTypes.SliceDescribeProc; SliceFileoutProc: TYPE = GGModelTypes.SliceFileoutProc; SliceFileinProc: TYPE = GGModelTypes.SliceFileinProc; SliceEmptyPartsProc: TYPE = GGModelTypes.SliceEmptyPartsProc; SliceNewPartsProc: TYPE = GGModelTypes.SliceNewPartsProc; SliceUnionPartsProc: TYPE = GGModelTypes.SliceUnionPartsProc; SliceDifferencePartsProc: TYPE = GGModelTypes.SliceDifferencePartsProc; SliceMovingPartsProc: TYPE = GGModelTypes.SliceMovingPartsProc; SliceFixedPartsProc: TYPE = GGModelTypes.SliceFixedPartsProc; SliceAugmentPartsProc: TYPE = GGModelTypes.SliceAugmentPartsProc; SlicePointsInDescriptorProc: TYPE = GGModelTypes.SlicePointsInDescriptorProc; SlicePointPairsInDescriptorProc: TYPE = GGModelTypes.SlicePointPairsInDescriptorProc; SliceNextPointProc: TYPE = GGModelTypes.SliceNextPointProc; SliceNextPointPairProc: TYPE = GGModelTypes.SliceNextPointPairProc; SliceClosestPointProc: TYPE = GGModelTypes.SliceClosestPointProc; SliceClosestPointAndTangentProc: TYPE = GGModelTypes.SliceClosestPointAndTangentProc; SliceClosestSegmentProc: TYPE = GGModelTypes.SliceClosestSegmentProc; SliceLineIntersectionProc: TYPE = GGModelTypes.SliceLineIntersectionProc; SliceCircleIntersectionProc: TYPE = GGModelTypes.SliceCircleIntersectionProc; SliceHitDataAsSimpleCurveProc: TYPE = GGModelTypes.SliceHitDataAsSimpleCurveProc; SliceSetStrokeWidthProc: TYPE = GGModelTypes.SliceSetStrokeWidthProc; SliceGetStrokeWidthProc: TYPE = GGModelTypes.SliceGetStrokeWidthProc; SliceSetStrokeColorProc: TYPE = GGModelTypes.SliceSetStrokeColorProc; SliceGetStrokeColorProc: TYPE = GGModelTypes.SliceGetStrokeColorProc; SliceSetFillColorProc: TYPE = GGModelTypes.SliceSetFillColorProc; SliceGetFillColorProc: TYPE = GGModelTypes.SliceGetFillColorProc; SliceSetArrowsProc: TYPE = GGModelTypes.SliceSetArrowsProc; SliceGetArrowsProc: TYPE = GGModelTypes.SliceGetArrowsProc; Problem: PUBLIC SIGNAL [msg: Rope.ROPE] = GGError.Problem; <> <<>> NoOpBoundBox: PUBLIC SliceBoundBoxProc = { SIGNAL Problem[msg: "All slice classes must have this proc."]; }; <> <> <<};>> NoOpCopy: PUBLIC SliceCopyProc = { SIGNAL Problem[msg: "All slice classes must have this proc."]; }; <> <<>> NoOpDrawParts: PUBLIC SliceDrawPartsProc = { SIGNAL Problem[msg: "All slice classes must have this proc."]; }; NoOpDrawTransform: PUBLIC SliceDrawTransformProc = { SIGNAL Problem[msg: "All slice classes must have this proc."]; }; NoOpDrawSelectionFeedback: PUBLIC SliceDrawSelectionFeedbackProc = { SIGNAL Problem[msg: "All slice classes must have this proc."]; }; NoOpDrawAttractorFeedback: PUBLIC SliceDrawAttractorFeedbackProc = { slice: Slice _ sliceD.slice; pointGen: GGModelTypes.PointGenerator; IF dragInProgress AND selectedParts # NIL THEN {} ELSE { pointGen _ slice.class.pointsInDescriptor[sliceD]; FOR pointAndDone: GGModelTypes.PointAndDone _ slice.class.nextPoint[pointGen], slice.class.nextPoint[pointGen] UNTIL pointAndDone.done DO GGShapes.DrawCP[dc, pointAndDone.point]; ENDLOOP; }; }; <> <<>> NoOpTransform: PUBLIC SliceTransformProc = { SIGNAL Problem[msg: "All slice classes must have this proc."]; }; <> <<>> NoOpDescribe: PUBLIC SliceDescribeProc = { SIGNAL Problem [msg: "All slice classes must have this proc."]; }; NoOpFileout: PUBLIC SliceFileoutProc = { SIGNAL Problem [msg: "All slice classes must have this proc."]; }; NoOpFilein: PUBLIC SliceFileinProc = { SIGNAL Problem [msg: "All slice classes must have this proc."]; }; NoOpEmptyParts: PUBLIC SliceEmptyPartsProc = { SIGNAL Problem [msg: "All slice classes must have this proc."]; RETURN[TRUE]; }; NoOpNewParts: PUBLIC SliceNewPartsProc = { SIGNAL Problem [msg: "All slice classes must have this proc."]; }; NoOpUnionParts: PUBLIC SliceUnionPartsProc = { SIGNAL Problem [msg: "All slice classes must have this proc."]; }; NoOpDifferenceParts: PUBLIC SliceDifferencePartsProc = { SIGNAL Problem [msg: "All slice classes must have this proc."]; }; NoOpMovingParts: PUBLIC SliceMovingPartsProc = { SIGNAL Problem [msg: "All slice classes must have this proc."]; }; NoOpFixedParts: PUBLIC SliceFixedPartsProc = { SIGNAL Problem [msg: "All slice classes must have this proc."]; }; NoOpAugmentParts: PUBLIC SliceAugmentPartsProc = { SIGNAL Problem [msg: "All slice classes must have this proc."]; }; NoOpPointsInDescriptor: PUBLIC PROC [sliceD: SliceDescriptor] RETURNS [pointGen: PointGenerator] = { pointGen _ NIL; }; NoOpPointPairsInDescriptor: PUBLIC PROC [sliceD: SliceDescriptor] RETURNS [pointPairGen: PointPairGenerator] = { pointPairGen _ NIL; }; NoOpNextPoint: PUBLIC PROC [pointGen: PointGenerator] RETURNS [pointAndDone: GGModelTypes.PointAndDone] = { pointAndDone.done _ TRUE; }; NoOpNextPointPair: PUBLIC PROC [pointPairGen: PointPairGenerator] RETURNS [pointPairAndDone: GGModelTypes.PointPairAndDone] = { pointPairAndDone.done _ TRUE; }; NoOpClosestPoint: PUBLIC SliceClosestPointProc = { SIGNAL Problem [msg: "All slice classes must have this proc."]; }; NoOpClosestPointAndTangent: PUBLIC SliceClosestPointAndTangentProc = { SIGNAL Problem [msg: "All slice classes must have this proc."]; }; NoOpClosestSegment: PUBLIC SliceClosestSegmentProc = { SIGNAL Problem [msg: "All slice classes must have this proc."]; }; NoOpLineIntersection: PUBLIC SliceLineIntersectionProc = { points _ NIL; pointCount _ 0; }; NoOpCircleIntersection: PUBLIC SliceCircleIntersectionProc = { points _ NIL; pointCount _ 0; }; NoOpHitDataAsSimpleCurve: PUBLIC SliceHitDataAsSimpleCurveProc = { simpleCurve _ NIL; }; <