<> <> 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: BOOLEAN _ FALSE, 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]; }.