LandPrintDefs.mesa
Sweet September 14, 1985 0:51:10 am PDT
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 ROPEALL[NIL],
name: ARRAY SmallCount OF ROPEALL[NIL],
addr: ARRAY SmallCount OF ROPEALL[NIL],
town: ROPENIL,
zip: ROPENIL];
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: BOOLEANFALSE,
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: ROPENIL,
duplex, alphaSort, oneRot: REF BOOL,
entry: EntrySeq ← NIL,
page: PageDataSeq ← NIL,
perfectBind: REF BOOL,
affiliateThisPage, reallyPrinting: BOOLFALSE,
phoneLast: ARRAY SmallCount OF INTALL[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];
}.