


This operation code describes how the columns appear when printed.
Usage
CALL "WIN$PRINTER"
USING WINPRINT-SET-PAGE-COLUMN, WINPRINT-COLUMN
GIVING RESULT
Parameters
WINPRINT-COLUMN Group item defined in "winprint.def" as follows:
01 WINPRINT-COLUMN, SYNC.
03 WINPRINT-COL-START PIC 9(7)V99 COMP-5.
03 WINPRINT-COL-INDENT PIC 9(7)V99 COMP-5.
03 WINPRINT-COL-SEPARATION PIC 9(7)V99 COMP-5.
03 WINPRINT-COL-FONT HANDLE OF FONT.
03 WINPRINT-COL-UNITS PIC 99 COMP-X.
03 WINPRINT-COL-ALIGNMENT PIC X.
03 WINPRINT-TRANSPARENCY PIC 99 COMP-X.
88 WINPRINT-TRANSPARENT VALUE 1, FALSE 0.
78 WPRTUNITS-CELLS VALUE 0.
78 WPRTUNITS-INCHES VALUE 1.
78 WPRTUNITS-CENTIMETERS VALUE 2.
78 WPRTUNITS-PIXELS VALUE 3.
78 WPRTALIGN-NONE VALUE SPACE.
78 WPRTALIGN-LEFT VALUE "L".
78 WPRTALIGN-RIGHT VALUE "R".
78 WPRTALIGN-CENTER VALUE "C".
78 WPRTALIGN-DECIMAL VALUE "D".
78 WPRTALIGN-DECIMAL-SUPPRESS VALUE "S".
Description
This is one of three op-codes that control the "output" by specifying the page layout. (This is similar to the DISPLAY-COLUMNS property of the LIST-BOX control.)
Each column of data is mapped to an output column in the print record: the first data column maps to the leftmost output column, the second data column to the next output column to the right, and so on. Each time WINPRINT-SET-PAGE-COLUMN is used, a new output column is defined. To reset the output columns, use WINPRINT-CLEAR-PAGE-COLUMNS as described below. Once set, output columns remain in effect until explicitly cleared or the runtime process shuts down.
The fields in WINPRINT-COLUMN define the output column. The fields have the following meaning:
WINPRINT-COL-START - Sets the leftmost point of the column on the page. The units of measurement are defined by WINPRINT-COL-UNITS. The measurement is made with respect to the left margin of the page. This position is calculated at the time that the column is defined. However, it is always relative to the left margin, so changing the left margin will shift the columns. The column ends at the beginning of the next column or the right margin if there is no next column.
WINPRINT-COL-INDENT - Modifies the left edge of the column by adding its value to the WINPRINT-COL-START value. The units of measurement are defined by WINPRINT-COL-UNITS. The indent is normally set to zero. You can use a non-zero value to specify an indented column in a convenient fashion. You would typically use this when you wanted to indent a column for a particular set of output lines. Otherwise, you would have to clear all the columns and redefine them in order to change the left edge of one column.
WINPRINT-COL-SEPARATION - Defines the width of the separation zone. This zone appears at the rightmost edge of the column. This zone is generally kept blank, but see WINPRINT-COL-ALIGNMENT for exceptions. The value specified is the width of this zone (which must be less than the width of the column). It is expressed in the units defined by WINPRINT-COL-UNITS.
WINPRINT-COL-FONT - Sets the handle of the font to be used when printing the column. Set to NULL to use the font currently selected for the printer (this is the default). If you place a valid printer font handle in this field, then that font is used when printing this column regardless of the printer's font. Note that the printer's font still defines the height of the line.
WINPRINT-COL-UNITS - Defines the measurement units used for WINPRINT-COL-START, WINPRINT-COL-INDENT and WINPRINT-COL-SEPARATION. The following values are valid:
WPRTUNITS-CELLS - Values are measured using the "cell size" of the currently selected font. A font's "cell size" is the size of the '0' digit in the font. This is roughly equivalent to measuring in "characters".
WPRTUNITS-CENTIMETERS - Values are measured using centimeters.
WPRTUNITS-PIXELS - Values are measured using the resolution of the output device. Only integer values are allowed in the measurements. Note that the device resolution varies from device to device, and so these units are rarely used.
Any other setting of WINPRINT-COL-UNITS is invalid.
WINPRINT-COL-ALIGNMENT - Describes how data should be aligned in the column. The following values are allowed:
WPRTALIGN-NONE - No alignment is performed on the data, it is printed "as is". In addition, the data is not truncated to fit the column. Any data that extends into the next column will be visible if you are printing with transparent text background, otherwise it may not be visible, as it will be overwritten when the following column is written.
WPRTALIGN-LEFT - Leading and trailing spaces are removed from the data and it is printed left aligned in the column. The text is truncated so that it does not extend into the separation zone.
WPRTALIGN-CENTER - Leading and trailing spaces are removed from the data and it is printed centered between the start of the column and the start of the column's separation zone. Text is truncated so that it does not extend into the separation zone.
WPRTALIGN-RIGHT - Leading and trailing spaces are removed from the data and it is right aligned with respect to the beginning of the separation zone. Leading text is truncated so that it does not extend past the left edge of the column.
WPRTALIGN-DECIMAL - Leading and trailing spaces are removed from the data. The data is then examined to find the leftmost occurrence of the runtime's current notion of the decimal point character. The rightmost edge of the decimal point is aligned with the beginning of the separation zone. If no decimal point is found, the right edge of the data is aligned there instead. Data may extend into the separation zone and is truncated at the beginning and end of the column.
WPRTALIGN-DECIMAL-SUPPRESS - This is identical to WPRTALIGN-DECIMAL, with the additional trait that the decimal point used to align the data is replaced by a space when the data is printed. Columns with this style are limited to 256 data characters.
Any other setting of WINPRINT-COL-ALIGNMENT is invalid.
WPRTDATA-TRANSPARENCY - When the level 88 item WPRTDATA-TRANSARENT is set to "true", then the column's foreground text is printed, but its background is left alone. This allows you to print text over something else, such as a bitmap, without erasing it. When WPRTDATA-TRANSPARENT is set to "false", then the column's background is also printed, writing over anything else on the page. Note that only the background behind the actual text printed is affected. Suppressed leading and trailing spaces are not printed.