-- File: WalnutNuts.mesa
-- Contents: Interface for Nut Procs for displaying msgs & msgsets.
-- Created by: Willie-Sue, March 15, 1983
-- Last edited by:
-- Willie-Sue on: August 11, 1983 9:51 am
-- Donahue, December 13, 1983 9:05 am
-- Cattell, June 8, 1983 3:54 pm
DIRECTORY
DB USING[NameOf],
Nut,
NutViewer USING[ SetIcon ],
PrincOpsUtils USING [IsBound],
WalnutDB,
WalnutDisplayerOps,
ViewerClasses;
WalnutNuts: CEDAR PROGRAM
IMPORTS
DB, Nut, NutViewer, PrincOpsUtils, WalnutDisplayerOps, WalnutDB =
BEGIN
----------------------------
MsgDisplayerCreate: Nut.CreateProc =
{ RETURN[WalnutDisplayerOps.CreateMsgViewer[eName]] };
MsgDisplayer: Nut.DisplayProc =
{WalnutDisplayerOps.DisplayMsgInViewer[DB.NameOf[e], newV]};
MsgSetDisplayerCreate: Nut.CreateProc =
{ RETURN[WalnutDisplayerOps.CreateMsgSetViewer[eName]] };
MsgSetDisplayer: Nut.DisplayProc =
{WalnutDisplayerOps.DisplayMsgSetInViewer[DB.NameOf[e], newV]};
RegisterNutProcs: PROC =
BEGIN
TRUSTED {IF ~PrincOpsUtils.IsBound[Nut.Register] THEN RETURN};
NutViewer.SetIcon[ WalnutDB.MsgDomain, "/Indigo/Cedar/Walnut/Walnut.icons", 2 ];
NutViewer.SetIcon[ WalnutDB.MsgSetDomain, "/Indigo/Cedar/Walnut/Walnut.icons", 1 ];
Nut.Register[ domain: "Msg", segment: $Walnut,
display: MsgDisplayer, create: MsgDisplayerCreate];
Nut.Register[domain: "MsgSet", segment: $Walnut,
display: MsgSetDisplayer, create: MsgSetDisplayerCreate];
END;
DeregisterNutProcs: PROC =
BEGIN
TRUSTED {IF ~PrincOpsUtils.IsBound[Nut.Register] THEN RETURN};
Nut.DeRegister[$Walnut, "Msg"];
Nut.DeRegister[$Walnut, "MsgSet"];
END;
TRUSTED {
IF PrincOpsUtils.IsBound[WalnutDisplayerOps.CreateMsgViewer] THEN RegisterNutProcs[] };
END.