WalnutWindowInternal.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Created by: Willie-Sue, March 23, 1982
Willie-Sue, July 11, 1985 1:51:16 pm PDT
Pavel, February 5, 1986 7:12:49 pm PST
Last Edited by:
Willie-Sue on December 26, 1984 2:21:27 pm PST
Donahue, February 1, 1985 1:54:34 pm PST
(The control panel now contains the relevant state of a running Walnut -- ie., the message set buttons contain the version numbers of all of the currently displayed message sets and the version number of the message set domain)
(This was substantially reworked and simplified -- it now is the interface that handles the internal details of the Walnut Window, ie., how messages are reported and the display of message set buttons.)
DIRECTORY
Icons USING [IconFlavor],
MBQueue USING [Queue],
WalnutDefs USING [MsgSet],
Rope USING [ROPE],
TiogaButtons USING [TiogaButton],
ViewerClasses USING [Viewer],
ViewerEvents USING [EventRegistration];
WalnutWindowInternal: CEDAR DEFINITIONS =
BEGIN
ROPE: TYPE = Rope.ROPE;
Viewer: TYPE = ViewerClasses.Viewer;
TiogaButton: TYPE = TiogaButtons.TiogaButton;
MsgSetButton: TYPE = REF MsgSetButtonObject;
MsgSetButtonObject:
TYPE =
RECORD[
msgSet: WalnutDefs.MsgSet, -- the message set for the button (if the msViewer is NIL, then the version stored for the message set will be "don't care")
spaceButton: TiogaButton, -- the space before this button (NIL for active)
button: TiogaButton, -- the button in the control panel for this message set
msViewer: Viewer ← NIL, -- the message set viewer for the message set (may be NIL)
next: MsgSetButton ← NIL, -- list of all MsgSets
selected: MsgSetButton← NIL]; -- list of Selected MsgSets
selectedMsgSetButtons: MsgSetButton; -- List of selected MsgSets (may be empty)
firstMsgSetButton: MsgSetButton;
activeMsgSetButton: MsgSetButton;
deletedMsgSetButton: MsgSetButton;
msbDefaultLooks: ROPE;
msbSelectedLooks: ROPE;
msgSetBorders: BOOL;
msgSetsVersion: INT;
msgSetsTViewer: Viewer; -- the $TiogaButtons class viewer for msgSet TiogaButtons
walnut: Viewer;
walnutTS, walnutRulerBefore, walnutRulerAfter: Viewer;
initialActiveIconic, initialActiveOpen, initialActiveRight: BOOL;
personalMailDB, readOnlyAccess: BOOL;
msgNamePrefix, msgSetNamePrefix: ROPE;
walnutQueue: MBQueue.Queue;
walnutEventReg: ViewerEvents.EventRegistration;
msgIcon: Icons.IconFlavor;
msgSetIcon: Icons.IconFlavor;
walnutIcon: Icons.IconFlavor;
newMailIcon: Icons.IconFlavor;
labelledWalnutIcon: Icons.IconFlavor;
labelledNewMailIcon: Icons.IconFlavor;
unLabelledWalnutIcon: Icons.IconFlavor;
unLabelledNewMailIcon: Icons.IconFlavor;
MailState: TYPE = {noMail, retrieving, thereIsMail, gvWaiting, noGV, noServers, gvMail};
******** from WalnutWindowInternalImpl
stopping, changing
CloseDownWalnut: PROC;
walnut's typescript operations
CloseTS: PROC;
OpenTS: PROC[r: ROPE ← NIL, doRegister: BOOL ← TRUE];
walnut's viewers operations
TakeDownWalnutViewers: PROC;
reporting operations
Report:
PROC[msg1, msg2, msg3:
ROPE ←
NIL];
Prints non-omitted arguments in the Walnut window followed by CR.
ReportRope:
PROC[msg1, msg2, msg3:
ROPE ←
NIL];
Similar to above, but doesn't print CR at end.
newMail operations
RetrieveNewMail: PROC;
EnableNewMail: PROC;
DisableNewMail: PROC;
SetMailState: PROC[mailState: MailState];
******** from WalnutMsgSetButtonsImpl
MessageSet Button operations
DestroyAllMsgSetButtons: PROC;
GetButton:
PROC[msgSet:
ROPE]
RETURNS[MsgSetButton];
returns the message set button for the named message set
ShowMsgSetButtons:
PROC;
constructs or re-constructs the msgSetButtons in the control window;
"knows" where in the window the buttons belong
GetSelectedMsgSets:
PROC
RETURNS[msL:
LIST
OF MsgSetButton];
the list of MsgSets the user has selected (for Add/Remove Msg operations)
DeleteMsgSetButton: PROC[msgSet: ROPE];
AddMsgSetButton:
PROC[msgSet:
ROPE, select:
BOOL];
adds a button for msgSet
END.