PrintLabelsDefs.mesa
Last Edited by: Sweet, October 11, 1984 1:56:08 am PDT
DIRECTORY
Ascii,
Containers USING [Container],
IO,
Rope,
SirPress,
TSFont,
ViewerClasses USING [Viewer];
PrintLabelsDefs: DEFINITIONS = {
entryHeight: CARDINAL = 15; -- how tall to make each line of items
entryVSpace: CARDINAL = 8;  -- vertical leading space between lines
entryHSpace: CARDINAL = 10;  -- horizontal space between items in a line
ROPE: TYPE = Rope.ROPE;
STREAM: TYPE = IO.STREAM;
dash: CHAR = Ascii.ControlV;
FontClass: TYPE = {body, bodyBold};
Handle: TYPE = REF MyRec; -- a REF to the data for a particular instance of the sample tool; multiple instances can be created.
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 FontClass OF SirPress.FontCode,
fontInfo: ARRAY FontClass OF TSFont.Ref,
boldNames: REF BOOL,
yTop: INT,
row, col: CARDINAL,
tsIn, tsOut: STREAM,
ts: ViewerClasses.Viewer ];  -- the typescript
PromptRec: TYPE = RECORD [
handle: Handle, viewer: ViewerClasses.Viewer ← NIL];
PromptHandle: TYPE = REF PromptRec;
CommandViewer: TYPE = RECORD [
inputFile, pressFile, fontFamily, fontSize, lineHeight, scale, dy, dx: ViewerClasses.Viewer
];
DimRecord: TYPE = RECORD [
fontSize, lineHeight, scale, dx, dy: INT];
}.