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, May 29, 1985 11:41:04 am PDT
DIRECTORY
CD USING [Technology],
CDSequencer USING [Command],
Rope USING [ROPE];
CDMenus: CEDAR DEFINITIONS =
CreateMenu: PROC [label: Rope.ROPE←NIL, globalKey: ATOM←NIL] RETURNS [menu: REF];
GetMenu:
PROC [globalKey:
ATOM]
RETURNS [menu:
REF];
--NIL if not found
CreateEntry:
PROC [menu:
REF, entry: Rope.
ROPE←
NIL, 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.