Dr Wimp p3

New Release - Version 3.53

On 1st September 1999, I released my first upgrade for the Dr Wimp package. It is v.3.53 and you can download it from my website.

(Last minute note: From 15th Sept 1999 it is v.3.53a, which corrects a couple of silly errors in v.3.53. If you downloaded between 1st and 15th September please do so again - and accept my sincere apologies. Thanks to Mark Scholes and Harriet Bazley for pointing out the errors so quickly.)

If you are wondering if you missed version 3.52 - you didn't! On handing over to me, Andrew Ayre had made a couple of alterations from his last release (v.3.51) and thus v.3.52 was the handover version but it wasn't released. Version 3.53 incorporates those changes.

What's in it?

There are several relatively minor bug fixes, mainly to do with handling sliders, and the circumstances under which FNuser_menu is called. Also, caret handling has been improved when the text in a writable icon is altered.

A new user-function is added, FNuser_overmenuarrow, which tells you when the pointer is over an 'arrowhead' on its way to a submenu. This helps you manage dynamic menu changes.

An extra parameter is added to PROCuser_slidervalue to let you know whether the slider is vertical or horizontal.

An additional option has been added to PROCwimp_menupopup to allow you to open menus at the pointer position.

There are two sets of new wimp-functions: firstly, a set of four to help you format numbers (in string or numeric form) to a specific number of decimal places or significant figures. Then there's a set of three to help you interrogate directories to find out how many objects they hold and to read an object's filename and filetype.

In addition, the manual has been given an overall revision, and the utility !Fnc'n'Prc has been improved to display more data and to load more quickly.

Blank lines

If you examine the DrWimp library in the new release, you may be puzzled by a number of blank lines within some of the functions.

The reason is that, since May 1999, I have needed to look at several parts of the library in detail to find out how Andy Ayre had achieved his wonders. In doing so, I added many REMs to record the detail for the future.

Normally, I would have left them in to help others as well, but I found there were so many that it was lengthening the listing too much (by about 10%). So I did a CRUNCH 4 to remove them - but I didn't want to mess up the line numbering, hence the blank lines!

If anyone is really interested in having the REMed version, please let me know.

Using 'menupopup' for windows

You will be aware that you can give a window handle instead of a menu handle when you want to open a window as a submenu, for instance to display the usual 'info' window from the iconbar menu.

In fact, you can also substitute a window handle for a menu handle in other cases. Try it with PROCwimp_menupopup to display a window at the pointer, for instance.

Ignored parameters

A few of the available wimp-functions have parameters which are, on occasion, ignored - as a result of the value chosen for another parameter. These cases are clearly described in the manual and in !Fnc'n'Prc. (FNwimp_createicon is one example; the colour parameters are ignored if a font other than the desktop font is used.)

However, from a couple of recent queries, it seems that the manual ought to make it clear that when it is known that a parameter is going to be ignored, it is still essential to assign dummy values (and of the right type) to all such parameters. Otherwise, the Basic interpreter's syntax checking will throw up an error.

'Desktop font' vs 'system font'

This isn't really a Dr Wimp matter, but it crops up many times when using Dr Wimp.

Before RISC OS 3.50 (I think) the default typeface and point size for the desktop wasn't configurable by the user. The default was system font and it was of fixed size, non-proportional and not an outline font.

From 3.50 onwards, the user has been able to choose the default (both typeface and size) via the Configuration window and this is now called the 'desktop font'. It can be set to any font known to the machine - including 'system font' if required, and the latter always heads the list in which the choices appear.

The list of available fonts now always includes a family called 'System' (lower down the list) and this contains two typefaces 'System.Fixed' and 'System.Medium'. The first is an outline font version of the 'System font' and the second is a proportionally-spaced version of 'System font'. (You can choose the point size of these, of course, as with other outline fonts.)

In its manual, the Dr Wimp package uses, in many places, the phrase 'system font' (because that was the correct phrase when originally written). Today, the better phrase would be 'desktop font', and in the next issue I will try to clarify the point.

What this means is that when Dr Wimp tells you to use certain parameters if you want to see text in 'system font', it really means if you want to see the text in 'desktop font' (which may or may not be 'system font').

In practical terms, it boils down to deciding whether or not you want your text to be exactly the same as the default desktop text - whatever that is set to. If you do, then follow Dr Wimp's instructions for 'system font'. If you want something else, follow the instructions for an 'outline font!

I hope you are now not more confused!

StrongHelp

By one of those strange quirks of coincidence, two people poles apart (literally!) both recently sent me StrongHelp version of the !Fnc'n'Prc output.

Keith Wright in Australia and Harriet Bazley in UK sent me very similar documents a few weeks apart. Their common aim was to offer in StrongHelp format the Dr Wimp PROC and FN information carried in !Fnc'n'Prc. Harriet had gone further and produced a utility to convert the !Fnc'n'Prc information automatically.

Some three-way to-ing and fro-ing seems to have agreed some minor changes and hopefully my website should have the StrongHelp document available for download by the time this article appears.

RO4 and Dr Wimp

I'm very interested to hear of any experiences of using Dr Wimp under RO4. (I shall be having some experience firsthand shortly.) I'm not aware of any reason why there should be any problems, but a new OS always puts you on tenterhooks for a while.

In v.3.53, I have at least tried to anticipate one potential problem and have made allowance for longer filenames in one of the new wimp-functions.


Source: Archive 13.02
Publication: Archive Magazine
Contributor: Ray Favre