DIRECTORY CD; CDInstances: CEDAR DEFINITIONS = BEGIN PointToO: PROC [pos: CD.Position, inst: CD.Instance] RETURNS [BOOL]; PointToI: PROC [pos: CD.Position, inst: CD.Instance] RETURNS [BOOL]; HitInstance: PROC[inst: CD.Instance, hitRect: CD.Rect] RETURNS [BOOL]; InstRectO: PROC [inst: CD.Instance] RETURNS [CD.Rect]; InstRectI: PROC [inst: CD.Instance] RETURNS [CD.Rect]; BoundingRectO: PROC [list: CD.InstanceList, selectedOnly: BOOL_FALSE] RETURNS [CD.Rect]; BoundingRectI: PROC [list: CD.InstanceList, selectedOnly: BOOL_FALSE] RETURNS [CD.Rect]; InstanceAt: PROC [il: CD.InstanceList, pos: CD.Position, selectedOnly: BOOL_FALSE] RETURNS [CD.Instance]; DeSelectList: PROC [list: CD.InstanceList]; AppendToList: PROC [inst, to: CD.InstanceList] RETURNS [CD.InstanceList]; SplitSelected: PROC [il: CD.InstanceList] RETURNS [selected, others: CD.InstanceList]; OnlySelected: PROC [il: CD.InstanceList] RETURNS [selected: CD.InstanceList]; NewInst: PROC [ob: CD.Object, trans: CD.Transformation_[], properties: CD.PropList_NIL, selected: BOOL _ FALSE] RETURNS [CD.Instance]; Copy: PROC [inst: CD.Instance] RETURNS [CD.Instance]; Composed: PROC [inst: CD.Instance, trans: CD.Transformation] RETURNS [CD.Instance]; DeComposed: PROC [inst: CD.Instance, trans: CD.Transformation] RETURNS [CD.Instance]; CopyList: PROC [il: CD.InstanceList] RETURNS [CD.InstanceList]; ComposedList: PROC [il: CD.InstanceList, trans: CD.Transformation] RETURNS [CD.InstanceList]; DeComposedList: PROC [il: CD.InstanceList, trans: CD.Transformation] RETURNS [CD.InstanceList]; Member: PROC [inst: CD.Instance, il: CD.InstanceList] RETURNS [BOOL]; Length: PROC [il: CD.InstanceList] RETURNS [INT]; END. œCDInstances.mesa (A ChipNDale module) Copyright c 1983, 1986 by Xerox Corporation. All rights reserved. Created by Christian Jacobi, May 12, 1983 12:22 pm Last edited by: Christian Jacobi, October 30, 1986 10:22:58 am PST Procedures with vanilla stuff around instances --Contents --be careful, InstanceList's are lists of pointers, distinguish between: --procedures which modify the instance list, from procedures which don't --procedures which modify the instances pointed to, from procedures which don't --procedures which modify an instance list, from procedures which modify the instances --procedures inspecting an instance or a list -- Returns "pos points to the inst", using its draw area -- Returns "pos points to the instance" -- Returns "hitRect points to the instance" -- Returns draw rect -- Returns interest rect -- Bounding box, using drawing area -- Bounding box, interest area -- Returns a an instance at location pos (or NIL if there is none) -- Uses interest area's --procedures which modify the instance or list in place -- Composes the lists "inst" and "to" -- The original list "to" might be destroyed and must be replaced by the returned list -- The original list "inst" is not touched --procedures which handle the instance list but don't make new the instances -- Copy the selected instance refs from "il" to "selected" -- Copy the non-selected instance refs from "il" to "others" -- Returns new lists but same instances -- Returns new list but same instances --procedures which create a new instance list, with new instances -- Creates a new instance, does neither draw nor include it into any world -- Makes a copy -- Makes a composed copy -- Given "inst" an instance inside a cell, computes an instance in world coordinates -- makes a decomposed copy -- Given "inst" an instance in world coordinates, computes an instance in cell coordinates -- Creates a new list with new, copied instances (order not preserved) -- Makes a copy of "il" with world coordinates assumed that "il" has cell coordinates -- and trans is the transformation of the cell instance -- The new list points to new instances (order not preserved) -- Makes a copy of "il" with cell coordinates assumed il has world coordinates -- and trans is the transformation of the cell instance -- The new list points to new instances (order not preserved) --vanilla procedures -- Returns whether inst is a member of il -- Returns number of instances in il Κn˜codešœ(™(Kšœ Οmœ7™BKšœ3™3K™BK˜—Kšœ.™.K˜šΟk ˜ Kšžœ˜—K˜KšΟn œžœž œ˜!Kšž˜K˜šœ ™ KšœH™HKšœH™HKšœO™OKšœV™VK˜—K˜Kšœ-™-K˜š Ÿœžœžœžœ žœžœ˜EKšœ8™8K˜—š Ÿœžœžœžœ žœžœ˜DKšœ'™'—K˜š Ÿ œžœžœžœžœžœ˜FKšœ,™,—K˜š Ÿ œžœžœ žœžœ˜6Kšœ™K˜—š Ÿ œžœžœ žœžœ˜6Kšœ™K˜—K˜šŸ œžœžœžœžœžœžœ˜XKšœ#™#K™—šŸ œžœžœžœžœžœžœ˜XKšœ™—K™K˜šŸ œžœžœžœžœžœžœžœ ˜iKšœB™BK™K˜—K˜Kšœ7™7K˜šŸ œžœžœ˜+K˜—š Ÿ œžœ žœžœžœ˜IKšœ%™%KšœV™VKšœ+™+K˜—K™KšœL™LK˜š Ÿ œžœžœžœžœ˜VKšœ:™:Kšœ<™