DIRECTORY DB USING[Entity, Domain, Attribute, Segment], Nut USING [CreateProc, UpdateProc], Rope USING [ROPE], ViewerClasses USING [PaintProc, Viewer, ViewerFlavor]; Whiteboard: CEDAR DEFINITIONS = BEGIN OPEN Rope; PaintRelships: ViewerClasses.PaintProc; -- paint the relships between icons PaintIcon: ViewerClasses.PaintProc; -- paint an icon PaintIconic: ViewerClasses.PaintProc; AddTextBox: PROCEDURE[wb: ViewerClasses.Viewer, e: DB.Entity, x, y, w, h: INTEGER] RETURNS[child: ViewerClasses.Viewer]; AddIcon: PROCEDURE[wb, viewer: ViewerClasses.Viewer, name: ROPE, x, y: INTEGER] RETURNS[child: ViewerClasses.Viewer]; RemoveChild: PROCEDURE[wb, child: ViewerClasses.Viewer]; GetGrid: PROC[ wb: ViewerClasses.Viewer ] RETURNS[ grid: NAT ]; SetGrid: PROC[ wb: ViewerClasses.Viewer, grid: NAT ]; ShowLines: PROCEDURE[wb: ViewerClasses.Viewer, show: BOOLEAN]; UpdateRelships: Nut.UpdateProc; -- watch relships being created/destroyed GetBinaryProperties: PROCEDURE[e: DB.Entity] RETURNS[LIST OF BinaryProperty]; BinaryProperty: TYPE = RECORD[of, is: DB.Entity, name: ROPE]; OpenIcon: PROCEDURE[icon: ViewerClasses.Viewer]; MoveChild: PROCEDURE[child: ViewerClasses.Viewer]; GrowBox: PROCEDURE[wb, box: ViewerClasses.Viewer, x, y: INTEGER]; NearestChild: PROCEDURE[wb: ViewerClasses.Viewer, x, y: INTEGER, type: ViewerClasses.ViewerFlavor _ NIL] RETURNS[nearest: ViewerClasses.Viewer]; ToolInfo: TYPE = RECORD[ tool: ATOM, icon: ATOM _ NIL, commandLine: ROPE ]; ToolViewer: DB.Domain; -- DeclareDomain[NutViewer.ToolViewer, $Squirrel] instructions: DB.Attribute; -- what is needed to recreate the viewer TextViewer: DB.Domain; -- DeclareDomain[NutViewer.TextViewer, $Squirrel] readOnly: BOOL; -- set if this is a readonly DB segment WBSegment: ROPE; -- the name of the current WB segment CreateTextViewer: Nut.CreateProc; CreateToolViewer: Nut.CreateProc; ShortName: PROC[name: ROPE] RETURNS[shortName: ROPE]; -- gives the LName for a FS GName ExtractName: PROC[name: ROPE] RETURNS[ROPE]; FetchEntity: PROC[v: ViewerClasses.Viewer] RETURNS[e: DB.Entity]; StoreEntity: PROC[v: ViewerClasses.Viewer, e: DB.Entity, seg: DB.Segment _ NIL, name: ROPE _ NIL]; Pair: TYPE = RECORD[e: DB.Entity, v: ViewerClasses.Viewer]; GetEntities: PROC[wb: ViewerClasses.Viewer, text: BOOL _ TRUE] RETURNS[entities: LIST OF Pair]; WBEntityForViewer: PROC[v: ViewerClasses.Viewer] RETURNS[e: DB.Entity] END... Change Log. Willie-Sue on December 20, 1982: added FindViewer and RegisterTool from ViewerNut.mesa  Whiteboard.mesa Last edited by: John Maxwell on: June 24, 1982 10:23 am Last Edited by: Willie-Sue, February 22, 1983 3:46 pm Last Edited by: Donahue, August 8, 1983 8:44 am (added InitializeSchema) The addition procedures DO NOT paint the viewer they create retrieve and change the grid size for a whiteboard ***************** Data Schema for Viewers ******************* If an implementor wants to make it possible for a tool viewer to be added to a Whiteboard, he must add a ToolInfo record to the property list of any viewer created by the tool, using the $ToolInfo property. The tool atom is used as the label for the icon on a whiteboard and the commandLine is passed to a Commander when the icon is "opened". If no icon is specified, a tool icon is used; otherwise, the icon must be the name of a registered icon. produce the entity stored in the viewer if DB.Null[e] then the name is stored, otherwise DBNames.EntityToName is used; this is needed for the case where the segment in which the entity exists isn't open yet Êd˜Jšœ™Jšœ7™7Jšœ5™5JšœH™HJ˜šÏk ˜ Jšœœ%˜-Jšœœ˜#Jšœœœ˜Jšœœ#˜6J˜—šœ œ œ˜Jš˜Jšœ˜ J˜—Jšœ(Ïc#˜KJšœ$ž˜4J˜%J˜Jšœ;™;J˜šÏn œ œœœ˜SJšœ˜%—šŸœ œ)œœ˜OJšœ˜%J˜—JšŸ œ œ"˜8J˜Jšœ2™2JšŸœœœœ˜?JšŸœœ"œ˜5J˜JšŸ œ œ!œ˜>Jšœ ž)˜IJ˜Jš Ÿœ œœ œœœ˜MJš œœœ œœ˜=J˜JšŸœ œ˜0J˜JšŸ œ œ˜2JšŸœ œ&œ˜AšŸ œ œ!œ˜AJšœ#œ˜(Jšœ ˜'J˜šœ=™=J™——š œ œœœœœ˜KJ™Á—J˜Jšœ œ ž1˜HJ˜šœœ ž(˜DJ˜—Jšœ œ ž1˜HJ˜Jšœ œž'˜7J˜Jšœ œž%˜7J˜J˜!J˜J˜!J˜Jš Ÿ œœœœ œž!˜WJ˜Jš Ÿ œœœœœ˜,J˜JšŸ œœœœ ˜AJšœ'™'J˜JšŸ œœœœ œœœ˜bJšœN™NJšœW™WJ˜Jšœœœœ"˜;J˜šŸ œœ!œœœ œœ˜_J˜—JšŸœœœœ˜FJšœ˜J˜J˜ J˜VJ˜—…— ØH