Window Writer

by Alan Wrigley


Window Writer is an application which demonstrates the techniques of
displaying text in windows. By studying how the program works, you should be
able to make use of similar techniques in your own programs. The program is
fully commented to allow you to see the processes taking place. For a fuller
description, see the Wimp Topics article in this month's RISC User
magazine.

Running the application installs an icon on the icon bar. The icon bar menu
has two options, Info and Quit, which perform their usual functions.

Clicking Select over the icon bar icon opens the application's main window.
Initially this will be empty, but dragging any text file (filetype &FFF) to
the icon bar icon or into the window will display the contents of the file
in the window. The text will be wordwrapped to the width of the window.

Once a text file is displayed in the window, clicking over any line of text
will select that line, and it will be marked by changing the background to a
darker grey. Any previously selected line will be deselected. Clicking with
Adjust has the same effect as clicking with Select, but it would not be too
difficult to amend the code so that clicking with Adjust added lines to a
previous selection, rather than deselecting them.


 Copyright RISC User 1993
