WalnutNuts.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Donahue, May 22, 1985 11:37:04 am PDT
Willie-Sue on: July 12, 1985 10:48:38 am PDT
Contents: Interface for Nut Procs for displaying msgs & msgsets.
Created by: Willie-Sue, March 15, 1983
DIRECTORY
Nut,
ViewerClasses USING [Viewer],
ViewerOps USING[OpenIcon],
WalnutRegistry USING [CurrentWalnutState],
WalnutWindow USING [DisplayMsg, DisplayMsgSet];
WalnutNuts: CEDAR PROGRAM
IMPORTS Nut, ViewerOps, WalnutRegistry, WalnutWindow =
BEGIN
MsgDisplayer: Nut.NutProc = {
v: ViewerClasses.Viewer;
IF NOT WalnutRegistry.CurrentWalnutState[] = active THEN RETURN;
v ← WalnutWindow.DisplayMsg[eName];
IF v # NIL AND v.iconic THEN ViewerOps.OpenIcon[v] };
MsgSetDisplayer: Nut.NutProc = {
v: ViewerClasses.Viewer;
IF NOT WalnutRegistry.CurrentWalnutState[] = active THEN RETURN;
v ← WalnutWindow.DisplayMsgSet[eName];
IF v # NIL AND v.iconic THEN ViewerOps.OpenIcon[v] };
RegisterNutProcs: PROC =
BEGIN
Nut.Register[ domain: "Msg", segment: $Walnut, display: MsgDisplayer];
Nut.Register[domain: "MsgSet", segment: $Walnut, display: MsgSetDisplayer];
END;
DeregisterNutProcs: PROC =
BEGIN
Nut.DeRegister["Msg", $Walnut];
Nut.DeRegister["MsgSet", $Walnut];
END;
RegisterNutProcs[];
END.