MODULE; IMPORT View, MGPublic, GenericTree, VBT, Axis, Font; REVEAL T = TPublic BRANDED OBJECT OVERRIDES shape := Shape END; CONST InitWidth = 400; InitHeight = 300; PROCEDURE STView New (view: T; v: GenericTree.V): View.T = BEGIN v.border := ARRAY Axis.T OF REAL{BorderWidth, BorderHeight}; view.v := v.init();
RETURN view.init(NEW(Scale.T).init(view.v));
RETURN view.init(view.v); END New; PROCEDUREStartRun (view: T) = VAR v := view.v; BEGIN v.setRoot(NIL); MGPublic.ResetLookups(v); VBT.NewShape(v); VBT.Mark(v); View.T.startrun(view); END StartRun; PROCEDUREShape ( <* UNUSED *> v: VBT.T; axis: Axis.T; <* UNUSED *> n: CARDINAL): VBT.SizeRange = BEGIN CASE axis OF Axis.T.Hor => RETURN VBT.SizeRange{VBT.DefaultShape.lo, InitWidth, VBT.DefaultShape.hi} | Axis.T.Ver => RETURN VBT.SizeRange{VBT.DefaultShape.lo, InitHeight, VBT.DefaultShape.hi} END END Shape; BEGIN nodeColor := MGPublic.ColorFromText("VerySlightlyDarkCyan"); currentColor := MGPublic.ColorFromText("LightYellow"); compareColor := MGPublic.ColorFromText("PeachPuff"); (* was "Peach" *) font := Font.FromName(ARRAY OF TEXT{ "-*-helvetica-medium-r-*-*-*-100-*-*-*-*-iso8859-1"}) END STView.