DIRECTORY Rope USING [ROPE], CD USING [Design, ObPtr, DesignPosition, ApplicationPtr]; CDCells: CEDAR DEFINITIONS = BEGIN CreateEmptyCell: PROC [] RETURNS [CD.ObPtr]; CreateCellSelected: PROC [design: CD.Design, name: Rope.ROPE_NIL] RETURNS [done: BOOL, cellOb: CD.ObPtr]; PushInCellSelected: PROC [design: CD.Design] RETURNS [done: BOOL]; PushInCellPointed: PROC [design: CD.Design, pos: CD.DesignPosition] RETURNS [done: BOOL]; PopFromCell: PROC [design: CD.Design, m: Method_interactive, name: Rope.ROPE_NIL] RETURNS [done: BOOL]; Method: TYPE = {flush, newcell, replace, interactive}; RemoveApplication: PROC [design: CD.Design, cell: CD.ObPtr, aptr: CD.ApplicationPtr, draw: BOOL_TRUE] RETURNS [removed: CD.ApplicationPtr_NIL, repositioned: BOOL_FALSE]; IncludeApplication: PROC [design: CD.Design, cell: CD.ObPtr, aptr: CD.ApplicationPtr, draw: BOOL_TRUE, relativeTo: CD.ApplicationPtr_NIL] RETURNS [repositioned: BOOL_FALSE]; END. PCDCells.mesa (a Chipndale module) by Christian Jacobi 23-Aug-83 last edited Christian Jacobi March 2, 1984 5:36:26 pm PST --Does not includes the cell into any design or celldirectory. --Does not name the cell. --Use CDDirectory.Include to include cell to a design. --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 --message of problem if not done --If necessary, modifies the boundary and translates all applications of the cell, -- and further, translates all the instances of the cell. This changes the -- parent cells, which therefore may be repositioned recursively too. --noop if cell does not contain aptr (directly). --Do not assume aptr^ to be freed for other use but use removed; -- removed=NIL: aptr has not successfully been removed -- removed#NIL: aptr is removed, removed is a copy of aptr for arbitrary re-use --If design=NIL: to handle cells which are not part of any design --aptr^ is supposed to be referenced by aptr exclusively, and aptr^ may be changed by -- IncludeApplication. --If necessary, modifies the boundary and translates all applications of the cell, -- and further, translates all the instances of the cell. This changes the -- parent cells, which therefore may be repositioned recursively too. --relativeTo#NIL: handy but trivial hook for clients which fear that repositioning -- fools their origin: aptr is first translated by relativeTo.location: if relativeTo -- points to an application of the cell itself, repositioning changes relativeTo^ -- exactly the right amount to compensate for the repositioning. It is the clients -- responsibility that relativeTo is actual contained by cell. --If design=NIL: to handle cells which are not part of any design Ê_˜Jšœ#™#J˜Jšœ™Jšœ;™;J˜šÏk ˜ Jšœœœ˜Jšœœ1˜9J˜—JšÏnœœ œ˜Jš˜J˜šžœœœœ˜,Jšœ>™>JšÏc™J™6—J™š žœœ œœœ˜BJšœœ œ˜'Jšœ&™&Jšœ+™+Jšœ3™3J˜—š žœœ œ œœ˜BJšœ ™ —š žœœ œœœœ˜YJšœ ™ —J˜š ž œœ œ+œœ˜RJšœœ˜Jšœ ™ Jšœœ*˜6J˜—šžœœ œœœœœœ œœœœ˜©J™RJ™KJ™GJšœ0™0JšœA™AJšœ6™6JšœO™OJ™AJ™—šžœœ œœœœœœœœœœ˜­JšœU™UJšœ™JšœR™RJšœK™KJšœG™GJšœT™TJšœV™VJšœR™RJšœT™TJšœ>™>J™AJ˜—Jšœ˜J˜J™—…—¸ g