DIRECTORY CD USING [Design, Instance, InstanceList, InstanceSequence, Object, ObjectClass, Rect, Transformation]; CDCells: CEDAR DEFINITIONS = BEGIN CreateEmptyCell: PROC [] RETURNS [CD.Object]; CreateCell: PROC [il: CD.InstanceList_NIL, sq: CD.InstanceSequence_NIL, ir: CD.Rect_[0,0,-1,-1]] RETURNS [CD.Object]; CreateCellXTransformed: PROC [il: CD.InstanceList_NIL, sq: CD.InstanceSequence_NIL, ir: CD.Rect_[0,0,-1,-1], cTrans: CD.Transformation_[]] RETURNS [CD.Object]; IncludeMode: TYPE = {doit, dontNotify, dontResize}; IncludeOb: PROC [design: CD.Design _ NIL, cell: CD.Object _ NIL, ob: CD.Object, trans: CD.Transformation _ [], mode: IncludeMode _ doit] RETURNS [newInst: CD.Instance, resize: BOOL]; IncludeInstance: PROC [design: CD.Design _ NIL, cell: CD.Object _ NIL, inst: CD.Instance, mode: IncludeMode _ doit] RETURNS [resize: BOOL]; RemoveInstance: PROC [design: CD.Design _ NIL, cell: CD.Object_NIL, inst: CD.Instance, mode: IncludeMode _ doit] RETURNS [resize: BOOL]; SetInterestRect: PROC [design: CD.Design, cell: CD.Object, r: CD.Rect _ [0, 0, -1, -1], mode: IncludeMode _ doit]; ResizeCell: PROC [design: CD.Design, cell: CD.Object] RETURNS [didResize: BOOL]; SetSimplificationTreshhold: PROC [cell: CD.Object, val: REAL_-1, inPixels: BOOL_TRUE]; SetBorderMode: PROC [cell: CD.Object, draw: BOOL]; IsCell: PROC [ob: CD.Object] RETURNS [BOOL] = INLINE { RETURN [ ob.class = pCellClass ] }; IsEmpty: PROC [cell: CD.Object] RETURNS [BOOL]; CountInstances: PROC [cell: CD.Object] RETURNS [INT]; IsPushedIn: PROC [design: CD.Design] RETURNS [yes: BOOL]; IsDummyCell: PROC [cell: CD.Object] RETURNS [BOOL]; ToSequenceMode: PROC [cell: CD.Object]; InstEnumerator: TYPE = PROC [inst: CD.Instance] RETURNS [quit: BOOL_FALSE]; EnumerateInstances: PROC [cell: CD.Object, proc: InstEnumerator] RETURNS [quit: BOOL]; pCellClass: PRIVATE READONLY CD.ObjectClass; END. CDCells.mesa (a ChipNDale module) Copyright (C) 1983, 1987 by Xerox Corporation. All rights reserved. Created by Christian Jacobi, 23-Aug-83 Last edited by: Christian Jacobi, February 24, 1987 11:25:58 am PST -- Procedures for creating cells by programs -- Cell creation -- The newly created cells are not included into any design or directory. -- Use CDDirectory.Include to include cell to a design's directory. -- Use CDCells.Include.. to include instances or objects into existing cells. -- Use CDDirectory to give names to cells. -- Creates a new empty cell. -- Creates a new cell using il and sq. -- Warning: il and sq are directly used; -- Caller must not use those instances, list or sequence elsewhere. -- Creates a new cell, using a de-transformed copy of il, sq and ir -- Cell modifications --A mode parameter for cell modifications -- doit: normal, but slow case: operation will be completed -- dontNotify: speed up hack. -- Does not propagate a change cell event. -- Does not cause redrawing of the design. -- dontResize: [also implies dontNotify] speed up hack. -- Does not call ResizeCell to recompute the draw size; Coordinate system -- invariants can be violated. Caller must promises to call ResizeCell -- himself to reestablish coordinate system invariants. --For designs, neither re-sizing nor notifying is done. --design (NIL: allowed in case cell really is not yet part of a design) --cell (NIL: include into design) --ob: the object to be included in cell --trans: transformation of ob inside cell --mode: see above --newInst: the new created instance; -- if cell is not repositioned, newInst is in coordinate system of unrepositioned cell --resize: Resize was called or should be called, depending of mode --design (NIL: allowed, if cell really is not yet part of a design) --cell (NIL: include into design) --inst: instance to include in cell --mode: see above --resize: Resize was called or should be called, depending of mode --design (NIL: allowed, if cell really is not yet part of a design) --cell (NIL: remove from design) --inst: instance to be removed from cell --mode: see above --resize: Resize was called or should be called, depending of mode --Set the interest rect of a cell --Defaulting r means to use a reasonable default for the interest rect --design (NIL: allowed, if cell really is not yet part of a design, or, mode=dontResize) --Make sure bbox and ir [if defaulted] of a cell are correct --If necessary, propagates size change all over in design, --but does not notify change event. --design (NIL: allowed, if cell really is not yet part of a design). --If inPixels: The cell will be simplified if its height on the screen is smaller than val pixels --val -1: tries a fair guess for val --Sets border drawing mode for cell -- miscellanious --Returns whether the cell is empty --Empty cell are not allowed, but it still is usefull to have a check --Returns the number of instances of a cell --Returns whether the design is pushed into a cell --Returns whether cell is a (mutable) copy of a pushed in cell; then, it could --have been (or can be) changed without call of CDDirectory.PropagateChange --Tries to move as many instances from the list to the sequence as possible --Enumerates the instances of the cell in unspecified order. --If the cell is changed while the enumeration, the changed and maybe other instances --might not be enumerated correctly. --Applies proc to each instance until proc returns TRUE or no more instances. --Returns TRUE if some call returned TRUE Κθ˜codešœ#™#KšœD™DKšœ&™&K™CK˜—šΟk ˜ Kšœœ_˜g—K˜KšΟnœœ œ˜Kš˜K˜K™,K˜K˜™KšœI™IK™CK™MKšΟcœŸœ Ÿ™*K™—K˜šžœœœœ ˜-Kšœ™K™—šž œœœœœœœœœ ˜uKšŸ'™'KšŸΠbcŸ™)KšœŸD™GK™—šžœœœœœœœœœœ ˜ŸKšœC™CK™—K™K™K˜šœ œ"˜3Kšœ)™)Kšœ>™>Kšœ ™ Kšœ,™,Kšœ*™*KšœΟbœ™9KšœJ™JKšœG™GKšœ9™9Kšœ9™9—K˜šž œœ œ œ œ œœœ3œ œœ˜ΌKšœG™GKšœ!™!Kšœ+™+Kšœ)™)Kšœ™Kšœ%™%KšœV™VKšœC™CK˜—šžœœ œ œ œ œ œ&œ œ˜KšœC™CKšœ!™!Kšœ'™'Kšœ™KšœC™CK˜—šžœœ œ œ œœ œ&œ œ˜ŒKšœC™CKšœ ™ Kšœ,™,Kšœ™KšœC™CK˜K˜—š žœœ œœ œ2˜rKšœ!™!KšœF™FKšœX™XK˜—š ž œœ œœ œ œ˜QK™