DIRECTORY Imager USING [Context], ImagerColor USING [Color], ImagerFont USING [Font], Prop USING [PropList], RefTab USING [Ref], Rope USING [ROPE], TreeGrapher USING [Node, LayoutParameters], Vector2 USING [VEC], ViewerClasses USING [ClickProc]; TreeGrapherViewer: CEDAR DEFINITIONS ~ BEGIN OPEN ImagerColor, ImagerFont, Rope, Vector2; ViewerData: TYPE ~ REF ViewerDataRep; ViewerDataRep: TYPE ~ RECORD [ tree: TreeGrapher.Node, origin: VEC, style: RefTab.Ref, -- of TextFormat lp: TreeGrapher.LayoutParameters, click: ViewerClasses.ClickProc ¬ NIL -- default: clientData will narrow to TreeGrapher.Node ]; TextFormat: TYPE ~ REF TextFormatRep; TextFormatRep: TYPE ~ RECORD [ font: LIST OF Font, -- last one re-used; cyclic list OK skip: REAL ¬ 12.0, textColor: Color, fillColors: LIST OF Color ¬ NIL, borderWidth: REAL ¬ 1.0, bearoff: VEC ¬ [3.0, 2.0], propList: Prop.PropList ]; ClassData: TYPE ~ REF ClassDataRep; -- lives in Node.classData for all of the following ClassDataRep: TYPE = RECORD [ more: REF, paint: PROC [TreeGrapher.Node, Imager.Context], click: ViewerClasses.ClickProc -- clientData will narrow to TreeGrapher.Node ]; NodeFromText: PROC [lines: LIST OF ROPE, textFormat: TextFormat, fillSizes: LIST OF REAL ¬ NIL, clientData: REF ¬ NIL, click: ViewerClasses.ClickProc ¬ NIL] RETURNS [TreeGrapher.Node]; TextData: TYPE ~ REF TextDataRep; TextDataRep: TYPE = RECORD [ lines: LIST OF ROPE, clientData: REF ¬ NIL, fillSizes: LIST OF REAL ¬ NIL ]; NodeFromRope: PROC [label: ROPE, textFormat: TextFormat] RETURNS [TreeGrapher.Node]; FindFormat: PROC [data: ViewerData, formatName: ATOM] RETURNS [result: TextFormat]; TreeFromSExpr: PROC [sexpr: REF, data: ViewerData] RETURNS [TreeGrapher.Node]; NodeFromRef: PROC [ref: REF, data: ViewerData] RETURNS [TreeGrapher.Node]; NewViewerData: PROC RETURNS [ViewerData]; END. ͺ TreeGrapherViewer.mesa Copyright Σ 1990, 1991 by Xerox Corporation. All rights reserved. Michael Plass, July 13, 1990 1:04 pm PDT TreeGrapher.Node creation Misc Κ@•NewlineDelimiter –(cedarcode) style™codešœ™Kšœ Οeœ7™BK™(—K˜šΟk ˜ Kšœžœ ˜Kšœ žœ ˜Kšœ žœ˜Kšœžœ ˜Kšœžœ˜Kšœžœžœ˜Kšœ žœ˜+Kšœžœžœ˜Kšœžœ ˜ —K˜KšΟnœžœž ˜$šœžœžœ(˜4K˜Kšœ žœžœ˜%šœžœžœ˜Kšœ˜Kšœžœ˜ KšœΟc˜#Kšœ!˜!Kšœ!žœ 6˜[Kšœ˜K˜—Kšœ žœžœ˜%šœžœžœ˜Kšœžœžœ #˜7Kšœžœ˜Kšœ˜Kšœ žœžœ žœ˜ Kšœ žœ˜Kšœ žœ˜K˜Kšœ˜——headšœ™Kšœ žœžœ 3˜Wšœžœžœ˜Kšœžœ˜ Kšœžœ$˜/Kšœ -˜LKšœ˜K˜—šŸ œžœ žœžœžœ%žœžœžœžœžœžœ#žœžœ˜ΈK˜—Kšœ žœžœ ˜!šœ žœžœ˜Kšœžœžœžœ˜Kšœ žœžœ˜Kšœ žœžœžœž˜Kšœ˜K˜—KšŸ œžœ žœžœ˜T—™šŸ œžœ žœžœ˜SK˜—šŸ œžœ žœžœ˜NK˜—KšŸ œžœžœžœ˜JK˜KšŸ œžœžœ˜)K˜—K˜Kšžœ˜—…—6