DIRECTORY TBQueue USING [Queue], Buttons, Menus, Rope, ViewerClasses, VFonts; WalnutViewer: CEDAR DEFINITIONS IMPORTS VFonts = BEGIN Viewer: TYPE = ViewerClasses.Viewer; ROPE: TYPE = Rope.ROPE; Queue: TYPE = TBQueue.Queue; buttonEntryHeight: INTEGER = 14; tiogaButtonHeight: INTEGER = 12; NextTextViewer: PROC[sib: Viewer] RETURNS [nV: Viewer]; NextRightTextViewer: PROC[sib: Viewer, w: INTEGER] RETURNS [nV: Viewer]; FirstLabel: PROC[name: ROPE, parent: Viewer] RETURNS [nV: Viewer]; AnotherLabel: PROC[name: ROPE, sib: Viewer, newLine: BOOL ¬ FALSE] RETURNS [nV: Viewer]; FirstButton: PROC[q: Queue, name: ROPE, proc: Buttons.ButtonProc, parent: Viewer, data: REF ANY ¬ NIL, border: BOOL ¬ FALSE, width: INTEGER ¬ 0, guarded: BOOL ¬ FALSE, font: VFonts.Font ¬ VFonts.defaultFont, paint: BOOL ¬ TRUE] RETURNS [nV: Viewer]; AnotherButton: PROC[q: Queue, name: ROPE, proc: Buttons.ButtonProc, sib: Viewer, data: REF ANY ¬ NIL, border: BOOL ¬ FALSE, guarded: BOOL ¬ FALSE, font: VFonts.Font ¬ VFonts.defaultFont, newLine: BOOL ¬ FALSE, paint: BOOL ¬ TRUE] RETURNS [nV: Viewer]; ImmediateButton: PROC[name: ROPE, proc: Buttons.ButtonProc, sib: Viewer, data: REF ANY ¬ NIL, border: BOOL ¬ FALSE, guarded: BOOL ¬ FALSE, newLine: BOOL ¬ FALSE, paint: BOOL ¬ TRUE] RETURNS[Viewer]; CreateMenuEntry: PROC[q: Queue, name: ROPE, proc: Menus.MenuProc, clientData: REF ANY ¬ NIL, documentation: REF ANY ¬ NIL, fork: BOOL ¬ TRUE, guarded: BOOL ¬ FALSE] RETURNS[Menus.MenuEntry]; MakeTypescript: PROC[sib: Viewer] RETURNS [ts: Viewer]; MakeRuler: PROC[sib: Viewer, h: INTEGER ¬ 1] RETURNS [r: Viewer]; MakeBigTextBox: PROC[sib: Viewer, contents: ROPE] RETURNS [nV: Viewer]; END. ’ WalnutViewer.mesa Copyright Σ 1988, 1992 by Xerox Corporation. All rights reserved. Contents: Taken from NutViewer.mesa Created by: Rick Cattell on 11-Dec-81 12:29:29 Willie-Sue on: March 9, 1988 12:30:24 pm PST ******************************************************** Handy Procedures for dealing with viewers (WalnutViewerImpl.mesa) ******************************************************** creates text viewer on line following sib, full width of sib.parent creates a text viewer, next right on the same line as v makes a label which is the first one in a viewer, at standard Y value sib is a viewer to the left or above the label to be made Most menus/buttons are serialized now makes a button which is the first one in a viewer sib is a viewer to the left or above the button to be made does not put button on a queue The following three PROCs assume that sib.parent#NIL sib is sibling to create TS after, this must be last child of sib.parent. Put a h-bit wide line after sib Makes editable text viewer taking rest of sib.parent's viewer, suitable for msg body or whatever. sib is sibling to create text box after, this must be last child of sib.parent. ΚT•NewlineDelimiter –(cedarcode) style™codešΟb™Kšœ Οeœ7™BKšœ$™$Kšœ.™.Kšœ,™,—K˜šΟk ˜ KšœŸœ ˜K˜,—K˜šΟn œŸœŸ œ˜ KšŸœ ˜—K˜KšŸ˜K˜KšœŸœ˜$KšŸœŸœŸœ˜KšœŸœ˜KšœŸœ˜ KšœŸœ˜ K˜Kšœ8™8KšœA™AKšœ8™8˜š œŸœŸœ˜8KšœC™CK˜—š œŸœŸœŸœ˜HKšœ7™7K˜—š  œŸœŸœŸœ˜BKšœE™EK˜—š   œŸœŸœŸœŸœŸœ˜XKšœ9™9K˜——šœ%™%K˜š  œŸœŸœ2ŸœŸœŸœ ŸœŸœ ŸœŸœŸœ1ŸœŸœ˜γKšŸœ˜Kšœ1™1K˜—š  œŸœŸœ/ŸœŸœŸœ ŸœŸœ ŸœŸœ3ŸœŸœ ŸœŸœ˜εKšŸœ˜Kšœ:™:K˜—š œŸœŸœ/ŸœŸœŸœ ŸœŸœ ŸœŸœ ŸœŸœ ŸœŸœ˜΅KšŸœ ˜Kšœ™K™—š œŸœŸœ$ŸœŸœŸœŸœŸœŸœŸœŸœ ŸœŸœ˜€KšŸœ˜—K˜—šœ4™4K˜š œŸœŸœ˜7KšœI™IK˜—š  œŸœŸœŸœ ˜AKšœ™K˜—š œŸœŸœŸœ˜GKšœa™aKšœO™OK˜——KšŸœ˜K˜K˜—…—˜~