--File OutputDefs.mesa
--
June 10, 1981 6:23 PM - MN - parentVis added to Visible

DIRECTORY

IntStorageDefs: FROM "IntStorageDefs" USING [ObjectType],

ParserErrorDefs: FROM "ParserErrorDefs" USING [ErrorType],

ParserTypeDefs: FROM "ParserTypeDefs" USING [Point, Path];

OutputDefs: DEFINITIONS =

BEGIN

RelationType: TYPE = {rel, same, norel, dontcare};
VisibleType: TYPE = {yes, no, maybe};

--
Routines called by the Interpreter to actually have output generated.
-- take a string that is a list of layers to filter for
InitOutput: PROCEDURE RETURNS [BOOLEAN];
FinishOutput: PROCEDURE RETURNS [BOOLEAN];

--Prints a message on the terminal, followed by a CR if wantCR is TRUE.
SendMessage: PROCEDURE [type: ParserErrorDefs.ErrorType, message: STRING,
wantCR: BOOLEAN ← TRUE];
-- associates a CARDINAL with a layer name - a PACKED ARRAY [0..4) OF CHARACTER, padded by spaces to make 4 characters (if necessary)
Map: PROCEDURE [layerName: PACKED ARRAY [0..4) OF CHARACTER] RETURNS [CARDINAL];

--Each routine below implements the output of one primitive geometric construct form CIF.
OutputWire: PROCEDURE [visible: VisibleType, layerName: CARDINAL, width: LONG CARDINAL, a: ParserTypeDefs.Path];

OutputFlash: PROCEDURE [visible: VisibleType, layerName: CARDINAL, diameter: LONG CARDINAL, center: ParserTypeDefs.Point];

OutputPolygon: PROCEDURE [visible: VisibleType, layerName: CARDINAL, a: ParserTypeDefs.Path];

OutputBox: PROCEDURE [visible: VisibleType, layerName: CARDINAL, length, width: LONG CARDINAL,
center: ParserTypeDefs.Point, xRotation, yRotation: LONG INTEGER];

OutputUserCommand: PROCEDURE [command: [0..9], userText: STRING];

OutputUserObject: PROCEDURE [visible: VisibleType, layerName: CARDINAL, size: CARDINAL, data: POINTER TO UNSPECIFIED];

-- establish ordering
Relation: PROCEDURE [left1, right1, bottom1, top1,
left2, right2, bottom2, top2: LONG INTEGER]
RETURNS [RelationType];

-- determine whether an item should be shown
Visible: PROCEDURE [kind: IntStorageDefs.ObjectType, level: CARDINAL, parentVis: VisibleType,
left,right,bottom,top: LONG INTEGER] RETURNS [VisibleType]; --parentVis added - MN, June 10, 1981 6:23 PM

-- returns the bounding box of the primitive interpreted in the current context
BBWire: PROCEDURE [layerName: CARDINAL, width: LONG CARDINAL, a: ParserTypeDefs.Path]
RETURNS [left,right,bottom,top: LONG INTEGER];

BBFlash: PROCEDURE [layerName: CARDINAL, diameter: LONG CARDINAL, center: ParserTypeDefs.Point]
RETURNS [left,right,bottom,top: LONG INTEGER];

BBPolygon: PROCEDURE [layerName: CARDINAL, a: ParserTypeDefs.Path]
RETURNS [left,right,bottom,top: LONG INTEGER];

BBBox: PROCEDURE [layerName: CARDINAL, length, width: LONG CARDINAL,
center: ParserTypeDefs.Point, xRotation, yRotation: LONG INTEGER]
RETURNS [left,right,bottom,top: LONG INTEGER];

BBUserObject: PROCEDURE [layerName: CARDINAL, size: CARDINAL, data: POINTER TO UNSPECIFIED]
RETURNS [left,right,bottom,top: LONG INTEGER];

END.