ColumnLs.mesa
Copyright Ó 1988, 1992 by Xerox Corporation. All rights reserved.
Bloomenthal, July 22, 1992 7:09 pm PDT
DIRECTORY Commander, Rope, VFonts;
ColumnLs: CEDAR DEFINITIONS
~ BEGIN
Columnation Procedures
ColumnateMode: TYPE ~ {
ragged,     -- uses fixed width spaces; very fast but uneven
tabbed,     -- uses tabs; fast, uneven, but spacing may be less efficient
spaced,     -- uses variable width spaces; slow, even, and space efficient
fixed};     -- uses fixed pitch font; very fast and even
ColumnateNames: PROC [
cmd: Commander.Handle,
names: LIST OF Rope.ROPE,
reverseOrder: BOOL ¬ FALSE,
mode: ColumnateMode ¬ tabbed,
columnOrder: BOOL ¬ FALSE,
font: VFonts.Font ¬ NIL,
rowIndentation: Rope.ROPE ¬ NIL];
Columnate and print the names to cmd.out, optionally reversing the order of the names.
ragged produces slightly ragged columnation, but is quicker.
If not columnOrder, then columnation is row order.
If font is NIL, it is defaulted to Tioga, point size 10.
ColumnWidth: PROC [
cmd: Commander.Handle,
names: LIST OF Rope.ROPE,
mode: ColumnateMode ¬ tabbed,
font: VFonts.Font ¬ NIL]
RETURNS [columnWidth: NAT];
Return the column width suitable for the list of names.
ColumnateGivenColumnWidth: PROC [
cmd: Commander.Handle,
names: LIST OF Rope.ROPE,
columnWidth: NAT,
reverseOrder: BOOL ¬ FALSE,
mode: ColumnateMode ¬ tabbed,
columnOrder: BOOL ¬ FALSE,
font: VFonts.Font ¬ NIL,
rowIndentation: Rope.ROPE ¬ NIL];
Columnate given the desired column width.
END.