IconConstruction.mesa
Copyright Ó 1987 by Xerox Corporation. All rights reserved.
Jean-Marc Frailong, September 4, 1987 4:57:55 pm PDT
Don Curry June 11, 1988 11:52:09 am PDT
Various utilities for schematics in ChipNDale.
DIRECTORY
CD, CDTexts, CoreGeometry, Rope;
IconConstruction: CEDAR DEFINITIONS
~ BEGIN
Generation of CD shells & icons
This section also implements the icon generation CD command
Shell: TYPE ~ REF ShellRep;
ShellRep: TYPE ~ RECORD [
name: Rope.ROPENIL, -- The short name of the icon, i.e. excluding the ".icon" part
pinLayer: CD.Layer, -- the layer on which pins should be drawn
boxLayer: CD.Layer, -- the layer on which the box should be drawn
boxWidth: CD.Number, -- Width of lines for icon box
pinRect: CD.Position, -- Size of pins (vertical pin)
guard: CD.Number, -- Spacing between pin and pin name
grid: CD.Number, -- The grid on which pins should be aligned
font: CDTexts.CDFont, -- ChipNDale font to be used for all texts
pins: ARRAY CoreGeometry.Side OF LIST OF Rope.ROPE -- The sorted pin names on all four sides
];
A Shell contains the information necessary to create a CD object having a specified set of publics. It is used for example to generate the icon for a schematic.
NewShell: PROC [name: Rope.ROPE, pins: ARRAY CoreGeometry.Side OF LIST OF Rope.ROPE, design: CD.Design, pinLayer: CD.Layer ← CD.commentLayer, boxLayer: CD.Layer ← CD.commentLayer] RETURNS [shell: Shell];
Create a Shell from the list of pin names on each side and the layers for the various objects. All other variables from the shell are defaulted from the design to fit the design style for Sisyph icons.
ShellObject: PROC [shell: Shell] RETURNS [obj: CD.Object];
Create the CD object from the shell description.
END.