DIRECTORY CD, CDBasics, CDOrient; CDInstances: CEDAR DEFINITIONS IMPORTS CDBasics, CDOrient = BEGIN PointToO: PROC [pos: CD.Position, inst: CD.Instance] RETURNS [BOOL] = INLINE {RETURN [CDBasics.InsidePos[pos, InstRectO[inst]]]}; 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] = INLINE {RETURN [CDOrient.RectAt[inst.location, inst.ob.size, inst.orientation]]}; InstRectI: PROC [inst: CD.Instance] RETURNS [CD.Rect]; NewInstance: PROC [ob: CD.Object, location: CD.Position_[0,0], orientation: CD.Orientation_0, selected: BOOL _ FALSE, properties: CD.Properties_NIL] RETURNS [CD.Instance]; Transform: PROC [inst: CD.Instance, cellRect: CD.Rect, transformation: CD.Orientation]; Translate: PROC [inst: CD.Instance, offset: CD.Position] = INLINE {inst.location _ CDBasics.AddPoints[inst.location, offset]}; 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]; TransformList: PROC[il: CD.InstanceList, cellRect: CD.Rect, transformation: CD.Orientation]; TranslateList: PROC[il: CD.InstanceList, offset: CD.Position]; DeSelectList: PROC [list: CD.InstanceList]; AppendToList: PROC [inst, to: CD.InstanceList] RETURNS [CD.InstanceList]; SplitPointed: PROC [from: CD.InstanceList, pos: CD.Position] RETURNS [pointed, others: CD.InstanceList]; SplitSelected: PROC [from: CD.InstanceList] RETURNS [selected, others: CD.InstanceList]; OnlySelected: PROC[il: CD.InstanceList] RETURNS [selected: CD.InstanceList]; CopyList: PROC[il: CD.InstanceList] RETURNS [CD.InstanceList]; ComposedCopy: PROC[il: CD.InstanceList, cellPos, cellSize: CD.Position, cellOrient: CD.Orientation] RETURNS [CD.InstanceList]; DeComposedCopy: PROC[il: CD.InstanceList, cellPos, cellSize: CD.Position, cellOrient: CD.Orientation] RETURNS [CD.InstanceList]; END. VCDInstances.mesa (A ChipNDale module) Copyright c 1983, 1985 by Xerox Corporation. All rights reserved. by Christian Jacobi, May 12, 1983 12:22 pm last edited by Christian Jacobi, June 11, 1985 10:07:21 am PDT --Procedures with vanilla stuff around instances --be carefull, 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 around one instance --returns "pos points to the inst", using its virtual coordinates --returns "pos points to the instance", using its virtual coordinates --returns "hitRect points to the instance" --interrest rect --creates a new instance, does neither draw nor include it into any world --modifies location such that interest-rect is at original location --performs "transformation" to "inst"; the transformation occurs to the rect "cellRect". --"cellRect" and "inst" in the same coordinate system --transformation group NOT abelsch --translates inst^ by offset; inst, offset in same coordinate system --procedures inspecting an instance list --real coordinates --uses outer area's --real coordinates --uses interest area's --returns a reference to an instance at location pos (or NIL if there is none) --uses interest area's --procedures which modify the instances referenced by a list --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 modify the instances --copyes the pointed instance references from "from" to "pointed" --finds maximal 1 pointed instance --copyes the non-pointed instance references from "from" to "others" --does not make copies of the real instances --copyes the selected instance references from "from" to "selected" --copyes the non-selected instance references from "from" 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 list with new instances --makes a copy of "il" with world coordinates assumed that "il" has cell coordinates --cellSize in cell coordinates, cellPos in world cordinates --the new list points to new instances --makes a copy of "il" with cell coordinates assumed il has world coordinates --cellSize in cell coordinates --cellPos, cellOrient in world coordinates --the new list points to new instances ÊÞ˜šœ(™(Jšœ Ïmœ7™BJšœ+™+Jšœ>™>J˜—Jšœ0™0J˜šÏk ˜ Jšžœ˜Jšœ ˜ J˜ J˜—šÏb œžœž œ˜Jšžœ˜—Jšž˜J˜JšœI™IJšœH™HJšœO™OJšœV™VJ˜J˜Jšœ ™ J˜š Ïnœžœžœžœ žœžœ˜FJšœA™AJšžœžœ-˜;J˜—š  œžœžœžœ žœžœ˜DJšœE™E—J˜š   œžœžœžœžœžœ˜FJšœ+™+—J˜š   œžœžœ žœžœ˜7JšžœžœC˜QJ˜—š   œžœžœ žœžœ˜6Jšœ™J˜—š  œžœžœ ˜"Jšœ žœžœ˜;Jš œ žœžœžœ žœžœžœ ˜NJšœI™IJšœC™CJ˜—J˜š  œžœžœ ˜$Jšœ žœžœ˜3JšœX™XJšœ5™5Jšœ"™"J˜—š  œžœžœžœ ˜:JšœD™DJšžœ=˜CJ˜J˜—Jšœ(™(J˜š   œžœžœžœžœ˜EJšžœžœ˜Jšœ™J™J™—š   œžœžœžœžœ˜EJšžœžœ˜Jšœ™J™—J™š  œžœžœžœžœžœžœžœ ˜iJšœN™NJ™J˜—™J˜—Jšœ<™J˜Jš  œžœžœ˜+J˜š   œžœ žœžœžœ˜IJšœ$™$JšœU™UJšœ*™*J˜—J™JšœJ™JJ˜š   œžœžœžœ žœžœ˜hJšœA™AJšœ"™"JšœD™DJšœ,™,—J™š   œžœžœžœžœ˜XJšœC™CJšœE™EJšœ&™&—J™š   œžœžœžœ žœ˜LJšœ%™%J˜—JšœA™AJ˜š  œžœžœžœžœ˜>Jšœ'™'J˜—š  œžœžœ˜(Jš œžœžœžœžœ˜VJšœT™TJšœ;™;Jšœ&™&J˜—š œžœžœ˜*Jš œžœžœžœžœ˜VJšœM™MJšœ™Jšœ*™*Jšœ&™&J˜—Jšžœ˜—…—`”