The main additions/changes are as follows:
Behind the scenes, there have also been several minor improvements in response to comments and suggestions (predominantly from Mark Scholes and Dick Alstein).
I have also completed the first part of an intention to progressively clean up some of the coding in the DrWimp library. This first step made all numeric variables integer variables, wherever possible. This ought to be transparent to you - apart from NULL which is now NULL% (see 'Upgrading' in the Documents folder).
Two user-functions are needed because the output (a chosen colour from the colour picker window) is actually provided by the Wimp in two ways: in conventional 'rgb' (0-255) values and also in 'colour model' values, i.e. RGB, CMYK or HSV outputs which all use 0-100% values (except for the 'colour angle' in HSV which is in the range 0-359 degrees). So you get both outputs and suit yourself which one(s) you use.
Also, of course, one possibility is that the user presses the 'None' button in the colour picker window. So both user-functions also tell you if this has happened. (Interestingly, the Wimp still returns the currently displayed colour data when 'None' is pressed. This allows you, for instance, to re-open the window later with these same settings displayed.)
Corresponding to the two outputs, you get two pairs of wimp-functions to open the colour picker window. One half of each pair allows you to specify the initially-displayed colour in 0-255 'rgb' values and the other one allows you to use a 'colour model' instead. Both lead to the standard colour picker window with the ability to change 'model' etc within it.
One pair of wimp-functions is for 'normal' opening, just like you might open any other already-defined-and-loaded window - and the other is for opening the colour picker window as a submenu off a menu item.
All in all, a very useful addition.
(But note that these colour picker facilities will only be usable with RISC OS 3.50 and upwards - because the SWIs need that. However, earlier RISC OS versions should still work OK with Dr Wimp 3.54, provided the colour picker wimp-functions aren't called.)
If your group would like this and meets at a location within, say, an hour or so's drive from Heathrow - then please contact me. (I'm not unwilling to travel further but an overnight stay is then more probable and I might need to get help with the cost of that. We are, after all, talking freeware here!)
The reason is that it was written using v. 3.51 of the Dr Wimp package and the differences between that and the latest version (v. 3.54) are now fairly significant, which could cause some unnecessary confusion to a newcomer trying to follow the book tutorial listings in detail.
Accordingly, I am now including a copy of v. 3.51 with the book, as well as the latest version, of course. This will allow you to become familiar with Dr Wimp without distraction - and once you've reached that happy state, transferring to the latest version will be a very small and easy step.
This change means that each book will come with two discs in future.
A few of the more recent past buyers of the book may also feel that a copy of v. 3.51 would be helpful to them. If so, you'll find it on my website - or please contact me for a copy (a formatted disc would help if you want it by post).
Source: | Archive 13.06 |
Publication: | Archive Magazine |
Contributor: | Ray Favre |