DIRECTORY CD, CDSequencer, Rope USING [ROPE]; CDCommandOps: CEDAR DEFINITIONS = BEGIN CommandProc: TYPE = CDSequencer.CommandProc; Command: TYPE = CDSequencer.Command; 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]; IncludeOb: PROC [comm: CDSequencer.Command, ob: CD.Object, failMessage: Rope.ROPE_NIL]; RegisterCommanderNewDesign: PROC [technology: CD.Technology]; END. VCDCommandOps.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, January 28, 1987 3:22:30 pm PST 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 --Includes object into design and makes (always!) a message --failMessage: output if ob is NIL --Trivial procedure, but used often enough --Registers a commander command to create a new design Κ ˜codešœ,™,Kšœ Οmœ7™BKšœ:™:K™AK™—šΟk ˜ Kšžœ˜Kšœ ˜ Kšœžœžœ˜—K˜KšΟn œžœž œ˜!Kšž˜K™Kšœ1™1K˜K˜Kšœ žœ˜,Kšœ žœ˜$K˜šŸœžœ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˜š Ÿ œžœ!žœžœžœ˜WKšΟc;™;Kšœ#™#K™*—K˜šŸœžœžœ ˜=K™6—K˜Kšžœ˜K˜—…—6 ˜