-- /ivy/binding/calendar/CalWalnutImpl.mesa
-- interface between calendar and walnut
-- Last edited by: Binding, August 27, 1984 2:10:25 pm PDT
DIRECTORY
CalSupport USING [ DisplayMsg],
CalWalnut,
PrincOpsUtils USING [ IsBound],
Rope USING [ ROPE],
ViewerClasses USING [ Viewer],
WalnutDisplayerOps USING [ CreateMsgViewer, DisplayMsgInViewer]
;
CalWalnutImpl: CEDAR PROGRAM
IMPORTS CalSupport, PrincOpsUtils, WalnutDisplayerOps
EXPORTS CalWalnut
SHARES CalSupport
= BEGIN
DisplayMessage: PUBLIC PROCEDURE [ msgName: Rope.ROPE] = BEGIN
IF msgName = NIL THEN CalSupport.DisplayMsg[ "No message with this event!"]
ELSE IF PrincOpsUtils.IsBound[ WalnutDisplayerOps.CreateMsgViewer] THEN BEGIN
viewer: ViewerClasses.Viewer;
viewer ← WalnutDisplayerOps.CreateMsgViewer[ name: msgName, paint: TRUE];
WalnutDisplayerOps.DisplayMsgInViewer[ name: msgName, v: viewer];
END
ELSE CalSupport.DisplayMsg[ "Walnut not loaded!"];
END; -- DisplayMessage
END.