CDMenusExtras.mesa  (a ChipNDale module)
Copyright © 1986 by Xerox Corporation. All rights reserved.
Created by: Christian Jacobi, September 18, 1984 3:24:53 pm PDT
Last Edited by: Christian Jacobi, August 21, 1986 4:33:34 pm PDT
DIRECTORY
Rope USING [ROPE];
CDMenusExtras: CEDAR DEFINITIONS =
BEGIN
Implements pop up menus.
CreateMenuExtra: PROC [label: Rope.ROPENIL, globalKey: ATOMNIL, doc: Rope.ROPENIL] RETURNS [menu: REF];
--Creates a new menu
--label: its header line
--globalKey: If not NIL, the menu may be fetched (GetMenu) using this atom
--doc: documentation
CreateEntryExtra: PROC [menu: REF, entry: Rope.ROPE NIL, key: REF, doc: Rope.ROPENIL];
--Makes an entry line in a menu (overwrite if ropes are equal, remove if NIL)
--menu: a menu => use this menu
-- an ATOM => fetch for menu with globalKey
--key: a menu => use the key menu recursively
-- an ATOM => return this as result (does NOT search for a menu) /
--  use CDSequencer
-- others => return as result / error message
--doc:  documentation
END.