DIRECTORY Rope USING [ROPE], CD USING [Instance, Design, Object, Rect, Position, Orientation], CDDirectory USING [ReplaceList]; CDCells: CEDAR DEFINITIONS = BEGIN IsCell: PROC [ob: CD.Object] RETURNS [BOOL] = INLINE { RETURN [ ob.class.objectType = $Cell ] }; CreateEmptyCell: PROC [] RETURNS [CD.Object]; CoordSystem: TYPE = {cdCoords, interrestCoords, originCoords}; IncludeMode: TYPE = {doit, dontReposition, dontPropagate, dontInclude}; IncludeOb: PROC [design: CD.Design_NIL, cell: CD.Object_NIL, ob: CD.Object, position: CD.Position_[0, 0], --evaluated before an eventual repositioning orientation: CD.Orientation_0, cellCSystem: CoordSystem_originCoords, obCSystem: CoordSystem_originCoords, mode: IncludeMode_doit] RETURNS [newInst: CD.Instance, rep: BOOL]; RemoveInstance: PROC [design: CD.Design_NIL, cell: CD.Object_NIL, inst: CD.Instance, mode: IncludeMode_doit] RETURNS [removed: BOOL, rep: BOOL]; CreateCellSelected: PROC [design: CD.Design, name: Rope.ROPE_NIL] RETURNS [done: BOOL, cellOb: CD.Object]; PushInCellInstance: PROC [design: CD.Design, inst: CD.Instance] RETURNS [done: BOOL]; PopFromCell: PROC [design: CD.Design, m: Method_interactive, name: Rope.ROPE_NIL] RETURNS [done: BOOL]; Method: TYPE = {flush, newcell, replace, interactive}; ReplaceDirectChildForDummyCells: PRIVATE PROC [cellOb: CD.Object, replace: CDDirectory.ReplaceList] RETURNS [needReposition: BOOL]; RepositionCell: PROC [cellOb: CD.Object, design: CD.Design] RETURNS [didReposition: BOOLEAN]; SetInterestRect: PROC [cellOb: CD.Object, r: CD.Rect _ [0, 0, -1, -1]]; IsPushedIn: PROC [design: CD.Design] RETURNS [yes: BOOL] = INLINE { RETURN [ design^.actual.rest#NIL ] }; END. àCDCells.mesa (a ChipNDale module) Copyright c 1983, 1985 by Xerox Corporation. All rights reserved. by Christian Jacobi, 23-Aug-83 last edited Christian Jacobi, June 5, 1985 11:59:51 am PDT --Does not includes the cell into any design or celldirectory. --Does not name the cell. --Use CDDirectory.Include to include this cell to a design's directory. --Use CDCells.IncludeOb to include objects into this cell. -- cdCoords: chipndales internal and native coordinate system used in Instances -- interrestCoords: base of interest-rects. -- originCoords: invariant fake origin which for cells never changes, but might be far off... --design (NIL: allowed, if cell really is not yet part of a design) --cell (NIL: include into design; assumes the designs origin at [0, 0]) -- (design&cell NIL: simply create an application) --ob: object to include in cell --position: ... --orientation: of ob inside cell --cellCSystem: tells reference point in cell (for designs: [0, 0] anyway) --obCSystem: reference point of object --mode: -- doit: normal case everything is done -- dontReposition: speed up hack -- Caution: makes temporary a wrong coordinate system! cell is -- not legal until repositioning is called to clean up. -- Has no effect if cell is NIL. -- Does not cause redrawing of the design. -- dontPropagate: speed up hack. -- does neither reposition nor propagate the changed event; cell gets -- an illegal state until repositioning and change-propagation occurs. -- dontInclude: hack to create instances; cell is not changed at all. --newInst: the new created application --rep: Reposition was done or should be done, depending of mode --design (NIL: allowed, if cell really is not yet part of a design) --cell (NIL: remove from design) -- (design&cell NIL: Error) --ob: object to include in cell --position: ... --orientation: of ob inside cell --cellCSystem: tells reference point in cell (for designs: [0, 0] anyway) --obCSystem: reference point of object --mode: -- doit: normal case everything is done -- dontReposition: speed up hack -- Caution: makes temporary a wrong coordinate system! cell is -- not legal until repositioning is called to clean up. -- Has no effect if cell is NIL. -- Does not cause redrawing of the design. -- dontPropagate: speed up hack. -- does neither reposition nor propagate the changed event; cell gets -- an illegal state until repositioning and change-propagation occurs. -- dontInclude: hack to create instances; cell is not changed at all. --rep: Reposition was done or should be done, depending of mode --name=NIL: interactive read for name. --name#NIL: hint for name; may be modified. --If done: cell is included in directory of design. --message of problem if not done --message of problem if not done --is like a real ReplaceDChildsProc, but does not start a recursive repositioning --save --defaulting r means to use a reasonable default for the interest rect --does not propagate the change; caller must cause correct propagation separately ÊA˜šœ#™#Jšœ Ïmœ7™BJšœ™Jšœ:™:J˜—šÏk ˜ Jšœžœžœ˜Jšžœžœ9˜AJšœ žœ˜ J˜—JšÏnœžœž œ˜Jšž˜J˜š Ÿœžœžœ žœžœžœ˜6Jšžœ ˜&J˜—J˜šŸœžœžœžœ ˜-Jšœ>™>JšÏc™J™GJ™:—J™J˜šœ žœ-˜>JšœO™OJšœ+™+Jšœ]™]—J˜Jšœ žœ6˜GJ˜šŸ œžœ žœžœžœžœžœ ˜LJšœ žœ ,˜KJšœ žœ˜Jšœ(˜(Jšœ%˜%šœ˜Jšžœ žœžœ˜*—JšœC™CJšœG™GJšœ3™3Jšœ#™#Jšœ™Jšœ!™!JšœI™IJšœ&™&Jšœ™Jšœ(™(Jšœ!™!Jšœ œ6™AJšœ8™8Jšœ!™!Jšœ+™+Jšœ!™!JšœG™GJšœH™HJšœF™FJšœ&™&Jšœ@™@—J˜šŸœžœ žœžœžœžœžœ ˜UJšœžœ žœžœ˜;JšœC™CJšœ ™ Jšœ™Jšœ#™#Jšœ™Jšœ!™!JšœI™IJšœ&™&Jšœ™Jšœ(™(Jšœ!™!Jšœ œ6™AJšœ8™8Jšœ!™!Jšœ+™+Jšœ!™!JšœG™GJšœH™HJšœF™FJšœ@™@—J˜J˜š Ÿœžœ žœžœžœ˜BJšžœžœ žœ ˜(Jšœ&™&Jšœ+™+Jšœ3™3J˜—š Ÿœžœ žœžœžœ˜UJšœ ™ —J˜š Ÿ œžœ žœ+žœžœ˜RJšžœžœ˜Jšœ ™ Jšœžœ*˜6J˜—šÐbnœžœžœ žœ+˜dJšžœžœ˜JšœQ™Q—J˜š Ÿœžœ žœžœ žœžœ˜^Jšœ™—J™šŸœžœ žœ žœ˜GJšœF™FJ™Q—J˜š Ÿ œžœ žœ žœžœžœ˜CJšžœžœ˜"Jšœ˜—J˜Jšžœ˜J˜—…—¦Ç