PeanutWindow.mesa
Copyright Ó 1985, 1990, 1992 by Xerox Corporation. All rights reserved.
Written by Scott McGregor, February 1983
Last edited by McGregor on March 4, 1983 9:11 am
Last edited by Paxton on March 3, 1983 9:30 am
Last Edited by: Pausch, July 14, 1983 2:25 pm
Willie-Sue, August 10, 1989 4:04:45 pm PDT
Doug Wyatt, March 7, 1985 11:22:50 am PST
Last changed by Pavel on March 8, 1990 1:46 pm PST
Jules Bloomenthal July 1, 1992 1:35 pm PDT
DIRECTORY Icons, Menus, MJSContainers, Rope, ViewerClasses;
PeanutWindow: CEDAR DEFINITIONS
= BEGIN
OutputRope: PROC [text: Rope.ROPE];
Write a rope to the peanut typescript.
OutputChar: PROC [char: CHAR];
Write a character to the peanut typescript.
SetNewMail: PROC [newMail: BOOL];
Change the peanut window to indicate new mail state.
AddCommand: PROC [name: Rope.ROPE, proc: Menus.ClickProc, data: REF ANY ¬ NIL,
fork: BOOL ¬ TRUE, guarded: BOOL ¬ FALSE, lineNum: Menus.MenuLine ¬ 0];
Add a new command to the one-line peanut menu (saved across destroy of window).
AddButton: PROC [name: Rope.ROPE, proc: Menus.ClickProc, data: REF ANY ¬ NIL,
fork: BOOL ¬ TRUE, guarded: BOOL ¬ FALSE, redisplay: BOOL ¬ TRUE];
Add a new button to the button area below the menu (not saved across destroy of window);
the peanut viewer will be repainted if 'redisplay' is TRUE.
Create: PROC [quit, save: PROCNIL] RETURNS [new: BOOL];
Create the peanut window;
quit, if non-nil, is called when the window is destroyed;
save, if non-nil, is called when the window is saved.
Destroy: PROC;
Destroy the peanut window.
SaveAllMailFiles: PROC [mailFiles: LIST OF Rope.ROPE, killViewers: BOOL];
Save all unsaved mail files and, if killViewers is TRUE, destroy them and close the main Peanut viewer.
FindMailViewer: PROC [name: Rope.ROPE] RETURNS [ViewerClasses.Viewer];
Returns NIL if no viewer found.
GetMailViewer: PROC [name: Rope.ROPE] RETURNS [ViewerClasses.Viewer];
Creates a new viewer if none already there; an entry proc for general client use.
CopyMessages: PROC [to: Rope.ROPE, delete: BOOL];
Copy selected message to named file.
InternalGetMailViewer: PROC [name: Rope.ROPE] RETURNS [ViewerClasses.Viewer];
Not for general client use.
peanutParent: MJSContainers.MJSContainer;
newMailIcon: Icons.IconFlavor;
noMailIcon: Icons.IconFlavor;
messageSetIcon: Icons.IconFlavor;
dirtyMessageSetIcon: Icons.IconFlavor;
mailMessageIcon: Icons.IconFlavor;
dirtyMailMessageIcon: Icons.IconFlavor;
menu: Menus.Menu;
END.