Interpress.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Doug Wyatt, November 12, 1985 9:35:07 pm PST
Michael Plass, June 7, 1985 3:31:24 pm PDT
DIRECTORY
Imager USING [Context],
IO USING [STREAM],
IPMaster USING [Skeleton],
Rope USING [ROPE];
Interpress: CEDAR DEFINITIONS
~ BEGIN
ROPE: TYPE ~ Rope.ROPE;
STREAM: TYPE ~ IO.STREAM;
LogProc: TYPE ~ PROC [master: OpenMaster, class: INT, 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:
REF ←
NIL]
RETURNS [OpenMaster];
Opens the named Interpress master and executes the preamble.
FromStream:
PROC [stream:
STREAM, logProc: LogProc, logData:
REF ←
NIL]
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.