DIRECTORY CD, Rope USING [ROPE]; CDOps: CEDAR DEFINITIONS = BEGIN CreateDesign: PROC [technology: CD.Technology] RETURNS [design: CD.Design]; ResetDesign: PROC [design: CD.Design]; RealTopCell: PROC [design: CD.Design] RETURNS [dummyCell: CD.Object]; PushedTopCell: PROC [design: CD.Design] RETURNS [dummyCell: CD.Object]; LambdaRope: PROC [n: CD.Number, lambda: CD.Number] RETURNS [Rope.ROPE]; InstRope: PROC[inst: CD.Instance, verbosity: INT_1] RETURNS [Rope.ROPE]; ObjectRope: PROC [ob: CD.Object] RETURNS [Rope.ROPE]; LayerRope: PROC [layer: CD.Layer] RETURNS [Rope.ROPE]; ToRope: PROC [x: REF, whenFailed: REF_NIL] RETURNS [Rope.ROPE]; DrawDesign: PROC [design: CD.Design, pr: CD.DrawRef]; QuickDrawDesign: PROC [design: CD.Design, pr: CD.DrawRef]; ImmediateRedraw: PROC [design: CD.Design, r: CD.Rect_all, eraseFirst: BOOL_TRUE]; Redraw: PROC [design: CD.Design, r: CD.Rect_all, eraseFirst: BOOL_TRUE]; all: PRIVATE CD.Rect = [FIRST[CD.Number], FIRST[CD.Number], LAST[CD.Number], LAST[CD.Number]]; DoTheDelayedRedraws: PROC [design: CD.Design]; RedrawInstance: PROC [design: CD.Design, inst: CD.Instance_NIL, erase: BOOL_TRUE]; SetInstList: PROC [design: CD.Design, instList: CD.InstanceList _ NIL] = INLINE { design^.actual.first.specific.contents _ instList }; InstList: PROC [design: CD.Design] RETURNS [CD.InstanceList] = INLINE { RETURN[design^.actual.first.specific.contents] }; IncludeInstance: PROC [design: CD.Design, inst: CD.Instance, draw: BOOL _ TRUE]; IncludeInstanceList: PROC [design: CD.Design, il: CD.InstanceList, draw: BOOL _ TRUE]; RemoveInstance: PROC [design: CD.Design, inst: CD.Instance, draw: BOOL _ TRUE]; ReOrderInstance: PROC [design: CD.Design, inst: CD.Instance]; IncludeObject: PROC [design: CD.Design, ob: CD.Object, trans: CD.Transformation_[[0,0], original]]; FitObjectI: PROC [ob: CD.Object, location: CD.Position _ [0, 0], orientation: CD.Orientation _ CD.Orientation[original]] RETURNS [trans: CD.Transformation]; IncludeObjectI: PROC [design: CD.Design, ob: CD.Object, location: CD.Position _ [0, 0], orientation: CD.Orientation _ CD.Orientation[original]]; SelectedInstance: PROC [design: CD.Design] RETURNS [first: CD.Instance, multiple: BOOL]; TheInstance: PROC [design: CD.Design, text: Rope.ROPE_NIL] RETURNS [inst: CD.Instance]; PlaceInst: PROC [design: CD.Design, ob: CD.Object, hint: REF_NIL] RETURNS [inst: CD.Instance]; BoundingBox: PROC [design: CD.Design, onlySelected: BOOL _ FALSE] RETURNS [CD.Rect]; END. ΄CDOps.mesa (part of ChipNDale) Copyright c 1983, 1986 by Xerox Corporation. All rights reserved. Created by: Christian Jacobi, February 24, 1984 2:03 pm Last edited by: Christian Jacobi, October 21, 1986 12:56:18 pm PDT simple operation on ChipNDale designs. All procedures do not queue; proper synchronization by the caller is assumed. (Except CreateDesign, Redraw, or ImmediateRedraw, and the printing procs, which can be called anytime) --basics --Creates a new, empty design; does not open a viewer yet. --Caller holds the synchronization lock until a viewer is opened. --Makes design empty --Returns dummy cell which represents the top level of the design. --Do not reposition dummyCell; dummyCell can be changed without -- calling CDDirectory.PropagateChange. --Do not include dummyCell in directory --Returns dummy cell which represents the pushed in cell of the design; --- (The level where all the interactive edits happen) --Do not reposition dummyCell; represents can be changed without -- calling CDDirectory.PropagateChange --Do not include dummyCell in directory --printing --For printing purposes --For printing purposes --For printing purposes; use in cases where instance is not available --For printing purposes --Tries hard to make rope; for printing purposes --drawing --Draws a design into a device --No shortcuts, usefull for abstract devices --drawing into viewers --Draw a design into a device, using the quick draw procedures --Shortcuts are taken; suits the implementation of viewers --Refreshes the the area r in all viewers without extra delay [drawing is forked] --Refreshes the the area r in all viewers --Is delayed until the current command is finished --Efficiency hint: -- if a lot of small rectangles need to be redrawn, it can be more efficient -- to call a redraw of a big rectangle first. --Forwards all Redraw requests which have not yet been drawn to the viewers. --Should be called from the command sequencer --Redraws the instance (delayed) --handling instances on a design basis --Sets instance list of the currently pushed in cell of the design --Returns instance list of the currently pushed in cell of the design --Includes instance into design [pushed cell] --Includes instances into design [pushed cell] --Removes instance from design [pushed cell] --Puts instance at the end [pushed cell] --Used to make next selection finding different instance --Conveniance: Includes object into design [pushed cell] --Side effect: Sets selection according to internal selection mode --returns a transformation which would fit the object's base of interestrect --into point "location" --Conveniance: Includes object into design [pushed cell] --Fancy coordinate transformation: -- fits oriented objects lower left corner of interest rect to location --Side effect: Sets selection according to internal selection mode --first: returns ref to any selected instance if there is one or more, otherwise NIL. --multiple: more than one instance is selected -- Finds the single selected instance of a design -- if returned instance is nil, all messages are made and caller might return quietly -- if returned instance is not nil; text line is written. --Places ob down, somewhere into design and returns the instance made --Makes a guess for a good position --hint: hint to find gridding information -- use NIL, ViewerClasses.Viewer, or CDSequencer.Command --Bounding box of whole design --Empty for empty design ΚΫ˜codešœ%™%Kšœ Οmœ7™BKšœ9™9K™B—K˜šΟk ˜ Kšžœ˜Kšœžœžœ˜K˜—KšΟnœžœž œ˜Kšž˜K˜™&KšœO™OKšœK™KKšœ™K™—K™K™K™š Ÿ œžœžœ žœ žœ ˜KKšœ:™:KšœA™A—K˜šŸ œžœ žœ ˜&K™—K˜K˜š Ÿ œžœ žœ žœ žœ ˜EKšœB™BKšœ@™@Kšœ*™*Kšœ(™(—K˜š Ÿ œžœ žœ žœ žœ ˜GKšœG™GK™8KšœA™AKšœ(™(Kšœ(™(—K˜K™K™ K˜š Ÿ œžœžœžœ žœžœ˜GK™—K˜š Ÿœžœžœžœžœžœ˜HK™—K˜š Ÿ œžœžœ žœžœž˜5K™E—K˜š Ÿ œžœžœžœžœ˜6K™—K˜šŸœžœžœžœžœžœžœ˜?K™0K˜—K™K™ K˜šŸ œžœ žœ žœ ˜5Kšœ™Kšœ,™,—K˜K™K™K™šŸœžœ žœ žœ ˜:Kšœ>™>Kšœ:™:K˜—š Ÿœžœ žœ žœžœžœ˜QKšœQ™Q—K˜š Ÿœžœ žœ žœžœžœ˜HKšœ)™)Kšœ2™2Kšœ™KšœP™PKšœ0™0Kšœžœžœ žœžœ žœžœ žœžœ žœžœ ˜^K˜—šŸœžœ žœ ˜.KšœL™LKšœ-™-K˜—šŸœžœ žœžœ žœ žœžœ˜RK™ —K˜K˜K™'K˜š Ÿ œžœ žœ%žœžœ˜QKšœB™BKšœ1˜1Kšœ˜K˜—š Ÿœžœ žœ žœžœ˜GKšœE™EKšžœ(˜.Kšœ˜—K˜š Ÿœžœ žœžœžœžœ˜PK™-—K˜š Ÿœžœ žœ žœžœžœ˜VK™.—K˜š Ÿœžœ žœžœžœžœ˜OK™,—K˜šŸœžœ žœžœ ˜=K™(K™8K˜K˜—š Ÿ œžœ žœ žœžœ#˜cKšœ9™9KšœB™B—K˜šŸ œžœžœžœ!žœžœžœ žœ˜œK™MKšœ™—K˜šŸœžœ žœ žœžœ!žœžœ˜Kšœ9™9K™#K™JKšœB™B—K˜š Ÿœžœ žœ žœ žœžœ˜XKšœU™UKšœ.™.K™—šŸ œžœ žœžœžœžœžœ ˜WK™1KšœX™XKšœ<™