Marquee.T displays a vertical marquee of lines of the form
name arg1 arg2 ... argN
name and the
arg's are texts. The lines are indented so that
the spaces after
name in each line are vertically aligned.
The window has a fixed height and width.
Marquee; IMPORT VBT, Font; TYPE T <: Public; Public = Private OBJECT METHODS init(height := 8; nameWidth := 10; argWidth := 12; font := Font.BuiltIn): T; putName(nm: TEXT); putArg(nm: TEXT); remArg(); erase(); newline(); END; Private <: VBT.T;
m.erase()erases the current line.
m.newline() ends the current line and advances to
a new blank one.
m.putName(nm) requires that
m be at the beginning
of a line; it adds the name
m.putArg(nm) adds the argument
nm to the current
line; it requires that the current line have a name.
m.remArg() removes the last added argument; it
requires that this argument exist.
The arguments to
init give the fixed height of the window,
the width allowed for the name part, and the width allowed
for the argument part. The units of the dimensions are
the widths of a character in the specified font, which is
assumed to be fixed-width.
It is required that height be at least two.