PeanutWindow.mesa
Copyright © 1985 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
Doug Wyatt, March 7, 1985 11:22:50 am PST
DIRECTORY
Containers USING [Container],
Icons USING [IconFlavor],
Menus USING [ClickProc, Menu],
Rope USING [ROPE];
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];
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
RETURNS [new:
BOOL];
Create the peanut window
Destroy:
PROC;
Destroy the peanut window
peanutParent: Containers.Container;
newMailIcon: Icons.IconFlavor;
noMailIcon: Icons.IconFlavor;
messageSetIcon: Icons.IconFlavor;
dirtyMessageSetIcon: Icons.IconFlavor;
mailMessageIcon: Icons.IconFlavor;
dirtyMailMessageIcon: Icons.IconFlavor;
menu: Menus.Menu;
abortFlag: BOOL;
END.