CDPinObjectsCommands.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, January 31, 1985 5:49:26 pm PST
DIRECTORY
CD,
CDBasics,
CDDefaults,
CDOps,
CDPinObjects,
CDSequencer,
Rope,
TerminalIO;
CDPinObjectsCommands: CEDAR PROGRAM
IMPORTS CDBasics, CDDefaults, CDOps, CDPinObjects, CDSequencer, Rope, TerminalIO =
BEGIN
MakePin: PROC [comm: CDSequencer.Command] =
BEGIN
name: Rope.ROPE;
r: CD.DesignRect = CDBasics.ToRect[comm.pos, comm.sPos];
pinApp: CD.ApplicationPtr;
layer: CD.Layer ← CDDefaults.CurrentLayer[comm.design];
TerminalIO.WriteRope[Rope.Cat["Draw Pin (", CDOps.LayerName[layer], ")\n"]];
name ← TerminalIO.RequestRope[" type name of pin: "];
pinApp ← CDPinObjects.CreatePinApp[rect: r, lev: layer, name: name];
CDOps.IncludeApplication[comm.design, pinApp];
END;
CDSequencer.ImplementCommand[$DrawPin, MakePin];
END.