CDMenus.mesa
Copyright © 1984 by Xerox Corporation. All rights reserved.
Created by: Ch. Jacobi, September 18, 1984 3:24:53 pm PDT
Last Edited by: Ch. Jacobi, September 20, 1984 6:24:27 pm PDT
DIRECTORY
CD USING [Technology],
CDSequencer USING [Command],
Rope USING [ROPE];
CDMenus: CEDAR DEFINITIONS =
BEGIN
CreateMenu: PROC [label: Rope.ROPENIL, globalKey: ATOMNIL] RETURNS [menu: REF];
GetMenu: PROC [globalKey: ATOM] RETURNS [menu: REF];
--NIL if not found
CreateEntry: PROC [menu: REF, entry: Rope.ROPENIL, key: REF];
--menu: a menu => use menu
--   an ATOM => fetch for menu with globalKey
--key: a menu => use menu recursively
--   an ATOM => return as result (does NOT search for a menu) / use CDSequencer
--   others => return as result / error message
CallMenu: PROC [menu: REF] RETURNS [key: REF];
--returned key will not be of type menu
CallCommand: PROC [menu: REF, comm: CDSequencer.Command];
--the atom will be changed to the menu atom
ImplementMenuCommand: PROC[a: ATOM, menu: REF, technology: CD.Technology←NIL];
END.