<> <> DIRECTORY Ascii, Buttons, Commander, Containers, Convert, FS, IO, MessageWindow, RefText, Rope, Rules, SafeStorage, SirPress, TSFont, TSTypes, TypeScript, VFonts, ViewerClasses, ViewerIO, ViewerOps, ViewerTools; LandPrintDefs: CEDAR DEFINITIONS = { ROPE: TYPE = Rope.ROPE; STREAM: TYPE = IO.STREAM; FontClass: TYPE = {body, smallItalic, bodyBold, bodyItalic, title, headingLarge, headingSmall, pageNum, date, tabs, display, symbols, tiny}; Handle: TYPE = REF MyRec; -- a REF to the data for a particular instance of the sample tool; multiple instances can be created. Rotation: TYPE = {R90, R270}; PageLoc: TYPE = {R90T, R90B, R270T, R270B}; nLines: NAT = 5; SmallCount: TYPE = [0..nLines); Entry: TYPE = RECORD [ phone: ARRAY SmallCount OF ROPE _ ALL[NIL], name: ARRAY SmallCount OF ROPE _ ALL[NIL], addr: ARRAY SmallCount OF ROPE _ ALL[NIL], town: ROPE _ NIL, zip: ROPE _ NIL]; EntrySeqBody: TYPE = RECORD [count: CARDINAL _ 0, seq: SEQUENCE max: CARDINAL OF Entry]; EntrySeq: TYPE = REF EntrySeqBody; PageData: TYPE = RECORD [start: INT _ -1, initial: CHAR _ 0C, number: NAT _ 0]; PageDataSeqBody: TYPE = RECORD [count: CARDINAL _ 0, seq: SEQUENCE max: CARDINAL OF PageData]; PageDataSeq: TYPE = REF PageDataSeqBody; CommandViewer: TYPE = RECORD [ inputFile, pressFile, yLead, fontSize, lineHeight, pageWidth, pageHeight, topMargin, bottomMargin, leftMargin, rightMargin, fudgePoints, displayHeight, tabHeight, nameIndent: ViewerClasses.Viewer ]; DimRecord: TYPE = RECORD [ yLead, fontSize, lineHeight, pageWidth, pageHeight, topMargin, bottomMargin, leftMargin, rightMargin, fudgePoints, displayHeight, tabHeight, nameIndent: INT]; MyRec: TYPE = RECORD [ -- the data for a particular tool instance outer: Containers.Container _ NIL, -- handle for the enclosing container height: CARDINAL _ 0, -- height measured from the top of the container cmd: CommandViewer, -- the commands dim: DimRecord _ TRASH, in: STREAM, eof: BOOLEAN _ FALSE, out: STREAM, -- for press file press: SirPress.PressHandle _ NIL, fontCode: ARRAY Rotation OF ARRAY FontClass OF SirPress.FontCode, fontInfo: ARRAY FontClass OF TSFont.Ref, pageLoc: PageLoc _ R90T, pageParity: CARDINAL _ 0, yTop: INT, firstOnPage, lastOnPage: ROPE, pageNumber: INT _ 1, phoneX, phoneX2, indent, nameX, addrX, townX, zipX, addrPWidth: INT, prevInitial: CHAR _ 0C, prevZip: ROPE _ NIL, duplex, alphaSort, oneRot: REF BOOL, entry: EntrySeq _ NIL, page: PageDataSeq _ NIL, perfectBind: REF BOOL, affiliateThisPage, reallyPrinting: BOOL _ FALSE, phoneLast: ARRAY SmallCount OF INT _ ALL[0], fumcX, dateX: INT, tsIn, tsOut: STREAM, ts: ViewerClasses.Viewer ]; -- the typescript DoIt: Buttons.ButtonProc; LookupFonts: PROC [handle: Handle]; MakeTypescript: PROC [handle: Handle]; MakeCommands: PROC [handle: Handle]; }.