QuickWin Function: Returns the properties of the current window.
USE IFQWIN
result = GETWINDOWCONFIG (wc)
wc |
(Output) Derived type windowconfig. Contains window properties. The windowconfig derived type is defined in IFQWIN.F90 as follows:
|
The result type is LOGICAL(4). The result is .TRUE. if successful; otherwise, .FALSE. (for example, if there is no active child window).
GETWINDOWCONFIG returns information about the active child window. If you have not set the window properties with SETWINDOWCONFIG, GETWINDOWCONFIG returns default window values.
A typical set of values would be 1024 x pixels, 768 y pixels, 128 text columns, 48 text rows, and a font size of 8x16 pixels. The resolution of the display and the assumed font size of 8x16 pixels generates the number of text rows and text columns. The resolution (in this case, 1024 x pixels by 768 y pixels) is the size of the virtual window. To get the size of the physical window visible on the screen, use GETWSIZEQQ. In this case, GETWSIZEQQ returned the following values: (0,0) for the x and y position of the physical window, 25 for the height or number of rows, and 71 for the width or number of columns.
The number of colors returned depends on the video drive. The window title defaults to "Graphic1" for the default window. All of these values can be changed with SETWINDOWCONFIG.
Note that the bitsperpixel field in the windowconfig derived type is an output field only, while the other fields return output values to GETWINDOWCONFIG and accept input values from SETWINDOWCONFIG.
STANDARD GRAPHICS QUICKWIN GRAPHICS LIB
!Build as QuickWin or Standard Graphics App.
USE IFQWIN
LOGICAL(4) status
TYPE (windowconfig) wc
status = GETWINDOWCONFIG(wc)
IF(wc%numtextrows .LT. 10) THEN
wc%numtextrows = 10
status = SETWINDOWCONFIG(wc)
IF(.NOT. status ) THEN ! if setwindowconfig error
status = SETWINDOWCONFIG(wc) ! reset
! setwindowconfig with corrected values
status = GETWINDOWCONFIG(wc)
IF(wc%numtextrows .NE. 10) THEN
WRITE(*,*) 'Error: Cannot increase text rows to 10'
END IF
END IF
END IF
END
Building Applications: Using QuickWin Overview
Building Applications: Accessing Window Properties
Building Applications: Checking the Current Graphics Mode
Building Applications: Setting Graphics Coordinates