GGSliceImplC.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Last edited by Bier on September 30, 1986
Contents: Implementations of NoOp procedures for slices.
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;
NoOp Class Routines
NoOpBoundBox:
PUBLIC SliceBoundBoxProc = {
SIGNAL Problem[msg: "All slice classes must have this proc."];
};
NoOpHitBox: PUBLIC SliceHitBoxProc = {
SIGNAL Problem[msg: "All slice classes must have this proc."];
};
NoOpCopy:
PUBLIC SliceCopyProc = {
SIGNAL Problem[msg: "All slice classes must have this proc."];
};
Drawing
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;
};
};
Transforming
NoOpTransform:
PUBLIC SliceTransformProc = {
SIGNAL Problem[msg: "All slice classes must have this proc."];
};
Textual Description
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;
};
Style
NoOpSetStrokeWidth:
PUBLIC SliceSetStrokeWidthProc = {
SIGNAL Problem [msg: "All slice classes must have this proc."];
};
NoOpGetStrokeWidth:
PUBLIC SliceGetStrokeWidthProc = {
SIGNAL Problem [msg: "All slice classes must have this proc."];
};
NoOpSetStrokeColor:
PUBLIC SliceSetStrokeColorProc = {
SIGNAL Problem [msg: "All slice classes must have this proc."];
};
NoOpGetStrokeColor:
PUBLIC SliceGetStrokeColorProc = {
SIGNAL Problem [msg: "All slice classes must have this proc."];
};
NoOpSetFillColor:
PUBLIC SliceSetFillColorProc = {
SIGNAL Problem [msg: "All slice classes must have this proc."];
};
NoOpGetFillColor:
PUBLIC SliceGetFillColorProc = {
SIGNAL Problem [msg: "All slice classes must have this proc."];
};
NoOpSetArrows:
PUBLIC SliceSetArrowsProc = {
SIGNAL Problem [msg: "All slice classes must have this proc."];
};
NoOpGetArrows:
PUBLIC SliceGetArrowsProc = {
SIGNAL Problem [msg: "All slice classes must have this proc."];
};
END.