ClearWin Introduction

This section describes the attributes of a ClearWin window. A summary of functions that can be used with ClearWin windows is given in ClearWin window functions. Details of these functions can be found in the Library reference.

A ClearWin window has the attributes of a Windows window but has added functionality. In particular a ClearWin window can be used in association with the standard Fortran I/O routines READ, WRITE and PRINT.

Note that a ClearWin window is not the same as a window created with winio@ (which is called a Format window). It is, however, possible to embed a ClearWin window in a Format window (see ClearWin window).

Graphics can be drawn to a ClearWin window by using get_graphics_dc@ and by calling Windows API drawing functions (details are given in the ClearWin+ User's Supplement). However, it is recommended that graphics objects should be drawn to a format window created using %gr - Graphics Region or %og - OpenGL Graphics Region.

A ClearWin window (that is not embedded in a format window) can be created by calling CREATE_WINDOW@ (this function returns a standard Windows handle). DESTROY_WINDOW@ is used to kill the window and CLEAR_WINDOW@ clears any I/O text that appears in the window. However, it does not clear graphics that have been drawn to the associated device context. UPDATE_WINDOW@ is called to "invalidate" a ClearWin window and hence redraw it. Various other routines can be used to control the font of the text and to get and set the handle for default I/O, whilst OPEN_TO_WINDOW@ can be used to attach a Fortran unit number to a particular ClearWin window.

As an alternative to using a Fortran READ statement, the programmer can access a ClearWin window keyboard buffer via the routines: FEED_WKEYBOARD@, FLUSH_WKEYBOARD@, GET_WKEY@, GET_WKEY1@, and WKEY_WAITING@.

It is strongly recommended that either the routine SET_ALL_MAX_LINES@ or the routine SET_MAX_LINES@ be used before creating a ClearWin window (including default ClearWin windows). These routines are used to limit the amount of memory that is used by a ClearWin window. See below for further details.

 

 

Basket
Empty
 
Copyright © 1999-2020 Silverfrost Limited