-- Press.mesa, Edit: Johnsson 5-Dec-80 12:26:03 DIRECTORY PressFormat USING [Mica, micasPerInch], Stream USING [Handle]; Press: DEFINITIONS = BEGIN BadParameters: ERROR; -- probably bad args InternalError: ERROR; -- probably buggy code MoreThan16Fonts: ERROR; ELBufferOverflow: ERROR; PartBufferOverflow: ERROR; Reset: PROCEDURE; -- gives back lots of storage Initialize: PROCEDURE; PutFontInTable: PROCEDURE [index: FontIndex, family: LONG STRING, size: Points]; FlushFontBuffers: PROCEDURE; -- call once for each document (i.e. each press file) Start: PROCEDURE [docName: LONG STRING, file: Stream.Handle]; Abort: PROCEDURE; Finish: PROCEDURE; -- These will work ok all by themselves. -- They know about CR, FF, and TAB, and will STUPIDLY process line/page overflows. String: PROCEDURE [LONG STRING]; Character: PROCEDURE [CHARACTER]; SetCurrentFont: PROCEDURE [FontIndex, FontWeight, FontSlope]; SkipSomeSpace: PROCEDURE [Mica]; -- for indenting -- for fancy looking results PieceOfLine: PROCEDURE [s: LONG STRING, width: Mica]; SetDocumentUserName: PROCEDURE [LONG STRING]; SetDocumentCreationDate: PROCEDURE [LONG STRING]; SetHeaderText: PROCEDURE [LONG STRING, BOOLEAN]; SetTrailerText: PROCEDURE [LONG STRING, BOOLEAN]; SetNumberOfCopies: PROCEDURE [CARDINAL]; SetMode: PROCEDURE [columns: CARDINAL, between: Mica, mode: Mode]; SetMargins: PROCEDURE [l, r, t, b: Mica]; SetCurrentTabWidth: PROCEDURE [Mica]; SetCurrentLineLeading: PROCEDURE [Mica]; SetCurrentPosition: PROCEDURE [x, y: Mica]; GetCurrentPageNumber: PROCEDURE RETURNS [CARDINAL]; SetCurrentPageNumber: PROCEDURE [CARDINAL]; GetCurrentPosition: PROCEDURE RETURNS [x, y: Mica]; GetWidthOfString: PROCEDURE [LONG STRING] RETURNS [Mica]; -- in current font GetWidthOfCharacter: PROCEDURE [CHARACTER] RETURNS [Mica]; GetHeightOfFont: PROCEDURE [FontIndex] RETURNS [Mica]; SetWidthOfSpace: PROCEDURE [w: Mica]; ResetWidthOfSpace: PROCEDURE; DrawRectangle: PROCEDURE [w, h: Mica]; pointsPerInch: CARDINAL = 72; micasPerInch: CARDINAL = PressFormat.micasPerInch; Mica: TYPE = PressFormat.Mica; magicNonPrintingWidth: Mica = -32767 - 1; --100000B; Points: TYPE = CARDINAL; numberOfFonts: CARDINAL = 16; FontIndex: TYPE = [0..numberOfFonts); FontWeight: TYPE = {medium, bold --, light--}; FontSlope: TYPE = {regular, italic}; Mode: TYPE = {portrait, landscape}; pageHeight: Mica = 11*micasPerInch; pageWidth: Mica = 8*micasPerInch + micasPerInch/2; defaultLineLeading: Mica = micasPerInch/pointsPerInch; -- one point defaultTabSpacing: Mica = 8*defaultCharWidth; defaultCharWidth: Mica = 173; -- for Gacha8 defaultLineHeight: Mica = 276; defaultHeight: Mica = pageHeight - defaultLeft - defaultRight; defaultWidth: Mica = pageWidth - defaultTop - defaultBottom; defaultLeft: Mica = micasPerInch; defaultRight: Mica = micasPerInch; defaultTop: Mica = micasPerInch; defaultBottom: Mica = micasPerInch; END.