Intel® Fortran Compiler 18.0 Developer Guide and Reference

WRAPON (W*S)

Graphics Function: Controls whether text output is wrapped.

Module

USE IFQWIN

result = WRAPON (option)

option

(Input) INTEGER(2). Wrap mode. One of the following symbolic constants:

  • $GWRAPOFF - Truncates lines at right edge of window border.

  • $GWRAPON - Wraps lines at window border, scrolling if necessary.

Results

The result type is INTEGER(2). The result is the previous value of option.

WRAPON controls whether text output with the OUTTEXT function wraps to a new line or is truncated when the text output reaches the edge of the defined text window.

WRAPON does not affect font routines such as OUTGTEXT.

Example

 USE IFQWIN
 INTEGER(2) row, status2
 INTEGER(4) status4
 TYPE ( rccoord ) curpos
 TYPE ( windowconfig ) wc
 LOGICAL status

 status = GETWINDOWCONFIG( wc )
 wc%numtextcols = 80
 wc%numxpixels  = -1
 wc%numypixels  = -1
 wc%numtextrows = -1
 wc%numcolors   = -1
 wc%fontsize    = -1
 wc%title = "This is a test"C
 wc%bitsperpixel = -1
 status = SETWINDOWCONFIG( wc )
 status4= SETBKCOLORRGB(#FF0000 )
 CALL CLEARSCREEN( $GCLEARSCREEN )

 !  Display wrapped and unwrapped text in text windows.
 CALL SETTEXTWINDOW( INT2(1),INT2(1),INT2(5),INT2(25))
 CALL SETTEXTPOSITION(INT2(1),INT2(1), curpos )
 status2 = WRAPON( $GWRAPON )
 status4 = SETTEXTCOLORRGB(#00FF00)
 DO i = 1, 5
    CALL OUTTEXT( 'Here text does wrap. ')
 END DO
 CALL SETTEXTWINDOW(INT2(7),INT2(10),INT2(11),INT2(40))
 CALL SETTEXTPOSITION(INT2(1),INT2(1),curpos)
 status2 = WRAPON( $GWRAPOFF )
 status4 = SETTEXTCOLORRGB(#008080)
 DO row = 1, 5
    CALL SETTEXTPOSITION(INT2(row), INT2(1), curpos )
    CALL OUTTEXT('Here text does not wrap. ')
    CALL OUTTEXT('Here text does not wrap.')
 END DO
 READ (*,*) ! Wait for ENTER to be pressed
 END

See Also