Using Intel® Visual Fortran to Create and Build Windows*-Based Applications

ID 757211
Date 7/23/2021
Public
Document Table of Contents

Displaying Character-Based Text

The routines in the following table ask about screen attributes that affect text display, prepare the screen for text and send text to the screen. To print text in specialized fonts, see Displaying Font-Based Characters and Using Fonts from the Graphics Library Overview.

In addition to these general text routines, you can customize the text in your menus with MODIFYMENUSTRINGQQ. You can also customize any other string that QuickWin produces, including status bar messages, the state message (for example, "Paused" or "Running"), and dialog box messages, with SETMESSAGEQQ. Use of these customization routines is described in Customizing QuickWin Applications Overview.

The following routines recognize text-window boundaries:

Routine

Description

CLEARSCREEN

Clears the screen, viewport, or text window

DISPLAYCURSOR

Sets the cursor on or off

GETBKCOLOR

Returns the current background color index

GETBKCOLORRGB

Returns the current background Red-Green-Blue color value

GETTEXTCOLOR

Returns the current text color index

GETTEXTCOLORRGB

Returns the current text Red-Green-Blue color value

GETTEXTPOSITION

Returns the current text-output position

GETTEXTWINDOW

Returns the boundaries of the current text window

OUTTEXT

Sends text to the screen at the current position

SCROLLTEXTWINDOW

Scrolls the contents of a text window

SETBKCOLOR

Sets the current background color index

SETBKCOLORRGB

Sets the current background Red-Green-Blue color value

SETTEXTCOLOR

Sets the current text color to a new color index

SETTEXTCOLORRGB

Sets the current text color to a new Red-Green-Blue color value

SETTEXTPOSITION

Changes the current text position

SETTEXTWINDOW

Sets the current text-display window

WRAPON

Turns line wrapping on or off

These routines do not provide text-formatting capabilities. If you want to print integer or floating-point values, you must convert the values into a string (using an internal WRITE statement) before calling these routines. The text routines specify all screen positions in character-row and column coordinates.

SETTEXTWINDOW is the text equivalent of the SETVIEWPORT graphics routine, except that it restricts only the display area for text printed with OUTTEXT, PRINT, and WRITE.GETTEXTWINDOW returns the boundaries of the current text window set by SETTEXTWINDOW. SCROLLTEXTWINDOW scrolls the contents of a text window.OUTTEXT, PRINT, and WRITE display text strings written to the current text window.

NOTE:

The WRITE statement sends its carriage return (CR) and line feed (LF) to the screen at the beginning of the first I/O statement following the WRITE statement. This can cause unpredictable text positioning if you mix the graphics routines SETTEXTPOSITION and OUTTEXT with the WRITE statement. To minimize this effect, use the backslash ( \ ) or dollar sign ( $ ) format descriptor (to suppress CR-LF) in the associated FORMAT statement.

See more information on routines mentioned here, see the routine descriptions in the Language Reference.