DIRECTORY CD, CDSequencer, Rope USING [ROPE]; CDCommandOps: CEDAR DEFINITIONS = BEGIN DoWithResource: PROC [proc: CDSequencer.CommandProc, comm: CDSequencer.Command, resource: REF _ NIL, waitIfBusy: BOOL _ FALSE, messageIfSkipped: BOOL _ TRUE] RETURNS [skipped: BOOL]; RegisterWithMenu: PROC [menu: REF_NIL, entry: Rope.ROPE_NIL, doc: Rope.ROPE_NIL, key: ATOM_NIL, proc: CDSequencer.CommandProc_NIL, queue: CDSequencer.QueueMethod_doQueue, tech: CD.Technology_NIL]; RegisterCurrentLayerCommand: PROC [key: ATOM, layer: CD.Layer, tech: CD.Technology_NIL, w: CD.Number_-1]; END. ”CDCommandOps.mesa (part of ChipNDale) Copyright c 1984, 1985 by Xerox Corporation. All rights reserved. Created by Christian Jacobi, July 12, 1984 3:46:45 pm PDT Last edited by: Christian Jacobi, October 23, 1986 10:28:18 am PDT Various procedures to ease implementing commands. --Monitoring commands using global resources --proc will be called with comm as parameter --resource: typically atom; every resource is called only once at a time --waitIfBusy -- TRUE: proc waits if resource is occupied -- FALSE: proc is skipped if resource is occupied --messageIfSkipped: The procedure message on Terminal if it skipped the call --Pure conveniance --Fetches a menu, installs an entry and implements a command with CDSequencer --menu: pop-up menu, or NIL --entry: entry line for pop up menu --doc: documentation --key: command key (as in tip table, pop-up menu) --proc #NIL: registers proc with CDSequencer --proc NIL: registration of menu entry only --queue: method how proc is called --tech: (NIL for all technologies); used for command registration but not for menu --There are two classes of tools -- Standard tools register commands with CDSequencer, -- they do not make PopUp menus themself -- Fancy tools might not be included in the PopUp menu table file -- they might consider registering a menu themself, after they are loaded --Registers a command to set layer current layer Κ¦˜codešœ,™,Kšœ Οmœ7™BKšœ:™:K™BK˜—šΟk ˜ Kšžœ˜Kšœ ˜ Kšœžœžœ˜—K˜KšΟn œžœž œ˜!Kšž˜K™Kšœ1™1K˜šŸœžœFžœžœžœžœžœžœžœ žœ˜ΆKšœ.™.Kšœ.™.KšœH™HKšœ ™ Kšœ/™/Kšœ5™5KšœO™O—K˜šŸœžœžœžœ žœžœžœ žœ/žœ žœ˜ΔK™K™MKšœ™Kšœ$™$Kšœ™Kšœ2™2Kšœ-™-Kšœ,™,Kšœ"™"KšœR™RK™ K™7K™*K™CK™K—K˜šŸœžœžœ žœžœ žœžœ ˜iK™1—K˜Kšžœ˜K˜—…—J „