CDPinObjects.mesa (part of Chipndale)
Copyright © 1984, 1985 by Xerox Corporation. All rights reserved.
by Christian Jacobi, August 8, 1984 12:41:50 pm PDT
last edited Christian Jacobi, April 11, 1985 3:25:13 pm PST
DIRECTORY
CD, Rope;
CDPinObjects: CEDAR DEFINITIONS =
BEGIN
--Pins are objects to associate names and properties to rectangular areas.
--All the actual pins properties like name, layer, propertylist
--and its semantics are bound to the Application.
--In general, the meaning of a pin is not known, but it is assumed some
--client program knows it. NIL owner means:
--  At this area, connection in the particaular layer can be made.
--Pin objects will NOT have an special interrest-rect specified, their interrest
--area is the real rect. It is common to have several pins with the same name.
pinLayer: READONLY CD.Layer;
CreatePinOb: PROC [size: CD.DesignPosition] RETURNS [CD.ObPtr];
IsPinOb: PROC [ob: CD.ObPtr] RETURNS [BOOL];
CreatePinApp: PROC [name: Rope.ROPE, rect: CD.DesignRect, lev: CD.Layer←CD.combined, owner: ATOMNIL] RETURNS [CD.ApplicationPtr];
IsPinApp: PROC [app: CD.ApplicationPtr] RETURNS [BOOL] = INLINE {
RETURN [IsPinOb[app.ob]]
};
SetOwner: PROC [pinApp: CD.ApplicationPtr, owner: ATOMNIL];
GetOwner: PROC [pinApp: CD.ApplicationPtr] RETURNS [ATOM];
--if owner is not NIL it must be registered with CDProperties
SetName: PROC [pinApp: CD.ApplicationPtr, name: Rope.ROPE];
GetName: PROC [pinApp: CD.ApplicationPtr] RETURNS [Rope.ROPE];
SetLayer: PROC [pinApp: CD.ApplicationPtr, lev: CD.Layer];
GetLayer: PROC [pinApp: CD.ApplicationPtr] RETURNS [CD.Layer];
--if layer=CD.combined means: not yet determined, or either: pin has more complex functionality
AppEnumerator: TYPE = PROC [app: CD.ApplicationPtr] RETURNS [quit: BOOLFALSE];
EnumeratePins: PROC [ob: CD.ObPtr←NIL, eachPin: AppEnumerator] RETURNS [quit: BOOL];
--Random order; changes on pins while the enumeration may or may not be seen.
FindPins: PROC [ob: CD.ObPtr←NIL, pinName: Rope.ROPE] RETURNS [CD.ApplicationList];
--Returns all pins with name "name"
--For rect: use CDApplications.ARectO or ARectI
--For size: use object size
--  (Interestrects for pins must not be set).
END.