WINPRINT-GET-PAGE-COLUMN

This operation code retrieves information about a particular column on the page.

Usage

CALL "WIN$PRINTER"
    USING WINPRINT-GET-PAGE-COLUMN, COLUMN-POSITION,
        WINPRINT-COLUMN
    GIVING RESULT

Parameters

COLUMN-POSITION Numeric value A numeric value indicating which column to retrieve.
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.)

This operation takes two additional parameters. The first is a numeric parameter that indicates which column to retrieve. Columns are numbered from left-to-right on the printed page, starting with 1. The second parameter retrieves the current definition of the specified column and stores it in WINPRINT-COLUMN. This is useful if you want to change the characteristics of a particular column. You can use this operation to get the current settings, change the ones you want, and use WINPRINT-SET-PAGE-COLUMN to apply the changed settings.

The units used for the various measurements are determined by setting WINPRINT-COL-UNITS in the WINPRINT-COLUMN structure passed into the call. You should set this to the desired units before calling WIN$PRINTER. If WINPRINT-COL-UNITS contains an invalid setting, the units used by default are WPRTUNITS-CELLS.

Example

In the following example, the first column is retrieved and its current indent is set to 3 characters.

MOVE WPRTUNITS-CELLS TO WINPRINT-COL-UNITS
CALL "WIN$PRINTER" 
   USING WINPRINT-GET-PAGE-COLUMN, 1, WINPRINT-COLUMN
MOVE 3 TO WINPRINT-COL-INDENT
CALL "WIN$PRINTER" 
   USING WINPRINT-SET-PAGE-COLUMN, WINPRINT-COLUMN