Silverfrost Logo About Us | Contact Us

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 or %og.

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.



Copyright © 1999-2017 Silverfrost Limited