CDRects.mesa A module of ChipNDale
Copyright © 1983, 1986, 1987 by Xerox Corporation. All rights reserved.
Created by Christian Jacobi, May 3, 1983 10:44 am
Last edited by: Christian Jacobi, March 27, 1987 6:58:31 pm PST
DIRECTORY
CD USING [Position, Layer, ObjectClass, Object];
CDRects: CEDAR DEFINITIONS =
BEGIN
Basic module for creation of rectangle objects.
--Design creation procedures
CreateRect: PROC [size: CD.Position, l: CD.Layer] RETURNS [CD.Object];
--Create a rect-object
--x is considered width, y is considered length
IsBareRect: PROC [ob: CD.Object] RETURNS [BOOL] = INLINE {
RETURN [ob.class=bareRectClass]
};
IsWellRect: PROC [ob: CD.Object] RETURNS [BOOL] = INLINE {
RETURN [ob.class=wellRectClass]
};
IsSimpleRect: PROC [ob: CD.Object] RETURNS [BOOL] = INLINE {
RETURN [ob.class=bareRectClass OR ob.class=wellRectClass]
};
--Technology implementor procedures
UseForCreateRect: PROC [
layer: CD.Layer,
createRect: PROC [size: CD.Position, l: CD.Layer] RETURNS [CD.Object] ← NIL,
hangExtensionsOn: CD.ObjectClass←NIL
];
CreateBareRect: PROC [size: CD.Position, l: CD.Layer] RETURNS [CD.Object];
--Create rect of class bareRectClass (not going through class mechanism)
bareRectClass: PRIVATE READONLY CD.ObjectClass;
wellRectClass: PRIVATE READONLY CD.ObjectClass;
END.