-- File: WalnutViewer.mesa -- Contents: Taken from NutViewer.mesa -- Created by: Rick Cattell on 11-Dec-81 12:29:29 -- Last edited by: -- Willie-Sue on: January 20, 1984 2:41:45 pm PST DIRECTORY MBQueue USING [Queue], Buttons, Menus, Rope, ViewerClasses, VFonts; WalnutViewer: CEDAR DEFINITIONS IMPORTS VFonts = BEGIN Viewer: TYPE = ViewerClasses.Viewer; ROPE: TYPE = Rope.ROPE; Queue: TYPE = MBQueue.Queue; -- ******************************************************** -- Handy Procedures for dealing with viewers (WalnutViewerImpl.mesa) -- ******************************************************** NextTextViewer: PROC[sib: Viewer] RETURNS [nV: Viewer]; -- creates text viewer on line following sib, full width of sib.parent NextRightTextViewer: PROC[sib: Viewer, w: INTEGER] RETURNS [nV: Viewer]; -- creates a text viewer, next right on the same line as v FirstLabel: PROC[name: ROPE, parent: Viewer] RETURNS [nV: Viewer]; -- makes a label which is the first one in a viewer, at standard Y value AnotherLabel: PROC[name: ROPE, sib: Viewer, newLine: BOOL_ FALSE] RETURNS [nV: Viewer]; -- sib is a viewer to the left or above the label to be made -- Most menus/buttons are serialized now 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]; -- makes a button which is the first one in a viewer AnotherButton: PROC[q: Queue, name: ROPE, proc: Buttons.ButtonProc, sib: Viewer, data: REF ANY_ NIL, border: BOOL_ FALSE, width: INTEGER_ 0, guarded: BOOL_ FALSE, font: VFonts.Font _ VFonts.defaultFont, newLine: BOOL_ FALSE, paint: BOOL_ TRUE] RETURNS [nV: Viewer]; -- sib is a viewer to the left or above the button to be made 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]; -- The following three PROCs assume that sib.parent#NIL MakeTypescript: PROC[sib: Viewer] RETURNS [ts: Viewer]; -- sib is sibling to create TS after, this must be last child of sib.parent. MakeRuler: PROC[sib: Viewer, h: INTEGER_ 1] RETURNS [r: Viewer]; -- Put a h-bit wide line after sib MakeBigTextBox: PROC[sib: Viewer, contents: ROPE] RETURNS [nV: Viewer]; -- 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. ImmediateButton: PROC[name: ROPE, proc: Buttons.ButtonProc, border: BOOL, sib: Viewer, fork: BOOL_ TRUE, guarded: BOOL_ FALSE, newLine: BOOL_ FALSE] RETURNS[Viewer]; -- does not put button on a queue END. ĘÛ˜JšÛĪcģœĪk œ žœHžœž œžœ žœ žœžœžœžœ žœŊœĪnœžœžœGœŸœžœžœžœ<œŸ œžœžœžœJœŸ œžœžœžœžœžœ>œ*œŸ œžœžœDžœžœžœ žœžœ žœ žœžœCžœžœžœ6œŸ œžœžœ5žœžœžœ žœžœ žœžœžœ9žœžœ žœžœžœ?œŸœžœžœ'žœžœžœžœžœžœžœžœžœžœžœ9ŸœžœžœNœŸ œžœžœžœ$œŸœžœžœžœeœSœŸœžœžœ$žœžœžœ žœžœ žœžœžœ #œžœ˜Ô—…— V 7