DRWIMP
3.01 (08-Jun-97)
© Andrew Ayre 1995-97
For users of Acorn 32-bit machines

Introduction

Doctor Wimp (DrWimp for short) is a library that I have been developing constantly since March 1995 to enable people who are familiar with BBC BASIC to write multitasking desktop programs. Users never have to fiddle about with blocks of memory, 32-bit words, bytes, bits, or see a single SWI call.

It consists of 100s of hours of work and a DTPed Impression format manual which runs to 90 pages, and is Public Domain (freeware).

As an idea, to get an application to put an icon on the iconbar, open a window when clicked on and provide an iconbar menu takes roughly 16k to do. Imagine having to write this every time just to get a very simple appliction working? See why so many people use libraries?

The latest version is now available to download. Full instructions on how to upgrade from any version to the latest are included.


Overview

DrWimp consists of what I call user functions and wimp functions. Functions are both FNx and PROCx.

Wimp functions are what is in the library and you call them to get DrWimp to do what you want.
User functions are called by DrWimp and are contained in the !RunImage file. You use these to help DrWimp do what you told it to do by either performing some action or returning some data.

For example you could call the wimp function PROCwimp_menupopup to open a menu. That menu could have a save window attached to it and if the user drags the icon then the user function PROCuser_savedata is called where you enter some code to do the saving of the data.

A 'blank' application will therefore consist of 'DrWimp' the BASIC library, '!RunImage' the BASIC file which contains all the user functions which are either empty or return a default value, and the usual '!Run', '!Sprites', etc. files.
A template application like this is provided for you to build up your program on. Alternatively there is a utility to create semi-custom blank applications to save you the time of adding an iconbar icon, iconbar menu and info window.


