CDCells.mesa (a ChipNDale module)
Copyright © 1983, 1985 by Xerox Corporation. All rights reserved.
by Christian Jacobi, 23-Aug-83
last edited Christian Jacobi, April 11, 1985 12:26:31 pm PST
DIRECTORY
Rope USING [ROPE],
CD USING [Design, ObPtr, DesignRect],
CDDirectory USING [ReplaceList];
CDCells: CEDAR DEFINITIONS =
BEGIN
IsCell: PROC [ob: CD.ObPtr] RETURNS [BOOL] = INLINE {
RETURN [ ob.p.objectType = $Cell ]
};
CreateEmptyCell: PROC [] RETURNS [CD.ObPtr];
--Does not includes the cell into any design or celldirectory.
--Does not name the cell.
--Use CDDirectory.Include to include cell to a design.
CreateCellSelected: PROC [design: CD.Design, name: Rope.ROPENIL]
RETURNS [done: BOOL, cellOb: CD.ObPtr];
--name=NIL: interactive read for name.
--name#NIL: hint for name; may be modified.
--If done: cell is included in directory of design.
PushInCellSelected: PROC [design: CD.Design] RETURNS [done: BOOL];
--message of problem if not done
PopFromCell: PROC [design: CD.Design, m: Method←interactive, name: Rope.ROPENIL]
RETURNS [done: BOOL];
--message of problem if not done
Method: TYPE = {flush, newcell, replace, interactive};
ReplaceDirectChildForDummyCells: PRIVATE PROC [cellOb: CD.ObPtr, replace: CDDirectory.ReplaceList]
RETURNS [needReposition: BOOL];
--is like a real ReplaceDChildsProc, but does not start a recursive repositioning
RepositionCell: PROC [cellOb: CD.ObPtr, design: CD.Design] RETURNS [didReposition: BOOLEAN];
SetInterestRect: PROC [cellOb: CD.ObPtr, r: CD.DesignRect ← [0, 0, -1, -1]];
--defaulting r means to use a reasonable default for the interest rect
END.