DIRECTORY Menus USING [MenuProc], Rope USING [ROPE], ViewerClasses USING [Viewer]; WalnutWindow: CEDAR DEFINITIONS = BEGIN Viewer: TYPE = ViewerClasses.Viewer; ROPE: TYPE = Rope.ROPE; OutCome: TYPE = {ok, flushed, notRunning}; GetMsgName: PROC[v: Viewer] RETURNS[mName: ROPE]; GetMsgSetName: PROC[v: Viewer] RETURNS[msName: ROPE]; CurrentVersion: PROC[msName: ROPE] RETURNS[version: INT]; AddToMsgMenu: PROC[label: ROPE, proc: Menus.MenuProc, clientData: REF ANY _ NIL, onQueue: BOOL _ FALSE, doReset: BOOL _ TRUE]; RemoveFromMsgMenu: PROC[name: ROPE]; DisplayMsg: PROC[msg: ROPE, oldV: Viewer _ NIL, shift: BOOL _ FALSE] RETURNS[v: Viewer]; DisplayMsgSet: PROC[msgSet: ROPE, shift: BOOL _ FALSE, repaint: BOOL _ TRUE] RETURNS[v: Viewer]; StartUp: PROC[rootFile: ROPE, scavengeFirst: BOOL _ FALSE]; Shutdown: PROC; QueueCall: PROC[proc: PROC[] RETURNS[doReset: BOOL]] RETURNS[outCome: OutCome]; GetNewMail: PROC; Expunge: PROC; Scavenge: PROC[rootFile: ROPE]; WriteArchiveFile: PROC[fileName: ROPE, msgSetList: LIST OF ROPE]; ReadArchiveFile: PROC[fileName, msgSet: ROPE, useCategoriesInFile: BOOL _ FALSE]; SelectMsgSetsFromMSNames: PROC [msNames: LIST OF ROPE] RETURNS[notFound: LIST OF ROPE]; EnumWalnutViewers: PROC[keepSeparate: BOOL] RETURNS [msgSetList, msgList: LIST OF Viewer]; END. bFile: WalnutWindow.Mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Willie-Sue, July 12, 1985 11:12:15 am PDT Donahue, May 22, 1985 10:41:18 am PDT Created by: Willie-Sue, May 11, 1983 Last Edited by: Willie-Sue, January 3, 1985 4:32:05 pm PST Last edited by: Donahue, February 1, 1985 9:46:29 am PST (Added WalnutActive, regularized Message and Message Set display procs) (This is now intended to be the high-level programmer's interface to the Walnut Window procedures. Changed operations around and moved some things in from the old Walnut Window.) Msg and MsgSet viewer procedures If v is a Viewer for a Walnut Msg, then return its name else NIL If v is a Viewer for a Walnut MsgSet, then return its name else NIL Give the current "expected version" of the message set (-1 means "don't care"). This version may not agree with the database; it is simply the current version that WalnutWindow believes! adds menu button, synchronised using walnutQueue if onQueue is TRUE; if doReset then after the call to the client proc, walnut's display will be checked and updated if necessary. Errors from WalnutOps will cause WalnutDefs.Error to be raised. removes the named button from the msg displayer menu, if such a button exists; no errors Displaying Msgs and MsgSets displays Msg name (if it exists) in Viewer oldV; if oldV is NIL it creates a viewer returns NIL if msgSet is not a MsgSet. This operation also inserts the viewer into the state recorded by the Walnut control window, so that operations on the messages in the message set are guaranteed to use a consistent version of the set. If the message set is already displayed, then it will be repainted if repaint is TRUE Other useful operations Open up a WalnutWindow on the database named in the root file Close down the WalnutWindow places proc on Walnut's MBQueue; Walnut will do a Reset after the call completes, in case proc has changed the displayed state of Walnut. outCome lets the caller know what happened with the call. Errors from WalnutOps will cause WalnutDefs.Error to be raised. If proc changed the database then proc should return TRUE, to get Walnut to update the display checks if user has changes, then calls DoNewMail If the message set list is NIL, then the entire database is dumped IF msgSet is NIL and useCategoriesInFile is FALSE, then messages go into Active; IF msgSet is NIL and useCategoriesInFile is TRUE, then use the ones specified in the file IF msgSet is non-NIL THEN put all messages into it Selects the message set buttons in the Walnut Control viewer which corresponds to the list of msNames given. Returns a list of any not found Κg˜šœ™Icodešœ Οmœ1™