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. ’CDCells.mesa (a Chipndale module) Copyright c 1983, 1984 by Xerox Corporation. All rights reserved. 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 Êi˜šœ#™#Jšœ Ïmœ7™BJšœ™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™—…—¶ ±