DIRECTORY CD USING [Technology], CDSequencer USING [Command, CommandProc, QueueMethod], Rope USING [ROPE]; CDMenus: CEDAR DEFINITIONS = BEGIN CreateMenu: PROC [label: Rope.ROPE_NIL, globalKey: ATOM _ NIL] RETURNS [menu: REF]; GetMenu: PROC [globalKey: ATOM] RETURNS [menu: REF]; CreateEntry: PROC [menu: REF, entry: Rope.ROPE _ NIL, key: REF]; CallMenu: PROC [menu: REF] RETURNS [key: REF]; CallCommand: PROC [menu: REF, comm: CDSequencer.Command]; ImplementMenuCommand: PROC[a: ATOM, menu: REF, technology: CD.Technology _ NIL]; ImplementEntryCommand: PROC [menu: REF, entry: Rope.ROPE _ NIL, p: CDSequencer.CommandProc, key: ATOM _ NIL, queue: CDSequencer.QueueMethod _ doQueue]; END. κCDMenus.mesa (a ChipNDale module) Copyright c 1984, 1985 by Xerox Corporation. All rights reserved. Created by: Ch. Jacobi, September 18, 1984 3:24:53 pm PDT Last Edited by: Ch. Jacobi, September 19, 1985 3:20:27 am PDT Implements pop up menus. --Creates a new menu --label: its header line --globalKey: If not NIL, the menu may be fetched (GetMenu) using this atom --Fetches a menu which had been created with a globalKey --NIL if not found --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 --Calls a menu and return the selected key --(recursively, until returned key is not of type menu) --Calls a menu and replace the "comm" key with the selected key --then "comm" is executed --Implements a CDSequencer command "a" which shows the "menu" and after --selection executes the selected entry --For conveniance only; in all technologies. --Creates an entry line into the menu and sets it up to call the command p. --key: key of the command; is made up if NIL. Κ˜codešœ"™"Kšœ Οmœ7™BK™9K™=—K˜šΟk œ˜ Kšžœžœ˜Kšœ žœ%˜6Kšœžœžœ˜—K˜KšΠblœžœž œ˜Kšž˜K™K™K˜šΟn œžœžœžœ žœžœžœžœ˜SKšœ™Kšœ™KšœJ™JK˜—š  œžœ žœžœžœ˜4Kšœ8™8Kšœ™K˜—š   œžœžœžœžœžœ˜@K™MKšœ ™ Kšœ+™+Kšœ-™-KšœC™CKšœ™Kšœ-™-K˜—š  œžœžœžœžœ˜.Kšœ*™*Kšœ7™7K˜—š  œžœžœ˜9Kšœ?™?Kšœ™K˜—š  œžœžœžœžœ žœ˜QKšœH™HKšœ)™)K˜—š œžœžœžœžœ#žœžœ-˜˜Kšœ,™,KšœK™KKšœ-™-—K˜Kšžœ˜K˜K˜K˜—…—Ζ Ε