DIRECTORY ViewerClasses USING [Viewer, ViewerRec]; SampledCurveEdit: CEDAR DEFINITIONS ~ BEGIN Viewer: TYPE ~ ViewerClasses.Viewer; PointKind: TYPE ~ {sample, knot, corner, open}; MarkedPoint: TYPE ~ RECORD [ x, y: REAL, isHeader: BOOLEAN ¬ FALSE, kind: PointKind ]; PointList: TYPE ~ LIST OF MarkedPoint; Trajectory: TYPE ~ PointList; Outline: TYPE ~ LIST OF Trajectory; PointModifier: TYPE = REF PointModifierRep; PointModifierRep: TYPE = RECORD [ pointModifyProc: PointModifyProc, data: REF ]; PointModifyProc: TYPE ~ PROC [self: PointModifier, pointList: PointList, count: INT] RETURNS [changed: BOOLEAN ¬ TRUE, newCount: INT ¬ -1]; RegisterPointModifer: PROC [atom: ATOM, pointModifier: PointModifier]; AddMenuItem: PROC [atom: ATOM]; CopyTrajectory: PROC [trajectory: Trajectory] RETURNS [Trajectory]; MalformedTrajectory: ERROR; CopyOutline: PROC [outline: Outline] RETURNS [Outline]; GetOutline: PROC [viewer: Viewer] RETURNS [Outline]; ObtainOutline: PROC [viewer: Viewer] RETURNS [Outline]; SetOutline: PROC [viewer: Viewer, outline: Outline]; CreateViewer: PROC [info: ViewerClasses.ViewerRec] RETURNS [Viewer]; END. D SampledCurveEdit.mesa Copyright Σ 1986, 1992 by Xerox Corporation. All rights reserved. Michael Plass, January 8, 1986 2:51:47 pm PST sample - the point is a sample along a smooth curve. knot - hint that this is a good place to decompose the curve into pieces. corner - hint to avoid smoothing this spot off. open - used in list headers for open trajectories. Every trajectory has a list head, marked by isHeader=TRUE. For an open trajectory, kind=open in the header, and the coordinates are ignored. For a closed trajectory, the coordinates are a copy of the coordinates in the last sample. No header on this list. The PointModifyProc may alter pointList.rest.first, pointList.rest.rest.first, etc. Note the list begins with the point before the first one to be modified. If newCount >= 0, the selection count is altered. The pointModifyProc will be called with the currently selected points when the viewer receives the specified atom as input from the menu or tip table. Repaints will be managed automatically. Adds a menu item (to the class and all instances) that sends an atom to the notify proc. Returns a copy of the viewer's current outline. Returns the viewer's current outline, and sets it to NIL. Use this when you really don't want to copy, but need ownership of the outline. Sets the outline in the viewer; does NOT copy. Κ~•NewlineDelimiter –"cedarcode" style™™Icodešœ Οeœ6™BJ™-—K˜KšΟk œžœ˜2K˜KšΠlnœžœž ˜#šœž˜K˜Kšœžœ˜$K˜šœ žœ ˜/J™4J™IJ™/J™2K˜—šœ žœžœ˜Kšœžœ˜ Kšœ žœžœ˜Kšœ˜Kšœ˜K˜—Kšœ žœžœžœ ˜&K˜šœ žœ ˜Jšœ5žœ°™ιK˜—šœ žœžœžœ ˜#Jšœ™K˜—Kšœžœžœ˜+šœžœžœ˜!Kšœ!˜!Kšœž˜ K˜K˜—šΟnœžœžœ4žœžœ žœžœ žœ˜‹JšœS™SJ™HJšœ1™1K˜—š œžœžœ ˜FJšœΏ™ΏK˜—š  œžœžœ˜J™XK˜—š œžœžœ˜CKšœžœ˜K˜—š  œžœžœ ˜7K˜—š  œžœžœ ˜4J™/K˜—š  œžœžœ ˜7J™ŠK˜—š  œžœ$˜4J™.K˜—š  œžœ!žœ ˜DK˜——Kšžœ˜—…—| >