DIRECTORY Pipal, PipalEdit, PipalInt, PipalReal; PipalOverlayEditor: CEDAR DEFINITIONS = BEGIN overlayEditorClass: Pipal.Class; OverlayEditor: TYPE = REF OverlayEditorRec; OverlayEditorRec: TYPE = RECORD [ selected: Pipal.Objects _ NIL]; Create: PROC [overlay: Pipal.Overlay] RETURNS [editor: PipalEdit.Editor]; Freeze: PROC [editor: PipalEdit.Editor] RETURNS [overlay: Pipal.Overlay]; Edit: PROC [editor: PipalEdit.Editor]; Select: PROC [editor: PipalEdit.Editor, exclusive: BOOL _ TRUE, remove: BOOL _ FALSE, style: ATOM, pos1: PipalReal.Position, pos2: PipalReal.Position] RETURNS [changedArea: Pipal.Object _ NIL]; InsertInt: PROC [editor: PipalEdit.Editor, child: Pipal.Object, position: PipalInt.Position, selectNew: BOOL _ TRUE]; InsertReal: PROC [editor: PipalEdit.Editor, child: Pipal.Object, position: PipalReal.Position, selectNew: BOOL _ TRUE]; Delete: PROC [editor: PipalEdit.Editor] RETURNS [changedArea: Pipal.Object _ NIL]; END. άPipalOverlayEditor.mesa Copyright Σ 1988 by Xerox Corporation. All rights reserved. Barth, January 28, 1988 5:34:41 pm PST Louis Monier February 2, 1988 11:30:04 am PST Bertrand Serlet January 31, 1988 6:42:44 pm PST Theory Pipal overlay editor. Understands PipalInt.transformClass, PipalInt.translationClass, PipalInt.orientClass, and PipalReal.transformClass. All other objects are treated as primitives which may be pushed into if they have an edit method. Class Basic Operations Make an editor object. Makes an overlay which reflects all actions since Create. Checks that the selection set has a cardinality of one, passes through the child pointers of all classes which this editor understands, checks that the resultant object has an edit method, and then invokes it. Errors: noSelection, multipleSelections, noEditMethod Selection Commands: name -> $Select arguments -> ({$Add, $Exclusive}, {$Select, $Deselect}, {$Point, $Area, $Touch, $Close}, Position, Size) resultType <- changedArea name -> $SelectedOutlines resultType <- selectionArea Object Manipulation Insert the child into the overlay at the specified position. Delete the selected items, empty the selection set. Transformations TransformInt: PROC [editor: PipalEdit.Editor, transformation: PipalInt.Transformation]; TransformReal: PROC [editor: PipalEdit.Editor, transformation: PipalReal.Transformation]; Transforms the selected set. TranslateInt: PROC [editor: PipalEdit.Editor, vector: PipalInt.Vector]; TranslateReal: PROC [editor: PipalEdit.Editor, vector: PipalReal.Vector]; Translates the selected set. Rotate: PROC [editor: PipalEdit.Editor]; Rotates the selected set by 90 degrees. Mirror: PROC [editor: PipalEdit.Editor, inX: BOOL]; Mirrors the selected set. Κ)˜– "Cedar" stylešœ™Jšœ<™