Window Writer 6  -  Latest Windows Writer program

by Alan Wrigley


Window Writer 6 is designed to accompany the Wimp Topics article in this month's RISC User magazine. It demonstrates the techniques involved in displaying text in windows using outline fonts. The program is based on an earlier version of Window Writer which was written to illustrate earlier Wimp Topics articles on displaying text in windows (RISC User 7:1), marking and selecting text (7:3), printing in text mode (8:2), displaying text using the configured desktop font with RISC OS 3.5 or later (8:8), and creating multi-document editors (RISC User 9:6). The new version has been updated using the routines described in this month's article. The print facility has been disabled in this version, however, so if you want to explore the printing of text files you should use either the 8:2 or 8:8 versions of the program.

Running the application installs an icon on the icon bar. The icon bar menu has three options, of which Info and Quit perform their usual functions. The third option Print, is permanently greyed out in this version.

Dragging any text file (filetype &FFF) to the icon bar icon will open a document window and display the contents of the file in the window, using the configured desktop font if you are running the program under RISC OS 3.5 or later. The text will be wordwrapped to the width of the window, and if any DeskEdit bold or italic codes are included in the file, these will cause the text to change to bold or italic as appropriate. By dragging further files to the icon bar icon, any number of document windows can be opened provided there is sufficient memory available in the computer.

Once a text file is displayed in the window, a section of text can be marked by clicking on a line with Select, or dragging over it with Select pressed. The marked section will be shown in inverted colours, i.e. white on black instead of black on white. To keep the demonstration simple, text can only be marked below the starting position of the drag. In other words, once you have pressed Select to start the drag, you can only move the pointer below your original starting point. You can drag up and down, and see the marked area change while you do so, but you cannot continue the drag above the point where you started. Starting a fresh drag, or simply clicking on a line, will clear any previous marked section before marking the new area.

The techniques involved in displaying outline fonts are described in the accompanying article in this month's magazine. If you are interested in the techniques used to display and mark the text, to print in text mode, to display the text in the desktop font, or to create a multi-document editor, you should refer to the earlier articles mentioned above.

 Copyright RISC User Magazine 1996
