DIRECTORY Icons USING [IconFlavor], Menus USING [Menu, MenuProc], Rope USING [ROPE], ViewerClasses USING [Viewer], WalnutOps USING [MsgSet, ServerInfo], WalnutWindow USING [OutCome, WalnutHandle], WalnutWindowPrivate USING [MsgSetButton, WalnutIcons]; WalnutInternal: CEDAR DEFINITIONS = BEGIN Viewer: TYPE = ViewerClasses.Viewer; ROPE: TYPE = Rope.ROPE; WalnutHandle: TYPE = WalnutWindow.WalnutHandle; MsgSetButton: TYPE = WalnutWindowPrivate.MsgSetButton; WalnutIcons: TYPE = WalnutWindowPrivate.WalnutIcons; WaitCallOutcome: TYPE = WalnutWindow.OutCome; HowToPrint: TYPE = { press, ip2, ip3 }; MailState: TYPE = {noMail, retrieving, thereIsMail, waiting, noState, noServers, someMail}; previousUser: ROPE; mustQuitWalnut: ROPE; invocationDirectory: ROPE; searchRules: LIST OF REF ANY; blankMenu: Menus.Menu; workingMenu: Menus.Menu; tocDefaultLooks: ROPE; tocSelectedLooks: ROPE; tocUnreadLooks: ROPE; userWantsQMs: BOOL; plainTextStyle: ROPE; displayMsgSetInIcon: BOOL; msbDefaultLooks: ROPE; msbSelectedLooks: ROPE; msgSetBorders: BOOL; initialActiveIconic, initialActiveOpen, initialActiveRight: BOOL; msgIcon: Icons.IconFlavor; msgSetIcon: Icons.IconFlavor; labelledWalnutIcons: WalnutIcons; unLabelledWalnutIcons: WalnutIcons; alternateWalnutIcons: WalnutIcons; -- have label area for number GetUserResponse: PROC[wH: WalnutHandle, m: Menus.Menu ¬ NIL, tryAutoConfirm: BOOL ¬ FALSE] RETURNS[BOOL]; ChangeMenu: PROC[wH: WalnutHandle, m: Menus.Menu, isBusy: BOOL]; BuildWalnutMenus: PROC[wH: WalnutHandle]; DoArchive: PROC[wH: WalnutHandle, fileName: ROPE, msList: LIST OF WalnutOps.MsgSet, append: BOOL] RETURNS[ok: BOOL]; DoRemoveOverThere: PROC[ wH: WalnutHandle, rootMsgSet: ROPE, msgSetList: LIST OF MsgSetButton]; DoAppendMsg: PROC[wH: WalnutHandle, curSel: ROPE, curV: Viewer, msgSetList: LIST OF MsgSetButton]; WalnutNotifier: PROC[wH: WalnutHandle]; RestartWalnut: PROC[wH: WalnutHandle, scavengeFirst, firstTime: BOOL] RETURNS[ok: BOOL]; QuitWalnut: PROC[ra: REF ANY ]; DoStartupCall: PROC[wH: WalnutHandle, proc: PROC[isRunning: BOOL]] RETURNS[outcome: WaitCallOutcome]; DoWaitCall: PROC[wH: WalnutHandle, proc: PROC[]] RETURNS[outcome: WaitCallOutcome]; FlushWQueue: PROC[wH: WalnutHandle]; FixUpWalnutViewers: PROC[wH: WalnutHandle]; CloseDownWalnut: PROC[wH: WalnutHandle]; CloseTS: PROC[wH: WalnutHandle]; OpenTS: PROC[wH: WalnutHandle, r: ROPE ¬ NIL, doRegister: BOOL ¬ TRUE]; TakeDownWalnutViewers: PROC[wH: WalnutHandle]; RetrieveNewMail: PROC[wH: WalnutHandle]; EnableNewMail: PROC[wH: WalnutHandle]; DisableNewMail: PROC[wH: WalnutHandle]; SetMailState: PROC[wH: WalnutHandle, mailState: MailState]; DestroyAllMsgSetButtons: PROC[wH: WalnutHandle]; GetButton: PROC[wH: WalnutHandle, msgSet: ROPE] RETURNS[MsgSetButton]; ShowMsgSetButtons: PROC[wH: WalnutHandle]; GetSelectedMsgSets: PROC[wH: WalnutHandle] RETURNS[msL: LIST OF MsgSetButton]; DeleteMsgSetButton: PROC[wH: WalnutHandle, msgSet: ROPE]; AddMsgSetButton: PROC[wH: WalnutHandle, msgSet: ROPE, select: BOOL]; PrepareToEditMsgSetButtons: PROC[wH: WalnutHandle]; CreateMsgMenu: PROC[ wH: WalnutHandle]; DisplayMsgFromMsgSet: PROC[ wH: WalnutHandle, msg: ROPE, msViewer: Viewer, shift: BOOL ¬ FALSE]; QDisplayMsg: PROC[wH: WalnutHandle, msg: ROPE, oldV: Viewer ¬ NIL, shift: BOOL ¬ FALSE, openIfIconic: BOOL ¬ TRUE, paint: BOOL ¬ TRUE] RETURNS[v: Viewer]; MsgNamePrefix: PROC[wH: WalnutHandle] RETURNS[ROPE]; InternalAddToMsgMenu: PROC[wH: WalnutHandle, label: ROPE, proc: Menus.MenuProc, clientData: REF ANY, onQueue: BOOL]; InternalReplaceInMsgMenu: PROC[wH: WalnutHandle, label: ROPE, proc: Menus.MenuProc, clientData: REF ANY, onQueue: BOOL] RETURNS[oldFound: BOOL]; MsgCategories: PROC[wH: WalnutHandle, msg: ROPE]; MsgGvId: PROC[wH: WalnutHandle, msg: ROPE, all: BOOL]; CreateMsgSetMenus: PROC[ wH: WalnutHandle]; QDisplayMsgSet: PROC[ wH: WalnutHandle, msb: MsgSetButton, oldV: Viewer ¬ NIL, shift: BOOL ¬ FALSE, repaint: BOOL ¬ TRUE] RETURNS[v: Viewer]; MsgSetNamePrefix: PROC[wH: WalnutHandle] RETURNS[ROPE]; AddNewMsgsToActive: PROC[active: MsgSetButton] RETURNS[responses: LIST OF WalnutOps.ServerInfo, complete: BOOL, numNew: INT]; AddorAppendTo: PROC[wH: WalnutHandle, msg: ROPE, isAdd: BOOL, fromButton, toButton: MsgSetButton]; MoveTo: PROC[msg: ROPE, fromButton, toButton: MsgSetButton]; RemoveFrom: PROC[msg: ROPE, fromButton: MsgSetButton]; ComeFrom: PROC[msb: MsgSetButton]; PrintSelCmd: PROC[wH: WalnutHandle, msgSet: ROPE, server: ROPE ¬ NIL, howToPrint: HowToPrint ¬ press, copies: INT ¬ 1]; MsgSetPrintProc: PROC[wH: WalnutHandle, viewer: Viewer, howToPrint: HowToPrint]; MsgSetTOCPrintProc: PROC[wH: WalnutHandle, viewer: Viewer, howToPrint: HowToPrint]; MsgPrintProc: PROC[wH: WalnutHandle, viewer: Viewer, howToPrint: HowToPrint]; AbortPrintProc: Menus.MenuProc; PrintMsgSet: PROC[wH: WalnutHandle, msgSet: ROPE, howToPrint: HowToPrint ¬ press] RETURNS[allOK: BOOL]; PrintMsgSetTOC: PROC[wH: WalnutHandle, msgSet: ROPE, howToPrint: HowToPrint ¬ press] RETURNS[allOK: BOOL]; PrintMsgList: PROC[wH: WalnutHandle, mList: LIST OF ROPE, msViewer: Viewer, server: ROPE ¬ NIL, howToPrint: HowToPrint ¬ press, copies: INT ¬ 1] RETURNS[allOK: BOOL]; PrintMsgSetCmd: PROC[wH: WalnutHandle, msgSet: ROPE, server: ROPE ¬ NIL, howToPrint: HowToPrint ¬ press, copies: INT ¬ 1]; PrintMsgSetTOCCmd: PROC[wH: WalnutHandle, msgSet: ROPE, server: ROPE ¬ NIL, howToPrint: HowToPrint ¬ press, copies: INT ¬ 1]; PrintMsgCmd: PROC[wH: WalnutHandle, msg: ROPE, server: ROPE ¬ NIL, howToPrint: HowToPrint ¬ press, copies: INT ¬ 1]; WriteMsgSets: PROC[wH: WalnutHandle, msgSetList: LIST OF MsgSetButton, tocsOnly: BOOL, fileName: ROPE]; END. P WalnutInternal.Mesa Copyright Σ 1988, 1989, 1992 by Xerox Corporation. All rights reserved. Willie-Sue, May 5, 1989 6:48:30 pm PDT Internal interface for WalnutControl walnutIcon: Icons.IconFlavor; newMailIcon: Icons.IconFlavor; labelledWalnutIcon: Icons.IconFlavor; labelledNewMailIcon: Icons.IconFlavor; unLabelledWalnutIcon: Icons.IconFlavor; unLabelledNewMailIcon: Icons.IconFlavor; brokenWalnutIcon: Icons.IconFlavor; * * * * * * * * * from WalnutWindowMenuImpl must called from within a DoWaitCall must be called from within a DoWaitCall curSel & curV are used to figure out what the msg is - it can even be a Walnut Msg Displayer for some other database must be called from within a DoWaitCall * * * * from WalnutNotifierImpl the ref must be a WalnutHandle puts proc on Walnut's queue and waits for its execution to finish; will get called even if Walnut is not running puts proc on Walnut's queue and waits for its execution to finish; If the call was flushed from the queue, then outcome = flushed upon return; if Walnut is not running, outcome = notRunning, else outcome = ok ******** from WalnutWindowInternalImpl ******** from WalnutMsgSetButtonsImpl returns the message set button for the named message set constructs or re-constructs the msgSetButtons in the control window; "knows" where in the window the buttons belong the list of MsgSets the user has selected (for Add/Remove Msg operations) adds a button for msgSet removes selections & strikethrus before editting * * * * * * from WalnutMsgDisplayerImpl creates the msgMenu for this walnutHandle Display the message using the message viewer from the specified message set lists the MsgSets for msg, in the walnut control window prints the gvID for msg in the walnut control window * * * * * * from WalnutMsgSetDisplayerImpl creates the msgSetMenus for this walnutHandle called by newMail reader to add msgs to the active message set viewer; if active = NIL, then just return the server responses adds a message from one message set to another message set, keeping the second display consistent moves a message from one message set to another message set, keeping the second display consistent removes msg from from.msgSet, keeps the display consistent makes the selected msg(s) in the selected MsgSet(s) ComeFrom those msgSets into this msgSet (like a MoveTo) prints the selected msg in named msgSet * * * * * from WalnutPrintImpl prints msgset with press or interpress, using the msgset viewer prints msgset with press or interpress, using the msgset viewer prints msg with press or interpress, using the msg viewer uses walnut control window uses walnut control window uses msgset viewer these next proc are called from WalnutWindowCommandsImpl - they allow the user to specify the printer to use and the number of copies prints the named msg makes a tioga document for a list of msgSets Κ K•NewlineDelimiter –(cedarcode) style™codešΟn™Kšœ Οeœ=™HK™&K™K™$—K˜šΟk ˜ KšœŸœ˜KšœŸœ˜KšœŸœŸœ˜KšœŸœ ˜Kšœ Ÿœ˜%Kšœ Ÿœ˜+KšœŸœ˜6K˜—KšœŸœŸ œ˜#K˜KšŸ˜˜KšœŸœ˜$KšŸœŸœŸœ˜KšœŸœ˜/KšœŸœ$˜6Kšœ Ÿœ#˜4K˜KšœŸœ˜-Kšœ Ÿœ˜'Kšœ ŸœL˜[K˜KšœŸœ˜KšœŸœ˜K˜KšœŸœ˜Kš œ ŸœŸœŸœŸœ˜K˜K˜K˜K˜KšœŸœ˜KšœŸœ˜KšœŸœ˜KšœŸœ˜KšœŸœ˜KšœŸœ˜K˜KšœŸœ˜KšœŸœ˜KšœŸœ˜K˜Kšœ<Ÿœ˜AK˜Kšœ˜Kšœ˜K˜K˜!Kšœ#˜#Kšœ#Οc˜@K˜Kšœ™Kšœ™Kšœ%™%Kšœ&™&Kšœ'™'Kšœ(™(Kšœ#™#—K™šΟb+™+K˜KšœŸœ#ŸœŸœŸœŸœŸœ˜iK˜Kš œŸœ*Ÿœ˜@K˜KšœŸœ˜)K˜š  œŸœŸœ ŸœŸœŸœ˜aKšŸœŸœ˜K™$K™—š œŸœ ŸœŸœŸœ˜_K™'K™—š  œŸœŸœŸœŸœ˜bKšœt™tK™'—K™—K™š‘ ™ K˜KšœŸœ˜'K˜š œŸœ-Ÿœ˜EKšœŸœŸœ˜—K˜š œŸœŸœŸœ˜Kšœ™—K˜š  œŸœŸœ ŸœŸœ˜eKšœp™p—K˜š œŸœŸœŸœ˜SKšœΡ™Ρ—K™Kš œŸœ˜$K˜KšœŸœ˜+K˜—š‘'™'K˜KšœŸœ˜(K˜KšœŸœ˜ K˜Kš œŸœŸœŸœŸœŸœ˜GK˜KšœŸœ˜.K˜KšœŸœ˜(K˜Kš œŸœ˜&K˜KšœŸœ˜'K˜Kš œŸœ)˜;K˜—š‘&™&K™KšœŸœ˜0K˜š œŸœŸœŸœ˜FKšœ8™8K˜—šœŸœ˜*KšœD™DKšœ.™.—K˜š œŸœŸœŸœŸœ˜NKšœI™IK˜—KšœŸœŸœ˜9K˜šœŸœŸœ Ÿœ˜DKšœ™K™—šœŸœ˜3K™0——K˜š‘(™(K™š œŸœ˜'K™)K™—šœŸœ˜KšœŸœŸœŸœ˜EKšœK™KK˜—š œŸœŸœŸœ ŸœŸœŸœŸœ ŸœŸœ˜†šŸœ ˜K˜——š œŸœŸœŸœ˜4K˜—š œŸœŸœ$ŸœŸœ Ÿœ˜tK˜—KšœŸœŸœ$ŸœŸœ ŸœŸœ Ÿœ˜K˜š œŸœŸœ˜1Kšœ7™7K˜—šœŸœŸœŸœ˜6K™4K™——K™š‘+™+K™šœŸœ˜+K™-K˜—šœŸœ6Ÿœ ŸœŸœ ŸœŸœ˜yKšŸœ ˜K˜—šœŸœŸœŸœ˜7K˜—šœŸœ˜.Kš Ÿœ ŸœŸœ!Ÿœ Ÿœ˜NK™}K™—š œŸœŸœ Ÿœ&˜bK™aK˜—šœŸœŸœ&˜