File: AlignmentMarks.mesa
Copyright © 1984 by Xerox Corporation. All rights reserved.
Created by: Bob Mayo, June 8, 1984 12:40:57 pm PDT
Last Edited by: Mayo, November 5, 1984 6:38:10 pm PST
-- AlignmentMarks: Add alignment marks to ChipNDale. Alignment Marks are named points.
DIRECTORY
Rope USING [ROPE],
CD USING [Orientation, ObPtr, Design, ApplicationPtr, Position, original];
AlignmentMarks: CEDAR DEFINITIONS =
BEGIN
Mark: TYPE = RECORD [
pos: CD.Position, -- Position of tip of arrow relative to origin of containing object
name: Rope.ROPE
];
-- Place a mark into a design.
Place: PROC [into: CD.Design, mark: Mark, orient: CD.Orientation ← CD.original];
-- Find a mark in a cell.
Find: PROC [ob: CD.ObPtr, name: Rope.ROPE] RETURNS [REF Mark];
-- Find all marks in a cell.
FindList: PROC [ob: CD.ObPtr] RETURNS [LIST OF Mark];
-- back door proceedures --
objAtom: READONLY ATOM; -- Contains the atom that alignment marks are tagged with.
-- Make an application for a mark, but don't place it into anything.
MakeMarkAptr: PROC [mark: Mark, orient: CD.Orientation ← CD.original] RETURNS [CD.ApplicationPtr];
-- Given a ChipNDale application that points to an alignment mark, return it as a Mark.
-- Returns NIL if the application contains a different type of object.
AptrToMark: PROC [aptr: CD.ApplicationPtr] RETURNS [REF Mark];
END.