Interpress.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Doug Wyatt, May 31, 1985 11:54:34 am PDT
Michael Plass, June 7, 1985 3:31:24 pm PDT
DIRECTORY
Imager USING [Context],
IO USING [STREAM],
IPMaster USING [ErrorClass, Skeleton],
Rope USING [ROPE];
Interpress: CEDAR DEFINITIONS
~ BEGIN
ROPE: TYPE ~ Rope.ROPE;
STREAM: TYPE ~ IO.STREAM;
ErrorClass: TYPE ~ IPMaster.ErrorClass;
LogProc: TYPE ~ PROC [master: OpenMaster, class: ErrorClass, code: ATOM, explanation: ROPE];
OpenMaster: TYPE ~ REF OpenMasterRep;
OpenMasterRep: TYPE ~ RECORD [
pages: INT, -- number of pages in the master
skeleton: IPMaster.Skeleton, -- skeleton structure of the master
logProc: LogProc, -- error logging procedure
logData: REF, -- data for the logProc
impl: REF OpenMasterImplRep -- implementation details
];
OpenMasterImplRep: TYPE;
Open: PROC [fileName: ROPE, logProc: LogProc, logData: REFNIL] RETURNS [OpenMaster];
Opens the named Interpress master and executes the preamble.
FromStream: PROC [stream: STREAM, logProc: LogProc, logData: REFNIL] RETURNS [OpenMaster];
DoPage: PROC[master: OpenMaster, page: INT, context: Imager.Context];
Executes a page of the master; page IN[1..master.pages].
AddMaster: PROC [master: OpenMaster, inner: PROC];
Uses ProcessProps to add an $InterpressMaster property for the duration of the call of inner.
GetMaster: PROC RETURNS [OpenMaster];
Returns the current value of the $InterpressMaster property, NIL if none found.
END.