CDSymbolicObjectsCommands.mesa (part of ChipNDale)
Copyright © 1984, 1985 by Xerox Corporation. All rights reserved.
by Christian Jacobi, August 6, 1984 6:41:30 pm PDT
last edited Christian Jacobi, September 2, 1985 3:43:00 pm PDT
DIRECTORY
CD,
CDBasics,
CDDefaults,
CDInstances,
CDMarkObjects,
CDOps,
CDPinObjects,
CDSequencer,
Rope,
TerminalIO;
CDSymbolicObjectsCommands:
CEDAR
PROGRAM
IMPORTS CDBasics, CDDefaults, CDInstances, CDMarkObjects, CDOps, CDPinObjects, CDSequencer, Rope, TerminalIO =
BEGIN
MakePin:
PROC [comm: CDSequencer.Command] =
BEGIN
name: Rope.ROPE;
r: CD.Rect = CDBasics.ToRect[comm.pos, comm.sPos];
pinInstance: CD.Instance;
layer: CD.Layer ← CDDefaults.CurrentLayer[comm.design];
TerminalIO.WriteRope[Rope.Cat["Draw Pin (", CDOps.LayerName[layer], ")\n"]];
name ← TerminalIO.RequestRope[" type name of pin: "];
pinInstance ← CDPinObjects.CreatePinInstance[rect: r, lev: layer, name: name];
CDOps.IncludeInstance[comm.design, pinInstance];
END;
DrawMarkComm:
PROC [comm: CDSequencer.Command] =
BEGIN
name: Rope.ROPE;
mark: CD.Instance;
TerminalIO.WriteRope["draw mark object\n"];
name ← TerminalIO.RequestRope[" type name: "];
mark ← CDInstances.NewInstance[CDMarkObjects.markOb, comm.pos];
CDMarkObjects.SetMarkName[mark, name];
CDOps.IncludeInstance[comm.design, mark];
END;
CDSequencer.ImplementCommand[$DrawMark, DrawMarkComm];
CDSequencer.ImplementCommand[$DrawPin, MakePin];
END.