Features

  • Get started with a basic, customised application within minutes, ready for you to start on solving the problems instead of worrying about the multitasking and setting up the wimp essentials.

  • Build complex menu structures quickly and easily using a shorthand method of describing them.

  • Easy loading in of windows from template files and Message file support.

  • Quick and simple implementation of save boxes and save procedures using only a few lines of code. Application to application saves supported as well as DragASprite.

  • Simple process to load files of certain type.

  • Multiple panes per window, with common positions easily calculatable.

  • Sliders, dynamic (changeable) menus, context sensitive menus and bars.

  • Menu item enabling, disabling, dotted lines, writeable menu items, etc.

  • Drawfile rendering direct to screen or in windows, with multiple Drawfiles per application.

  • Grabbing and changing text in windows, menus, window titles and menu titles.

  • Changing iconbar icon and text under iconbar icon.

  • Tutorials in the manual which cover all aspects of DrWimp and provide hints and tips and methods on implementing common Wimp facilities.

  • Interactive help for windows, icons and menus.

  • Easy to make long operations such as file loading and calculations multitasking.

  • Private sprite areas.

  • Text plotting and colour selecting.

  • Loading banners.

  • WYSIWYG printing with options for multiple copies, ranges of pages, 1, 2 or 4 up printing. And lots more...

    So what do I get?

    The complete DrWimp package consists of:

  • 90 page manual in Impression (Publisher) format containing complete introduction which guides you through some of the concepts involved to how the DrWimp system is arranged.
    Most of the manual consists of a couple of tutorials which - using the tutorial files supplied - take you through building up desktop applications which use most of the features of RISC OS.
    The manual rounds off with a list of all the wimp functions DrWimp provides, containing a short explanation of what they all do and what the parameters are.
    The manual is also in plain text format.

  • Skeletal application.

  • Fabricate utility - allows you to instantly create a customised skeletal application. Options are to have an iconbar icon, iconbar menu and info window.

  • Linker utility - links the DrWimp BASIC library file to the !RunImage BASIC file, only taking the parts needed from DrWimp.

  • Fnc'n'Prc utility - handy viewer which shows all the wimp functions as listed in the manual. They are grouped into sections are are searchable.

  • CodeTemps utility - to convert windows into BASIC code for DrWimp.

  • TemplEd - 3rd party template editor.

  • BSquasher - 3rd party BASIC file squasher.

  • MakeApp2 - 3rd party BASIC to absolute file converter.

  • Crunch - 3rd party absolute file squasher.

  • UnCrunch - 3rd party module for StrongARM users.

    (all 3rd party utilities have their own distribution conditions)

  • Notes on source code security and upgrading from previous versions of DrWimp.

  • Over a dozen example applications which show how to achieve different things and contain fully commented source code.
    There are examples on such things as panes, sliders, user graphics, menu manipulation, displaying drawfiles, etc.

  • All the files needed for the tutorials.


    Conditions of use

  • DrWimp is distributed on an "As Is" basis, without warranty. No liability can be accepted for any consequential loss or damage, however caused, arising from the use of this program or other utilities supplied. Boring but there you go.

  • The DrWimp library may be distributed for free and without the documentation, examples, utilities, etc. if it is being used in a Public Domain, Shareware, Cover Disc or Disc Magazine program. If you wish to distribute it with a commercial program then contact the author to negotiate royalties.

  • Public Domain libraries may make a reasonable charge for materials, handling, etc. as long as this does not exceed £2.00 (UK) net for the DrWimp package.

  • The DrWimp library may be reproduced in part if crunching and mangling utilities such as !BSquasher and !MakeApp are used, otherwise it must be reproduced in whole, complete with the conditions of use and the copyright banner.

  • If the DrWimp library is being reproduced in full then it may be added to the !RunImage (or similar) file, and does not have to be separate.

  • The DrWimp package (apart from !MakeApp2, !Crunch, !BSquasher, !TemplEd and UnCrunch) may only be distributed as a whole. For conditions of use of the third party applications see their own !Help files.

  • The author retains copyright of DrWimp, documentation and examples at all times.


    Where can I get it?

    You can get DrWimp by clicking below.
    Please note that it is NOT a zip file but an ArcFS/Spark archive.

    Version 3.00 (31-May-97)

    DW301.ZIP  (800k)

    or you can Email me and request a copy via Email. Please tell me if you prefer the archive attaching or sending uuencoded in the body of the Email. Both ways come to about 1Mb.

    Upgrade from version 3.00 to 3.01.

    300TO301.ZIP  (448k)

    MANUAL.PDF  (300k)

    Click here to see the DrWimp development history.


    Credits

    Many many many thanks to Eddie Lord for redesigning the manual layout so it was more amenable to A5 printing and hole punching, proof reading the manual, and providing many valued suggestions.

    Thanks to Ernie Ong for providing lots of suggestions, including adding the function menu to !Fnc'n'Prc, sorting functions into alphabetical order and allowing multiple info files to be used. Thanks also for suggesting a method of allowing FNuser_saveicon to set three icon numbers for save windows, which is now implemented.

    Thanks to Guy Bartle for providing the impetus to allow users to act on mode changes, and add a function to get the screen size. Also for getting me to make loading with double-clicks work and push ahead with releasing version 3.00. Also thanks for raising the issue of switching delays on and off during polling, and prompting the writing of PROCwimp_singlepollidle. Thanks for drawing my attention to the fact that the upgrading file for version 3.00 had the omission of a couple of lines that went with FNwimp_loadsprites and for giving me the idea of FNwimp_getscreenres.

    Thanks to Ray Favre for pointing out that save windows don't automatically grab the input focus like they should, and for raising a point about the error handling. Thanks also for reminding me of the bug in !Linker and for pointing out lots of errors and typos in the manual and Func'n'Proc. Thanks too for pointing out the bug in PROCwimp_recreatemenu.

    Thanks to Tim Nicholson for pointing out that in section 10 I had refered to PROCuser_loaddata when it is infact FNuser_loaddata, and for also pointing out I had used pathname$ in Fnc'n'Prc and section 3 of the manual when elsewhere it is path$. Thanks also for suggesting vertical sliders and for pointing out the missing THEN in the internal PROCwimp_decodemenuentry.

    Thanks to Keith Raven for pointing out to me the problem with not being able to call DrWimp functions in FNuser_savedata, in order to implement complex file saves.

    Someone pointed out the dragging bug in the Saver example application, but I can't remember who! If it was you then please let me know so I can credit you. :)


    Andrew Ayre 9th June 1997
    A.J.Ayre@e-eng.hull.ac.uk

    [home]