5.00
Misc
FNwimp_OStolength(osvalue,scale,inch%)
Converts OS units to mm or inches.
osvalue = OS value to convert, can be integer or floating point.
scale = scaling factor 0-100 (%) can be integer or floating point.
If inch%=0 the value returned is in mm. If inch%=1 the
value returned is in inches.

Misc
FNwimp_changecase(string$,upper%)
Converts a string all to upper or lower case characters.
string$ = string to convert
If upper% = 0 then conversion is to lower case
If upper% = 1 then conversion is to upper case
(The conversion only affects the alphabetical characters A-Z and a-z.
All others are left unchanged.)

Misc
FNwimp_copyobject(sourcepath$,destinationpath$,deletesource%,newer%,restamp%,force%,warning%)
Copies/moves directory objects (recursively as necessary) - with 
options. Returns 0 if action fails for any reason, otherwise returns 1.
sourcepath$ - full pathname of object to be copied/moved. (Can be 
wildcarded.)
destinationpath$ - full pathname of destination. (Leafname can be 
wildcarded.)
deletesource%  - if not 0, copied object will be deleted after copying 
i.e. the object is moved.
newer% - if not 0, overwriting an existing object will only occur if 
source object is newer.
restamp% - if not 0, copied objects will be given new time-stamp.
force% - if not 0, objects will be copied/moved irrespective of any 
access locks etc.
warning% - if not 0, a warning will be given if the source object does 
not exist. There are no fatal errors.

Misc
FNwimp_countdirectoryobjects(dir$)
Returns number of objects (i.e. files/applications/directories) in
specified directory.
dir$ - full pathname of directory or application
Returns -1 if object not found.

Misc
FNwimp_createintegerblock(items%,da%)
Creates a block for storing integers in. Returns a handle
to the block. (Load/read block using PROCwimp_putinintegerblock 
and FNwimp_getfromintegerblock only.)
items% = maximum number of integers to store.
da%=0 means create the block with DIM, otherwise create as a 
dynamic area.

Misc
FNwimp_createstringblock(items%,length%,da%)
Creates a block for storing strings in. Returns a handle
to the block. (Load/read block using PROCwimp_putinstringblock and 
FNwimp_getfromstringblock only.)
items% = maximum number of strings to store.
length% = maximum possible length of each string.
da%=0 means create the block with DIM, otherwise create as a 
dynamic area.

Misc
FNwimp_decplacesnum(number,decplaces%)
Returns, as a real number, the number formatted to the designated
number of decimal places.
number - is the number to format, can be integer or floating point.
decplaces% - is the number of decimal places required.
Rounding is to the nearest i.e. to two decimal places, 1.635 becomes 
1.64 and, for negative numbers,  -1.635 becomes -1.64
(N.B. this function can suffer from rounding errors. Use the string
version FNwimp_decplacesstr if possible.)

Misc
FNwimp_decplacesstr(number,decplaces%)
Returns, as a string, the number formatted to the designated number of
decimal places.
number - is the number to format, can be integer or floating point.
decplaces% - is the number of decimal places required.
Rounding is to the nearest i.e. to two decimal places, 1.635 becomes 
1.64 and, for negative numbers, -1.635 becomes -1.64

Misc
FNwimp_deleteobject(path$,force%,warning%)
Deletes a named Filer object (recursively as necessary) - with options.
Returns 0 if action fails for any reason, otherwise returns 1.
path$ - full pathname of object to be deleted. (Can be wildcarded.)
force% - if not 0, objects will be deleted irrespective of any access 
locks etc.
warning% - if not 0, a warning will be given if the object does not 
exist. There are no fatal errors.

Misc
FNwimp_errorchoice(title$,error$,from%,type%,spritename$,spritearea%,continue%,cancel%,extrabutton$)
Reports an error using an error box with 1 or more action buttons, 
returning the number of button pressed.
title$ = title of error window. (If title$= then the title will be the 
application name.)
error$ = error message.
If from%=0 then title has no prefix
If from% = 1 then the title is prefixed by Error from .
If from% = 2 then the title is prefixed by Message from .
If type%=1 then the error box will have an information icon.
If type%=2 then the error box will have an error icon.
If type%=3 then the error box will have a program icon.
If type%=4 then the error box will have a question icon.
spritename$ is name of a user-chosen sprite to be added to error box.
spritearea% is spritearea of above sprite: 1 meaning the wimp-pool.
If continue%=1 then the error box will have a Continue button.
If cancel%=1 then the error box will have a Cancel button.
extrabutton$ allows the error box to have extra/alternative buttons. It 
should be a null-string if no extra/alternative buttons required, or a 
comma-separated list of the required button text(s).
Returns the number of the pressed button: 1 is Continue (if present); 2 
is Cancel (if present); 3, 4, 5 etc. is one of the other buttons in their 
order in extrabutton$.
(See Section 2.8 for details.)

Misc
FNwimp_getdaydatetime(choice%)
Returns current day/date/time as a string.
If choice%=0, string format is Mon 06 Jun 2005 15:09:37
If choice%=1 (day only) string format is Mon
If choice%=2 (date only) string format is 06 Jun 2005
If choice%=3 (time only) string format is 15:09:37
For each choice the string length/format is always the same as shown.

Misc
FNwimp_getdirectoryobjectname(dir$,objectnumber%)
Returns name (as it appears in Filer window) of a specified object 
(identified by number) in specified directory.
dir$ - full pathname of directory or application
objectnumber% is 1 for first object, 2 for second object, etc.
Objects are read in alphabetical order of name - so names starting
with ! (Ascii 33) will come first.
Returns a null string if object not found.
(Use FNwimp_countdirectoryobjects first to find total number of 
objects present in directory.)

Misc
FNwimp_getdirectoryobjecttype(dir$,objectnumber%)
Returns, as a string, the filetype number of specified object (identified 
by number) in specified directory. A file will
return upper-case XXX where XXX is the filetype hex number e.g. 
FFF for textfiles - or 0AF for filetype &af.
A directory will return 1000 and an application 2000.
dir$ - full pathname of directory or application
objectnumber% is 1 for first object, 2 for second object, etc.
Objects are read in alphabetical order of name - so names starting
with ! (Ascii 33) will come first.
Returns a null string if object not found.
(Use FNwimp_countdirectoryobjects first to find total number of 
objects present in directory.)

Misc
FNwimp_getdirectorypath(pathname$)
Returns the pathname with the leafname removed i.e. returns the 
directory specification string. The trailing fullstop (or trailing colon, if 
pathname$ is something like Boot:!Help) will be included.
Does not check that removed leafname is actually a file i.e it could be a 
directory or application.
pathname$ = pathname string.
(If pathname$ does not include at least one . or :  character a null-
string will be returned i.e. no leafname is present.)

Misc
FNwimp_getfreeRAM
Returns the number of bytes of free RAM available.

Misc
FNwimp_getfromintegerblock(block%,pos%,error%)
Returns a integer stored in a block by PROCwimp_putinintegerblock.
block% = handle of block.
pos% = position of integer in block (ranging from 1 to
maximum as passed to FNwimp_createblock).
error% determines action taken if pos% is outside valid range - see 
Manual Section 2.33

Misc
FNwimp_getfromstringblock(block%,pos%,error%)
Returns a string stored in a block by PROCwimp_putinstringblock.
block% = handle of block.
pos% = position of string in block (ranging from 1 to
maximum as passed to FNwimp_createblock).
error% determines action taken if pos% is outside valid range - see 
Manual Section 2.33

Misc
FNwimp_getleafname(path$)
Returns a string containing the leafname from the pathname.
Does not check that leafname is actually a file i.e it could be a 
directory or application.
path$ = pathname string.
(If there is no . or : character in path$, then path$ is returned 
unaltered i.e. path$ was already a leafname.)

Misc
FNwimp_getobjecttypehexstring(path$,warning%)
Returns - as a string - the file-type of a named Filer object.
THIS FUNCTION IS IDENTICAL TO FNwimp_testobjectpresent() 
and is copied under this different name for user convenience.
path$ - full path of object which may be a directory, application or file.
For a file, the return is normally of the form XXX, where &XXX is 
the filetype. Leading zeros will be added as necessary to bring the 
return string up to three characters. (But, exceptionally, an untyped file 
will return the string -1)
For a directory, the return is 1000
For an application, the return is 2000
If the object is not found the return is a null string.
If warning% is not 0, then a warning will be given if the object is not 
present. There are no fatal errors.

Misc
FNwimp_getobjecttypenumber(path$,warning%)
Returns - as a number - the file-type of a named Filer object
path$ - full path of object which may be a directory, application or file.
For a file, the return is a number in the range 0-4095 (-1 for an un-
typed file). The return is 4096 (&1000) for a directory and 8192 
(&2000) for an application.
If the object is not found the return is 0 (Note that there is a potential 
conflict here if the file-type is 0 - which is a very unlikely occurrence.)
If warning% is not 0, then a warning will be given if the object is not 
present. There are no fatal errors.

Misc
FNwimp_getscreenres(direction%)
Returns the resolution (number of pixels) of the current screen mode
in the specified direction.
If direction%=0 then return is horizontal resolution.
If direction%=1 then return is vertical resolution.

Misc
FNwimp_getscreensize(side%)
Returns the required dimension, in OS units, of the full screen in
current mode.
If side% = 0 returns width.
If side% = 1 returns height.

Misc
FNwimp_getsysvariable(sysvar$)
Returns, as a string, the contents of the system variable sysvar$.
Note < and > are not required in sysvar$.
sysvar$ is case-sensitive.
If designated system variable is not present a null string is returned.

Misc
FNwimp_initialise(name$,wimpmem%,ver%,desktopsave%)
This function registers your application with the Task Manager, 
reserves some important memory and determines if the application will
give a response to the Wimps desktop save protocol and whether it 
will pass on unused messages from the Wimps messaging system.
Returns Wimp-assigned task handle.
name$ = the name of your application eg. MyApp.
wimpmem% = number of bytes to reserve for window, icon and menu 
definitions. (Space for indirected data is allocated automatically.)
ver% = minimum version of RISC OS that the application is allowed to 
run on, multiplied by 100. (Needs to be at least 360 to use all Dr 
Wimps facilities.)
If desktopsave% <> 0 then application will respond to Wimps 
desktop save message.

Misc
FNwimp_istaskrunning(taskname$)
Checks whether a task (i.e. an application, module etc.) is already 
running on the Wimp and returns TRUE or FALSE accordingly.
taskname$ is the name of the task - which must be exactly the same as 
that used by the task in the Task Display.
(For an application the task name is often, but not always, the 
application name without the leading !. For an application authored 
using Dr Wimp, the name of the task will be the the string passed in the 
first parameter of the FNwimp_initialise call.)

Misc
FNwimp_lengthtoOS(length,scale,inch%)
Converts a length in mm or inches to OS units.
length = value to convert, can be integer or floating point.
scale = scaling factor 0-100 (%) can be integer or floating point.
If inch%=0 the length value supplied is in mm. If inch%=1
the length value supplied is in inches.

Misc
FNwimp_libversion
Returns the version number (100) of the DrWimp library.
Eg. if the version of the library is 3.61 then 361 will be returned.

Misc
FNwimp_loadfile(filepath$,handle%,warning%)
General file loader. Loads a file into a block of memory at handle%.
Returns address (handle) at which to load the next file (if any) into the 
same memory block. (If filepath$ cannot be found the return will be 
the value of handle% i.e. memory not used.)
filepath$ = full pathname of file.
warning% - if not 0, a non-fatal warning will be given if filepath$ 
cannot be found.
Memory must have been created after using FNwimp_measurefile to 
find necessary size.
(Not to be used for spritefiles/drawfiles/JPEGfiles which have their 
own equivalent wimp-functions.)

Misc
FNwimp_measurefile(filepath$,warning%)
Returns the size in bytes needed to store a file in memory prior to using 
FNwimp_loadfile(), FNwimp_loaddfile(), FNwimp_loadsprites() or 
FNwimp_loadjpegfile().
Returns -1 if filepath$ not found.
Always use this as opposed to any other form of measurement.
filepath$ = full pathname of spritefile.
warning% - if not 0, a non-fatal warning will be given if filepath$ 
cannot be found.
(This function is also listed in in other sections)

Misc
FNwimp_numtobinstring(number%,digits%,prefix%)
Converts a number in any format to a binary value in string form.
The output range (i.e. number of bits) is determined by the value of 
digits%, as below.
number%= number to convert.
If digits%=1, output range is 00000000 to 11111111 i.e. 18 bits.
If digits%=2, output range is 28 = 16 bits.
If digits%=3, output range is 38 = 24 bits.
If digits%=4, output range is 48 = 32 bits.
(If digits% is set to <1 then digits% will be reset to 1. If digits% is set 
to >4 then digits% will be reset to 4.)
For each value of digits% leading zeros are added to keep the result at 
the shown constant string length.
If prefix% is not 0 the output string is prefixed with the extra character 
%.
If number% is greater than the maximum value possible for the chosen 
value of digits% only those bytes needed to do the conversion are used 
i.e. the least significant bytes of number%

Misc
FNwimp_numtodecstring(number%)
Converts a number in any format to an unsigned decimal integer in 
string form. The output range is 0 to 4294967295 and there are no 
leading zeros added.
number%= number to convert.

Misc
FNwimp_numtohexstring(number%,digits%,prefix%)
Converts a number in any format to a hex value in string form.
The output range (i.e. number of hex characters) is determined by the 
value of digits%, as below.
number%= number to convert.
If digits%=1, output range is 0 to F
If digits%=2, output range is 00 to FF
If digits%=4, output range is 0000 to FFFF
If digits%=6, output range is 000000 to FFFFFF
If digits%=8, output range is 00000000 to FFFFFFFF
(If digits% is set to <1 then digits% will be reset to 1. If digits% is set 
to >8 then digits% will be reset to 8. If digits% is set to 3, 5 or 7 then 
digits% will be reset to 4, 6 or 8, respectively.)
For each value of digits% leading zeros are added to keep the result at 
the shown constant string length.
If prefix% is not 0 the output string is prefixed with the extra character 
&.
If number% is greater than the maximum value possible for the chosen 
value of digits% only those bytes needed to do the conversion are used 
i.e. the least significant bytes of number%.

Misc
FNwimp_numtosigneddecstring(number%)
Converts a number in any format to a signed decimal integer in string 
form. The output range is -2147483648 to 2147483647 and there 
are no leading zeros added.
number%= number to convert.

Misc
FNwimp_osversion
Returns the RISCOS version number (100) of the machine being 
used.
Eg. if the RISC OS version is 4.02 then 402 will be returned.

Misc
FNwimp_renameobject(existingpath$,newpath$,warning%)
Renames a named Filer object.
Returns 0 if action fails for any reason, otherwise returns 1.
existingpath$ - full path of existing object.
newpath$ - required full path of renamed object.
If warning% is not 0, then a warning will be given if the existing object 
does not exist, or if directory into which the renamed object is to be 
placed is not present, or if newpath$ already exists as a file. There are 
no fatal errors.

Misc
FNwimp_roundfloat(float)
Rounds the specified floating point number up or down and returns the
integer.

Misc
FNwimp_screentowork(window%,coord%,side%)
Converts the x or y screen coordinate coord% to a work area x or y 
coordinate - all in OS units.
window% = handle of window whose work area coordinate is being 
sought.
coord% = coordinate (x or y).
If side% = 0 then coord% is a x coordinate, and an x coordinate is 
returned.
If side% = 1 then coord% is a y coordinate, and a y coordinate is 
returned.

Misc
FNwimp_testobjectpresent(path$,warning%)
Checks whether a Filer object is present and returns, as a string, its file 
type.
path$ - full path of object which may be a directory, application or file.
For a file, the return is normally of the form XXX, where &XXX is 
the filetype. Leading zeros will be added as necessary to bring the 
return string up to three characters. (But, exceptionally, an untyped file 
will return the string -1)
For a directory, the return is 1000
For an application, the return is 2000
If the object is not found the return is a null string.
If warning% is not 0, then a warning will be given if the object is not 
present. There are no fatal errors.

Misc
FNwimp_testsysvariable(sysvar$)
Returns TRUE (-1) if designated system variable is present, or FALSE 
(0) if not.
Note < and > are not required in sysvar$.
sysvar$ is case-sensitive.
(Note difference from usual Dr Wimp practice of returning 1 or 0)

Misc
FNwimp_worktoscreen(window%,coord%,side%)
Converts the x or y work area coordinate coord% to an x or y screen
coordinate - in OS units
window% = handle of window whose work area coordinate is being 
converted.
coord% = coordinate (x or y).
If side% = 0 then coord% is a x coordinate, and an x coordinate is 
returned.
If side% = 1 then coord% is a y coordinate, and a y coordinate is 
returned.

Misc
PROCwimp_bar(window%,icon%,length%,dir%)
Sets/adjusts the length of a bar - in OS units.
window% = handle of window containing the bar.
icon% = icon number of the bar.
length% = length of the bar in OS units.
If dir% = 0 then the bar moves horizontally keeping the height 
constant.
If dir% = 1 then the bar moves vertically keeping the width constant.

Misc
PROCwimp_closedirectory(dir$)
Close the Filer window for the specified directory.
dir$ is the full directory path (any trailing dot is ignored).

Misc
PROCwimp_createdirectory(dir$,warning%)
Creates a new, empty directory.
dir$ - full path of required new directory.
If warning% is not 0, then a warning will be given if the directory into 
which the new directory is to be placed is not present - and if dir$ 
already exists as a file. There are no fatal errors.

Misc
PROCwimp_doubleclickobject(path$,warning%)
Has same effect as double-clicking on a Filer object i.e. an 
application will be run; a file will be loaded into its parent application 
(if the latter has been seen) and a directory will be opened to show ite 
contents.
path$ = full pathname of object.
warning% - if not 0, a warning will be given if the object does not 
exist.

Misc
PROCwimp_error(title$,error$,from%,spritename$,spritearea%,button%,altbutton$)
Reports an error using an error box with only one action button.
title$ = title of error window. (If title$= then the title will be the 
application name.)
error$ = error message.
If from%=0 then title has no prefix
If from% = 1 then the title is prefixed by Error from .
If from% = 2 then the title is prefixed by Message from .
spritename$ is name of a user-chosen sprite to be added to error box.
spritearea% is spritearea of above sprite: 1 meaning the wimp-pool.
If button%=1 then the single button will be called Continue.
If button%=2 then  the single button will be called Cancel.
altbutton$ contains, if required, a user-chosen name for the single 
button. If it is not a null string it will be used irrespective of the 
button% value.
(See Section 2.8 for details.)

Misc
PROCwimp_hourglassoff
Turns off the hourglass.

Misc
PROCwimp_hourglasson
Turns on the hourglass.

Misc
PROCwimp_hourglasspercentage(percentage%)
Sets the percentage display on the hourglass. (If there are nested 
PROCwimp_hourglasson calls in operation when this call is made then 
the percentage value can only be further changed from  the same 
nesting level.)
percentage% needs to be in the range 0 to 99. If the value is outside 
that range the percentage display is switched off.

Misc
PROCwimp_increaseslot(bytes%)
Increases size of wimpslot by bytes% bytes. If not
enough available RAM then creates an error.

Misc
PROCwimp_opendirectory(dir$,default%,topx%,topy%,width%,height%,iconsize%,sortby%,warning%)
Opens the Filer window for the specified directory.
dir$ is the full directory path (any trailing dot is ignored).
If default% is not 0 the window opens centred on the screen and with 
the current default Filer window attributes.
If default% is 0 then the window opens using the values in the 
following six parameters.
topx%, topy% position of top left corner of window in screen OS units.
width%, height% initial visible size of window in OS units.
If size%=1 the Filer icons will be small.
If size%=2 the Filer icons will be large.
If size%=3 the Filer icons will be small with full information.
If sortby%=1 the icons will be sorted by name.
If sortby%=2 the icons will be sorted by file-type.
If sortby%=3 the icons will be sorted by date.
If sortby%=4 the icons will be sorted by size.
If warning% is not 0 a non-fatal warning will be given if dir$ cannot be 
found.

Misc
PROCwimp_pause(seconds)
Introduces a pause into the processing.
seconds = required pause, in seconds. Can be any real positive value.

Misc
PROCwimp_plotwindowcircle(window%,centrex%,centrey%,radius%,fill%)
Plots a circle within a window. (Intended to be used within 
PROCuser_redraw)
window%=handle of window to plot in.
centrex%, centrey% = work area OS coordinates of centre of required 
circle.
radius% = radius of circle in OS units.
If fill% = 1 then circle is filled.
If fill%= 0 then circle is an outline only.

Misc
PROCwimp_plotwindowellipse(window%,centrex%,centrey%,semimajor%,semiminor%,rotatedegrees,fill%)
Plots an ellipse within a window. (Intended to be used within 
PROCuser_redraw)
window%=handle of window to plot in.
centrex%, centrey% = work area OS coordinates of centre of required 
ellipse.
semimajor% = half-length of major axis in OS units.
semiminor% = half-length of minor axis in OS units.
rotatedegrees = angle of rotation of ellipse about its centre, in degrees.
If fill% = 1 then ellipse is filled.
If fill%= 0 then ellipse is an outline only.

Misc
PROCwimp_plotwindowline(window%,point1x%,point1y%,point2x%,point2y%,type%)
Plots a straight line within a window. (Intended to be used within 
PROCuser_redraw)
window%=handle of window to plot in.
point1x%, point1y% = work area OS coordinates of one end of 
required line.
point2x%, point2y% = work area OS coordinates of the other end.
If type% = 0 then a full line is drawn.
If type%= 1 then a dotted line is drawn.

Misc
PROCwimp_plotwindowrectangle(window%,bottomleftx%,bottomlefty%,width%,height%,fill%)
Plots a rectangle within a window. (Intended to be used within 
PROCuser_redraw)
window%=handle of window to plot in.
bottomleftx%, bottomlefty% = work area OS coordinates of bottomleft 
corner of required rectangle.
width%, height% = width and height of rectangle in OS units.
If fill% = 1 then rectangle is filled.
If fill%= 0 then rectangle is an outline only.

Misc
PROCwimp_plotwindowtriangle(window%,point1x%,point1y%,point2x%,point2y%,point3x%,point3y%,fill%)
Plots a triangle within a window. (Intended to be used within 
PROCuser_redraw)
window%=handle of window to plot in.
point1x%, point1y% etc. = work area OS coordinates of the three 
vertices of the required triangle.
If fill% = 1 then triangle is filled.
If fill%= 0 then triangle is an outline only.

Misc
PROCwimp_putinintegerblock(block%,integer%,pos%.error%)
Stores an integer in a block. (The block must have been created using 
FNwimp_createintegerblock).
block% = handle of block.
integer% = integer to store.
pos% = position to store integer in (ranging from 1 to maximum 
number of integers as passed to FNwimp_createintegerblock).
error% determines action taken if pos% is outside valid range - see 
Manual Section 2.33
(Integers stored in this way can be read with 
FNwimp_getfromintegerblock)

Misc
PROCwimp_putinstringblock(block%,string$,pos%.error%)
Stores a string in a block. (The block must have been created using 
FNwimp_createstringblock).
block% = handle of block.
string$ = string to store.
pos% = position to store string in (ranging from 1 to maximum number 
of strings as passed to FNwimp_createstringblock).
error% determines action taken if pos% is outside valid range - see 
Manual Section 2.33
(Strings stored in this way can be read with 
FNwimp_getfromstringblock)

Misc
PROCwimp_quit(type%)
Used to initiate quitting action and also to re-start a wimp shutdown 
that has been temporarily stopped.
If type%=0 an application quit will be initiated.
If type%=1 a temporarily halted shutdown will be re-started.
In both cases, FNuser_quit() will be called with type% passed to it.
(See Section 2.27 of Manual for details.)

Misc
PROCwimp_savefile(savepath$,filehandle%,ftype%)
General file saver. Saves a file stored in a memory block into a normal 
Filer file. (Not to be used for sprites.)
(File in block must have been loaded using FNwimp_loadfile).
filehandle% = handle of stored file to save.
savepath$ = full pathname to save to.
ftype%=filetype required - as hex number e.g. &fff for textfile.

Misc
PROCwimp_sendfiletoprinter(filepath$,delete%)
Sends the named file directly to the currently configured printer.
Has same effect as dragging the file to the printer icon on the iconbar.
filepath$ = full pathname of file.
If delete% is not 0, the file will be deleted after being sent to the 
printer.
(Also listed under Section 3.12 Printing)

Misc
PROCwimp_setcolour(red%,green%,blue%,background%)
Sets the current GCOL colour (for foreground or background) to the 
nearest possible for the current mode.
red% = amount of red in range 0-255.
green% = amount of green in range 0-255.
blue% = amount of blue in range 0-255.
If background%=0 then the foreground colour will be set, otherwise 
the background colour will be set.
(Best used immediately before corresponding plotting/printing action - 
see Section 2.33 Graphics colours.)

Misc
PROCwimp_setfiletypehexstring(filepath$,filetype$,warning%)
Sets the filetype of the specified file, using a file-type hex string.
filepath$ - full pathname of file.
filetype$ - required filetype as a hex string e.g. &FFF or just FFF. 
If value is outside the hex range 0-&FFF, the file will be given the 
&FFF filetype i.e. Text.
warning% - if not 0, a warning will be given if the object does not exist 
or is a directory/application

Misc
PROCwimp_setfiletypenumber(filepath$,filetype%,warning%)
Sets the filetype of the specified file, using a file-type number.
filepath$ - full pathname of file.
filetype% - required filetype as a number in the range 0-&FFF. If value 
is outside this range, the file will be given the &FFF filetype i.e. Text.
warning% - if not 0, a warning will be given if the object does not exist 
or is a directory/application

Misc
PROCwimp_setintegerblock(block%,integer%)
Sets all elements of an integer block (created with 
FNwimp_createintegerblock) to the same integer value.
block% = handle of block.
integer% = integer value to put into each element.

Misc
PROCwimp_setstringblock(block%,string$)
Sets all elements of a string block (created with 
FNwimp_createstringblock) to the same string value.
block% = handle of block.
string$ = string to put into each element.

Misc
PROCwimp_setsysvariable(sysvar$,val$)
Sets the value of a system variable.
sysvar$ - name of system variable.
val$ - value to be set - in string form.

Misc
PROCwimp_starttask(command$)
Sends command$ to the CLI. Omit *.

Misc
PROCwimp_startuserdragbox()
NOT IN DrWimp LIBRARY.
ONLY USED AS PART OF Elixir_04 for user-defined drag-boxes - 
see Manual Section 2.36 and 3.16.
Starts dragging of user-defined drag-box. (Intended to be used within 
PROCuser_mouseclick().)

Misc
PROCwimp_unsetsysvariable(sysvar$)
Unsets (deletes) a system variable.
sysvar$ - name of system variable (case sensitive).

Polling
PROCwimp_poll
This function normally provides the main loop of your application, 
repeatedly polling the Wimp.
During the loop operation, whenever an event occurs involving your
application eg. an icon has been clicked on, then the Wimp will inform 
the application via Reason Codes and your programming of the user-
functions will determine the action the application takes.
If NULL%=TRUE then PROCuser_null will be called each time a 
null-event occurs e.g. more or less continuously.

Polling
PROCwimp_pollidle(duration,sec%)
Similar to PROCwimp_poll and can be used as an applications main 
loop. Its difference is that, unless a non-null event occurs, the Wimp is 
polled at an interval set by duration.
If NULL%=TRUE then PROCuser_null will be polled at each interval.
If sec%=0 then the duration value is interpreted as centiseconds.
If sec%=1 then the duration value is interpreted as seconds.
(duration can be any real positive number.)

Polling
PROCwimp_singlepoll
The same as PROCwimp_poll, except that the Wimp is polled once 
only and not in a loop. Usually called within the main Wimp poll loop.
If NULL%=TRUE then PROCuser_null will be called once.
Note however, that if this function is called within PROCuser_null, 
make sure NULL%=FALSE before the call is made (can be set to 
TRUE afterwards) otherwise recursion will occur.

Polling
PROCwimp_singlepollidle(duration,sec%)
The same as PROCwimp_pollidle, except that the Wimp is polled
once after an interval and not in a loop. Usually called within the main 
Wimp poll loop.
If NULL%=TRUE then PROCuser_null will be called once only after
the period set in duration.
If sec%=0 then the duration value is interpreted as centiseconds.
If sec%=1 then the duration value is interpreted as seconds.
(duration can be any real positive number.)
Note however, that if this function is called within PROCuser_null, 
make sure NULL%=FALSE before the call is made (can be set to 
TRUE afterwards) otherwise recursion will occur.

User
FNuser_dragicon(window%,icon%,button%)
Used to specify which (draggable) icons are to be dragged and/or the 
circumstances under which they can be dragged. (See Section 2.25)
Return 1 when dragging of icon required, otherwise return 0.
window% = handle of window containing icon.
icon% = icon number of (draggable) icon.
button% =  button being used for dragging i.e. 4 for <select-drag> or 1 
for <adjust-drag>
(Note: This user-function will only be activated by icons which have a 
button type which is draggable.)

User
FNuser_help(window%,icon%)
Used to return a string for interactive help when the mouse pointer is 
over the specified window and icon. Otherwise return a null string.
window% = handle of window (containing icon).
icon% = number of icon.
Note: the maximum allowable length of the returned string is 235 
characters.

User
FNuser_keypress(window%,icon%,key%)
If a key is pressed while one of your windows has the input focus, or a 
hotkey is pressed, then this function is called (provided icon validation 
string is suitably defined).
If you dont use the key press then return a 0. If you do then return a 1.
window% = handle of window with input focus.
icon% = number of icon with caret.
key% = key code. For most keys it is the ASCII number.
(See Section 2.4 of the Manual for codes of special keys - and Section 
2.28 for validation strings.)

User
FNuser_loaddata(path$,window%,icon%,filetype$,workx%,worky%)
Used to load data into application. Important to return a 1 if data is 
loaded.
path$ = full pathname of source file offered for loading.
window% = handle of window file has been dragged to. (Will be 0 if 
file double-clicked rather than dragged.)
icon% = number of icon file was dragged on to. (Will be -1 if file 
double-clicked rather than dragged.)
filetype$ = filetype of file offered for loading. Will always be at least 
three characters e.g. FFF or 0AF (or 1000 if a directory, or 
2000 if an application)
workx%, worky% = work area coordinates the icon was dropped at 
(these values are both -1 if file was loaded with a double-click rather 
than dragged).

User
FNuser_menu(window%,icon%,screenx%,screeny%)
Responds to <menu> clicks. If you want a menu to be displayed when 
you press <menu> over a specified window/icon or particular mouse 
pointer position, then this function needs to return the handle of the 
menu required. Otherwise return 0.
window% = handle of window.
icon% = number of icon.
screenx%, screeny% give the mouse pointer position in screen OS 
units.
(<select> and <adjust> clicks handled by PROCuser_mouseclick)

User
FNuser_menuhelp(menu%,item%)
Used to return a string for interactive help when the mouse pointer is 
over the specified menu and item. Otherwise return a null string.
menu% = handle of menu.
item% = number of item (starting from 1 at the top).
Note: the maximum allowable length of the returned string is 235 
characters.

User
FNuser_pane(window%)
If the window has a pane attached to it, then this function should
return the window handle of the pane. If the window doesnt have a
pane attached, then it should return -1.
window% = handle of window.
(See Section 2.6 for use with multiple panes.)

User
FNuser_preclosewindow(window%)
This function is called just before the window whose handle is 
window% is about to be closed.
Return a 1 (default value) to allow the closing action to continue, or 
return 0 to stop the window closing.

User
FNuser_printing(copy%,page%,totpages%,pagepos%)
Called repeatedly by DrWimp during printing so application can keep 
user informed of current printing status and give the option to cancel 
printing.
copy% = number of current copy being printed.
page% = number of current page being printed.
totpages% = total number of pages being printed.
pagepos% = current page being printed (starts at 1 each time and goes 
up to totpages%).
Return a 1 to cancel printing or a 0 to continue.

User
FNuser_quit(type%)
Called when the application is being asked to quit, either due to the 
user choosing to quit the application or because of a desktop shutdown.
If type%=0 then it is an application quit.
If type%=1 then it is a shutdown.
Return a 1 to continue with the quit/shutdown or return a 0 to stop it 
e.g. to allow the user to save any data.
(See Section 2.27 of Manual for details.)

User
FNuser_savedata(path$,window%)
Used to save/export data from an application.
Return a 1 if some data was saved, 2 if an error occurred or return a
0 for no data saved and no error.
path$ = full pathname of file to save data to i.e. destination file.
(Note that this must be a complete file path, not a directory.
Leafname is usually in save window writable icon.)
window% = handle of save window that file icon was dragged from.

User
FNuser_savefiletype(window%)
Used to identify Save windows. If the window is a Save window then 
you return the required filetype (as  hex string. eg. FFF for a textfile). 
Otherwise return a null string.
window% = handle of window%

User
FNuser_slider(window%,icon%)
In order to let DrWimp know that an icon is part of a slider/sliderback 
pair, return the slider icon number. Otherwise return -1.
window% = handle of window with slider pair in.
icon% = icon number of slider back icon.
(Always used with FNuser_sliderback as a complementary pair.)

User
FNuser_sliderback(window%,icon%)
In order to let DrWimp know that an icon is part of a slider/sliderback 
pair, return the slider-back icon number. Otherwise return -1.
window% = handle of window with slider pair in.
icon% = icon number of slider.
(Always used with FNuser_slider as a complementary pair.)

User
PROCuser_closewindow(window%)
If this function is called, then the window whose handle is window%
has just been closed.

User
PROCuser_colourpickermodel(model%,value1,value2,value3,value4,none%)
When the colour picker window is used to select a colour (by pressing 
OK or None) the colour model values of the currently displayed 
colour are passed to this function. Requires RISCOS Version 3.50 or 
higher.
model%=colour model number. 0 is RGB model, 1 is CMYK 
model, 2 is HSV model.
value1, value2 etc. are colour component values appropriate to the 
model, in range 0-100% (except value1 is in range 0-359 degrees for 
HSV model i.e. when model%=2)
Note that value4 is only relevant for CMYK model i.e. when 
model%=1. In other cases value4 will be -1.
If none%=0, OK was pressed in colour picker window i.e. displayed 
colour was selected.
If none%=1, None was pressed in colour picker window i.e. no 
colour selection was made.
(Note: Colour values are still passed when None is pressed.)

User
PROCuser_colourpickerrgb(red%,green%,blue%,none%)
When the colour picker window is used to select a colour (by pressing 
OK or None) the rgb values of the currently displayed colour are 
passed to this function. Requires RISCOS Version 3.50 or higher.
red% = red component of colour, in range 0-255.
green% = green component of colour, in range 0-255.
blue% = blue component of colour, in range 0-255.
If none%=0, OK was pressed in colour picker window i.e. displayed 
colour was selected.
If none%=1, None was pressed in colour picker window i.e. no 
colour selection was made.
(Note: Colour values are still passed when None is pressed.)

User
PROCuser_declarefonts
Any fonts being used in printing must be declared in this function 
using PROCwimp_declarefont, PROCwimp_declarefonth and/or 
PROCwimp_declaredfilefonts.
(This is in case the application is used with a PostScript type
printer, which requires font declarations.)

User
PROCuser_definedragbox()
NOT IN  SKELETON !RunImage.
ONLY USED AS PART OF Elixir_04 for user-defined drag-boxes - 
see Manual Section 2.36 and 3.16.
Defines size/position of required drag-box. (Called only by 
PROCwimp_startuserdragbox().)

User
PROCuser_draggingicon(startwindow%,dragicon%,dragbutton%,startmousex%,startmousey%,mousex%,mousey%,overwindow%,overicon%,dragboxminx%,dragboxminy%,dragboxmaxx%,dragboxmaxy%)
This function is called repeatedly whilst an icon (or user-defined drag-
box) is being dragged.
startwindow% - handle of window in which the dragged icon (or user-
defined drag-box) starts.
dragicon% - handle of dragged icon. (Will be -1 when used with user-
defined drag-box)
dragbutton% - button being used for dragging i.e. 4 for <select-drag> 
or 1 for <adjust-drag>
startmousex%, startmousey% - screen OS coords of mouse pointer at 
start of drag.
mousex%, mousey% - screen OS coords of instantaneous mouse 
pointer position during drag.
overwindow% - handle of window that is currently under pointer. (May 
be same as startwindow%. If currently not over a window, value will 
be -1)
overicon% - handle of icon that is currently under pointer. (If currently 
not over an icon, value will be -1)
dragboxminx%, dragboxminy%, dragboxmaxx%, dragboxmaxy% - 
instantaneous screen OS coords of drag box rectangle.

User
PROCuser_endicondrag(startwindow%,dragicon%,dragbutton%,startmousex%,startmousey%,dragboxminx%,dragboxminy%,dragboxmaxx%,dragboxmaxy%,endwindow%,endicon%,endmousex%,endmousey%)
This function is called when the dragging of an icon (or user-defined 
drag-box) ends.
startwindow% - handle of window in which the dragged icon (or user-
defined drag-box) starts.
dragicon% - handle of dragged icon. (Will be -1 when used with user-
defined drag-box)
dragbutton% - button being used for dragging i.e. 4 for <select-drag> 
or 1 for <adjust-drag>
startmousex%, startmousey% - screen OS coords of mouse pointer at 
start of drag.
dragboxminx%, dragboxminy%, dragboxmaxx%, dragboxmaxy% - 
screen OS coords of drag box rectangle in its end-of-drag position.
endwindow% - handle of window over which the dragging ends. (May 
be same as startwindow%. If not over a window, value will be -1)
endicon% - handle of icon over which the dragging ends. (If not over 
an icon, value will be -1).
endmousex%, endmousey% - screen OS coords of mouse pointer at 
end of drag.

User
PROCuser_enteringwindow(window%)
This function is called when the pointer enters a window.
window% = handle of window.

User
PROCuser_error
A general function providing a convenient location for application-
specific good housekeeping actions which may be desirable when a 
fatal error occurs. This procedure might typically be used to close any 
open files, unset system variables, etc.
It is called only when the global error trap is brought into play - see 
Section 2.8

User
PROCuser_iconise(window%,RETURN text$,RETURN spritename$)
This function is called when iconising action takes place. It allows the 
text and/or sprite used to be customised.
window% = handle of the window where the iconising action has 
occurred.
text$ = text to appear beneath the iconised sprite.
spritename$ = name of the sprite to be used, without the ic_ prefix. A 
sprite with the full name needs to be supplied in the !Sprites/!Sprites22 
files - otherwise the Wimps default sprite will be displayed.
(By default, spritename$ will be set to the application name as declared 
in FNwimp_initialise and text$ will be set to the title of the window 
being iconised. But if there is no title or the title includes the word 
untitled then the application name will be used as default.)
N.B. If spritename$ exceeds 7 characters it will produce an invalid 
iconiser sprite name - and hence the Wimps default iconiser sprite will 
be displayed instead.

User
PROCuser_initialise
A general function called at start-up of any Dr Wimp application. It
provides a convenient location for initialisation actions.
This DEF FN should typically contain the following: Window and menu
loading/definition; declaration of global variables; DIMming of arrays
& data blocks; anything that needs to be done before polling starts.
(Before this user-function is called, the two global variables
'wStartupfile$' and 'wStartupoption$' will, respectively, contain the
path of any file which was double-clicked to start the application and
any start-up options passed - see Manual, Section 2.33.)

User
PROCuser_leavingwindow(window%)
This function is called when the pointer leaves a window.
window% = handle of window.

User
PROCuser_menuopen(menu%,window%,icon%)
Called just before menu (not a sub-menu) is opened.
menu% = handle of menu just about to open.
window%=window which pointer is over (or -1 if not over a window).
icon% = icon which pointer is over (or -1 if not over an icon).

User
PROCuser_menuselection(menu%,item%,font$)
This function is called when the user has chosen a menu item from a 
menu/sub-menu.
menu% = handle of menu/sub-menu. (Will be the font menu handle if 
selection is from a font menu/font sub-menu.)
item% = item number (top item is 1). (Will be 0 if selection is from a 
font menu.)
font$=full period-separated font name.  (Will be null string except if 
selection is from a font menu.)

User
PROCuser_modechange
Called when the mode is about to be changed, but prior to the change 
taking place.
On mode change all open windows are re-opened, so this function is 
used only to set flags - which are then typically responded to in 
PROCwimp_openwindow().

User
PROCuser_mouseclick(window%,icon%,button%,workx%,worky%)
If <select> or <adjust> has been clicked in one of your windows then 
this function is called. (<menu> clicks handled by FNuser_menu)
window% = handle of window clicked over.
icon% = number of the icon clicked on (or -1 if no icon).
button% = which mouse button was pressed.
Eg. 4 for <select>, 1 for <adjust>.
workx%,worky% = work area coordinates of pointer (in window%)
when the mouse button was clicked.

User
PROCuser_null
This is called continuously if you set NULL%=TRUE.
So, if you are writing something like a clock, you would monitor the 
time here and change any windows as required.

User
PROCuser_openwindow(window%,x%,y%,stack%)
If this function is called, then the window whose handle is window% 
has been opened with the top left of the window at x%,y% on the 
screen.
stack% = window handle which window% was opened behind,
or -1 for top of window stack, or -2 for bottom.

User
PROCuser_overmenuarrow(rootmenu%,rootmenuitem%,RETURN nextsubmenu%,nextsubmenunumber%,parentmenuitem%,x%,y%)
Called when pointer moves over arrow-head against a menu item,
on the way to opening a sub-menu.
rootmenu%=handle of root menu of current menu tree.
rootmenuitem%=currently selected menu item in root menu.
nextsubmenu% = handle of submenu (or could be window) about
to be opened.
(Note: RETURN means that submenu handle can be changed here, if 
required.)
nextsubmenunumber%=position of next sub-menu in tree i.e. first sub-
menu is 1, second sub-menu is 2, etc.
parentmenuitem% = menu item number which pointer is currently 
moving over. (Will be same as rootmenuitem% for first sub-menu.)
x%/y% are screen OS-unit positions of pointer when over
arrow-head.

User
PROCuser_print(minx%,miny%,maxx%,maxy%,page%)
Called to draw a page for printing, if PROCwimp_print was
called with user%=1.
minx%,miny% = coordinates of bottom left corner of clipping 
rectangle
on page in paper coordinates.
maxx%,maxy% = coordinates of top right corner of clipping rectangle 
on page in paper coordinates.
page% = number of page to print.

User
PROCuser_printerchange
Called when the printer settings or the current printer has changed so 
you can update your page measurements, current printer name, etc.

User
PROCuser_redraw(window%,minx%,miny%,maxx%,maxy%,printing%,page%)
When this function is called, the Wimp wants you to update/redraw the 
specified box (at least).
The box is in the window whose handle is window% or, if printing, 
then it is in paper coordinates with the origin is at the bottom left of the 
paper.
printing% = TRUE if currently printing, FALSE otherwise.
page% = number of page currently being printed if printing%=TRUE.
minx%,miny% = bottom left co-ordinates of box in screen/paper 
coordinates.
maxx%,maxy% = top right co-ordinates of box in screen/paper 
coordinates.

User
PROCuser_redrawtextline()
NOT IN SKELETON !RunImage.
ONLY USED AS PART OF Elixir_01 for fast scrolling of long text 
lists - see Manual Section 2.36 and 3.16.
Needs to be used with PROCwimp_calcredrawlines().

User
PROCuser_saveicon(window%,RETURN drag%,RETURN write%,RETURN ok%)
This function allows the three save window icons (the one to drag, the 
writable icon for the filename/pathname and the OK button) to have
their icon numbers set, if you want to override the defaults.
Defaults:
  drag% - 0   write% - 1   ok% - 2
window% = handle of save window.

User
PROCuser_seticondragbounds(startwindow%,dragicon%,dragbutton%,startmousex%,startmousey%,RETURN boundsminx%,RETURN boundsminy%,RETURN boundsmaxx%,RETURN boundsmaxy%)
This function is called when a draggable icon (or user-defined drag-
box) is about to be dragged. It allows the drag boundaries to be set.
(If this user-function is left empty, the drag boundaries will be set 
automatically to confine the dragged icon to the visible window that it 
starts in.)
startwindow% - handle of window in which the dragged icon (or user-
defined drag-box) starts.
dragicon% - handle of dragged icon. (Will be -1 when used with user-
defined drag-box)
dragbutton% - button being used for dragging i.e. 4 for <select-drag> 
or 1 for <adjust-drag>
startmousex%, startmousey% - screen OS coords of mouse pointer at 
start of drag.
boundsminx%, boundsminy%, boundsmaxx%, boundsmaxy% - screen 
OS coords of rectangle within which icon (or user-defined drag-box) 
can be dragged.
(Default values are limits of visible window in which drag starts - see 
above.)

User
PROCuser_slidervalue(window%,slider%,pcent%,direction%)
When a slider is being dragged or has just finished being dragged, the 
percentage of the slider is passed to this function.
window% = handle of window with slider in.
icon% = icon number of slider.
pcent% = percentage of slider.
direction% = direction of slider (0 is horizontal, 1 is vertical)

User
PROCuser_spritegraphics()
NOT IN SKELETON !RunImage.
ONLY USED AS PART OF Elixir_03 for constructing a custom 
sprite - see Manual Section 2.36 and 3.16.

User
PROCuser_wimpmessage(messagenumber%,block%,reasoncode%)
Dr Wimp does not use all wimp-messages. This user-function allows 
details of those unused wimp-messages to be passed to the !RunImage, 
if required.
If the global variable UNUSED% is set to TRUE then this user-function 
will be called whenever a wimp-message is received by the application 
but is not used within the DrWimp library. (UNUSED% is set to FALSE 
by default on application start-up.)
messagenumber% = number of the unused wimp-message received.
block%= handle of wimp-message data block, to enable user to get 
further information and respond if necessary.
reasoncode%= reason code passed by wimp (17, 18 or 19 in this case).
(See Section 2.30 of Manual for the list of wimp-messages that are 
currently used within the DrWimp library - and hence would never be 
passed on via this user-function.)

Windows
FNwimp_createwindow(vminx%,vminy%,vmaxx%,vmaxy%,wminx%,wminy%,wmaxx%,wmaxy%,flags%,colourflags%,button%,title$,titleflags%,titlefont%,maxind%,sarea%)
Used for creating a window within a program. The window handle is 
returned.
vminx%,vminy%,vmaxx%,vmaxy% = limits of opening visible 
window in OS screen units.
wminx%,wminy%,wmaxx%,wmaxy% = limits of work area of 
window
in work area OS coordinates.
flags% = number representing window flags.
colourflags% = number representing the colours of 7 items of window 
furniture, each in the range 0-15.
button% = work area button type.
title$ = title of window.
titleflags%= number representing titlebar flags.
titlefont%=font handle to use for title font, if relevant.
maxind% = maximum size of title if indirected.
sarea% = handle of sprite area, or 0 to use Wimp sprite area.
(See Section 2.23 of Manual for details of flags%, colourflags%, 
titleflags%, button%, etc.)

Windows
FNwimp_getscroll(window%,side%)
Returns the current scroll position (in OS units) of the window, in the 
given direction.
window% = handle of window.
If side%=0 then the horizontal scroll position will be returned.
If side%=1 then the vertical scroll position will be returned. (Note that 
vertical scroll values are normally negative.)

Windows
FNwimp_getwindowtitle(window%)
Returns a string containing the window title.
window% = handle of window.

Windows
FNwimp_getwindowvisiblescreen(window%,side%,end%)
Returns the screen OS coordinates of the edges of the current visible 
area of the window.
window% = handle of window.
If side%=0 then a x coordinate will be returned.
If side%=1 then a y coordinate will be returned.
If end%=0, then the minimum coordinate will be returned, ie the left
or bottom of the visible area depending on the value of side%.
If end%=1, then the maximum coordinate will be returned, ie the right
or top of the visible area depending on the value of side%.
(Use FNwimp_getwindowvisiblesize to get current visible size.)

Windows
FNwimp_getwindowvisiblesize(window%,side%)
Returns the dimension required, in OS units, of the currently displayed 
size of the specified window i.e. (If window is not open then size that 
would be displayed is returned.)
If side% = 0 returns width. If side% = 1 returns height.
(Use FNwimp_getwindowworksize to get defined work area size. Use 
FNwimp_getwindowvisiblework or FNwimp_getwindowvisiblescreen 
to get visible window edge coordinates.)

Windows
FNwimp_getwindowvisiblework(window%,side%,end%)
Returns the work area OS coordinates of the edges of the current 
visible area of the window. i.e. returns take current scroll values into 
account.
window% = handle of window.
If side%=0 then a x coordinate will be returned.
If side%=1 then a y coordinate will be returned.
If end%=0, then the minimum coordinate will be returned, ie the left
or bottom of the visible area depending on the value of side%.
If end%=1, then the maximum coordinate will be returned, ie the right
or top of the visible area depending on the value of side%.

Windows
FNwimp_getwindowworksize(window%,side%)
Returns the size, in OS units, of a windows defined work area - 
irrespective of its current visible area.
window% = handle of window.
If side%=0 the width of the work area is returned.
If side%=1 the height of the work area is returned.
(Use FNwimp_getwindowvisiblesize to get current visible size.)

Windows
FNwimp_iswindowopen(window%)
Returns TRUE (-1) if the window is open,
otherwise returns FALSE (0).
window% = handle of window.
(Note difference from usual Dr Wimp practice of returning 1 or 0)

Windows
FNwimp_loadwindow(path$,window$,spritearea%)
Loads in a window from a templates file and returns a
handle for the window.
path$ = full pathname to templates file.
window$ = name of window in templates file.
spritearea% = 0 if sprites used are from wimp pool (RMA). Otherwise 
spritearea% is a handle to a user sprite area.

Windows
PROCwimp_banner(window%,delay%)
Opens window in the centre of the screen for specified
time before closing it.
window% = handle of window to open.
delay% = number of seconds to keep window on screen.

Windows
PROCwimp_calcredrawlines()
NOT IN DrWimp LIBRARY.
ONLY USED AS PART OF Elixir_01 for fast scrolling of long text 
lists - see Manual Section 2.36 and 3.16.
Needs to be used with PROCuser_redrawtextline()

Windows
PROCwimp_closewindow(window%)
Closes a window (removes it from the screen).
window% = handle of window to close.

Windows
PROCwimp_deletewindow(window%)
Deletes a window definition, closing it if it is open. All the memory
apart from the indirected memory is reclaimed and the window handle
becomes invalid.
window% = handle of window to delete.

Windows
PROCwimp_getandsetwindowsettings()
NOT IN DrWimp LIBRARY.
ONLY USED AS PART OF Elixir_06 for retrieving and setting 
window position/size/scrolls - see Manual Section 2.36 and 3.16.
Used in conjunction with PROCwimp_savewindowsettings()

Windows
PROCwimp_groupwindow()
NOT IN DrWimp LIBRARY.
ONLY USED AS PART OF Elixir_07 for operations on a group of 
windows - see Manual Section 2.36 and 3.16.

Windows
PROCwimp_openwindow(window%,centre%,stack%)
Opens a window on the screen.
window% = handle of window to open.
If centre% = 0 opens window where it was last left on the screen, or if 
it hasnt been opened before, then where it is positioned in the template 
file.
If centre% = 1 opens the window centred on the screen
(mode independent).
If centre% = 2 opens the window centred on the pointer.
stack% = window handle to open behind, or -1 for top of window 
stack,  -2 for bottom, -3 for current stack position, or -4 for behind 
backdrop i.e. hidden.

Windows
PROCwimp_openwindowat(window%,x%,y%,stack%)
Opens a window on the screen so the top left of the
window is at co-ordinates x%,y% - in OS units.
window% = handle of window to open.
stack% = window handle to open behind, or -1 for top of window 
stack,  -2 for bottom, -3 for current stack position, or -4 for behind 
backdrop i.e. hidden.

Windows
PROCwimp_putwindowtitle(window%,title$)
Changes the window title to title$
window% = handle of window.

Windows
PROCwimp_redrawwindow(window%)
Causes the complete window whose handle is window% to be 
redrawn/updated.

Windows
PROCwimp_resizewindow(window%,width%,height%)
Resizes the work area of the specified window to the specified width 
and height, which are in OS co-ordinates.
(The displayed size of the window will not change unless the new 
work area size is less than the displayed size.)

Windows
PROCwimp_resizewindowvisible(window%,width%,height%)
Resizes the visible area of the window to the specified width and 
height, which are in OS co-ordinates.
Note: If the window is wholly on the screen before re-sizing then it 
will be kept wholly on the screen after re-sizing i.e. by scrolling, if 
necessary.

Windows
PROCwimp_savewindowsettings()
NOT IN DrWimp LIBRARY.
ONLY USED AS PART OF Elixir_06 for saving window position/
size/scrolls - see Manual Section 2.36 and 3.16.
Used in conjunction with PROCwimp_getandsetwindowsettings()

Windows
PROCwimp_scroll(window%,side%,direction%,distance%)
Causes the window automatically to scroll vertically or horizontally a 
given distance in a given direction.
window% = handle of window to be scrolled.
If side%=0 then a horizontal scroll will be done.
If side%=1 then a vertical scroll will be done.
If direction%=0 then the scroll will be left or down depending on the
value of side%.
If direction%=1 then the scroll will be right or up depending on the
value of side%.
distance% = the amount to scroll the window, in OS units.
(Window does not need to be open to effect scroll.)

Windows
PROCwimp_scrollto(window%,side%,scrollpos%)
Causes the window automatically to scroll vertically or horizontally to 
a given position.
window% = handle of window to be scrolled.
If side%=0 then a horizontal scroll will be done.
If side%=1 then a vertical scroll will be done.
scrollpos% = the scroll position required, in OS units. (Note that 
vertical scroll values are normally negative.)
(Window does not need to be open to effect scroll.)

Windows
PROCwimp_updatewindow(window%,minx%,miny%,maxx%,maxy%)
This procedure tells the Wimp to redraw only the part of a window 
which is defined by the given coordinates.
This greatly speeds up redraws where lots of graphics are used and/or 
the window needs regular updating as it avoids redrawing the whole 
window.
(Deleted sentence.)
window% = handle of window to be updated.
minx%, miny% = bottom left of box to be redrawn in work area
coordinates.
maxx%, maxy% = top right of box to be redrawn in work area 
coordinates.
(This function can also be used to update any area of the screen, by 
setting window% to -1 and then using screen OS coordinates for 
minx%, miny% etc.)

Message files
FNwimp_createmessagemenu(messagefilehandle%,token$,title$,size%)
Creates a menu automatically from a Message file. Returns menu 
handle.
messagefilehandle%= handle of messages file to be used (as returned 
by FNwimp_initmessages/FNwimp_reinitmessages).
token$ = token for menu. Eg: if token$=MMenu then the token 
MMenuT will specify the title, MMenu1 the first item, MMenu2 
the second etc.
If title$= then the title defined in the message file will be used, 
otherwise title$ will override whatever is defined in the messages file.
If size%>number of items then the menu is dynamic, ie.
the items can subsequently be increased up to size%. (If size%=0 the 
menu will automatically be created to accomodate just the number of 
items contained in the messages file.)
(All menu text is created as indirected.)
(Also shown in Menu section.)

Message files
FNwimp_getnumberofmessages(messagefilehandle%,token$)
Returns the number of items with the given token in the given message 
file.
messagefilehandle%= handle of messages file (returned from 
FNwimp_initmessages/FNwimp_reinitmessages above).
token$=token of interest.

Message files
FNwimp_initmessages(path$)
Reserves special blocks of memory and sets up a Message file ready 
for use.
Returns a message handle for file.
path$ = full pathname of messages file to use.
Gives fatal error if messages file cannot be found.

Message files
FNwimp_messlookup(messagefilehandle%,token$,a$,b$)
Returns the string in a messages file for the token token$, but any 
parameters %0 and %1 in the returned string are replaced with a$ 
and b$, respectively, before returning. (See Manual Section 2.9)
messagefilehandle%= handle of required messages file (returned from 
FNwimp_initmessages/FNwimp_reinitmessages above).
Note that b$ is only used if a$ is not a null string i.e. if you only want 1 
parameter to be substituted it must be a$ for %0.

Message files
FNwimp_reinitmessages(messagefilehandle%,path$)
If, after it has been initiated (with FNwimp_initmessages, above), a 
messages file is altered or a different messages file is now to be used, 
this function allows the changed/new file to be initiated in place of the 
previous file. Re-initiation can be carried out as many times as 
required.
Returns a message handle for the changed/new file - which may be 
different from the previous handle. (It would be normal to assign the 
return to the previous handle-variable - see Section 2.9)
messagefilehandle%= handle of previous messages file.
path$ = full pathname of new/changed messages file to use.
Gives fatal error if messages file cannot be found.

Message files
PROCwimp_recreatemessagemenu(menu%,messagefilehandle%,token$,title$)
Rebuilds a menu from a Message file.
menu% = handle of menu to rebuild
messagefilehandle%= handle of messages file to be used (as returned 
by FNwimp_initmessages/FNwimp_reinitmessages).
token$ = token for menu items. (See FNwimp_createmessagemenu()  
or Manual Section 2.18)
If title$= then the title defined in the message file will be used, 
otherwise title$ will override whatever is defined in the messages file.
(All menu text is created as indirected.)
(Also shown in Menu section.)

Icons
FNwimp_createicon(window%,wminx%,wminy%,wmaxx%,wmaxy%,flags%,esg%,button%,fcol%,bcol%,font%,text$,sprname$,sarea%,maxind%,valid$)
Creates an icon and returns its handle (icon number).
window% = handle of window to create icon in.
wminx%,wminy%,wmaxx%,wmaxy% are bottom left and top
right corners of icon in work area OS coordinates.
flags% = number representing flags for icon.
esg% = esg number of icon. 0 for icons which arent radio buttons.
button% = button type of icon.
fcol%,bcol% = foreground and background colours of icons (if not 
using outline font) in desktop colours, so both in the range 0-15.
font% = handle of outline font. 0 if not using a font.
text$ = text for icon.
sprname$ = sprite name for icon.
sarea% = handle of sprite area, or 0 to use Wimp sprite area.
maxind% = if icon is indirected then maximum size.
valid$ = icon validation string.
(See Section 2.23 of Manual for details of flags%, button%, etc.)

Icons
FNwimp_getcaretposition(choice%)
Returns information about current caret location/position.
If choice% = 0 handle of window with caret is returned.
If choice% = 1 handle of icon with caret is returned.
If choice% = 2 work area OS-unit x position (in window carrying 
caret) is returned.
If choice% = 3 work area OS-unit y position (in window carrying 
caret) is returned.
If choice% = 4 the position of the caret (the index) within the text of 
a writable icon is returned.
Return is -1 in cases where the caret is not present.

Icons
FNwimp_geticonbit(window%,icon%,bit%)
Returns state of a specific bit of an icons icon flags.
Return is 1 if bit is set, or 0 if unset.
window% = handle of window containing icon.
icon% = number of icon.
bit% = icon flags bit to test (0-31).

Icons
FNwimp_geticonenable(window%,icon%)
Returns 1 if the icon icon% in the window whose handle
is window% is enabled. Returns 0 if it is disabled(greyed out).

Icons
FNwimp_geticonposition(window%,icon%,coord%)
Returns x/y work area OS-unit coordinates of icon sides.
window%= window handle
icon%- icon handle
If coord% = 0 minimum x coord of icon is returned.
If coord% = 1 minimum y coord of icon is returned.
If coord% = 2 maximum x coord of icon is returned.
If coord% = 3 maximum y coord of icon is returned.

Icons
FNwimp_geticonselect(window%,icon%)
Returns 1 if the icon is selected, or 0 if it is not selected.
Useful for reading the state of radio and option icons.
window% = handle of window containing icon.
icon% = number of icon.

Icons
FNwimp_geticonsize(window%,icon%,side%)
Returns the width/height of an icon, in OS units.
window%= window handle
icon%- icon handle
If side% = 0 width of icon is returned.
If side% = 1 height of icon is returned.

Icons
FNwimp_geticontext(window%,icon%)
Returns a string containing the text from the icon.
window% = handle of window containing icon.
icon% = icon number.

Icons
FNwimp_getsliderpcent(window%,icon%)
Returns the percentage of the slider. If the icon is not
a slider then 0 is returned.
The number returned is a floating point number in the
range 0-100.
window% = handle of window with slider in.
icon% = icon number of slider.

Icons
FNwimp_iconbar(spritename$,text$,maxlen%,pos%)
Creates and places an icon on the iconbar.
spritename$ = name of sprite to put on iconbar.
text$ = text to put underneath the icon.
If text$ =  then sprite-only icon will be created and maxlen% will 
be ignored.
If text$ is any other string then an indirected text-plus-sprite icon will 
be created, with space available for a maximum of maxlen% characters 
(+terminator). (If maxlen% is less than length of text$ then maxlen% 
will be made equal to length of text$.)
If pos% = 1 then the icon will appear on the right of iconbar.
If pos% = 0 then it will appear on the left.
Returns the iconbar window handle (i.e. always -2).

Icons
PROCwimp_colouricon(window%,icon%,colour%,background%)
Sets colour of text/background/border in an icon to colour%.
window% = handle of window containing icon.
icon% = number of icon.
colour% = colour in range 0-15.
background% = 0 to change text (and border, if present) colour.
background% = 1 to change background colour (if icon is filled).
(See Section 2.33 for conditions needed for colour change in icons 
using outline fonts.)

Icons
PROCwimp_copydraggedicon()
NOT IN DrWimp LIBRARY.
ONLY USED AS PART OF Elixir_02 for copying a dragged icon - 
see Manual Section 2.36 and 3.16.
Needs to be used with PROCuser_endicondrag().

Icons
PROCwimp_deleteicon(window%,icon%,redraw%)
Deletes an icon definition from a window.
The icon will not disappear until the next redraw - which can be forced 
using third parameter.
window% = handle of window containing the icon.
icon% = icon number of icon to delete.
If redraw% is 1 then the window is redrawn.
If redraw% is 0 then it isnt and the icon wont disappear immediately.

Icons
PROCwimp_group(handle%,type%,string$,state%)
NOT IN DrWimp LIBRARY.
ONLY USED AS PART OF Elixir_07 - see Manual Section 2.36 and 
3.16.

Icons
PROCwimp_iconbarsprite(spritename$)
Changes the sprite used for the iconbar icon.
spritename$= name of required sprite, which must already be in Wimp 
sprite pool.

Icons
PROCwimp_iconbit(window%,icon%,bit%,state%)
Ensures a specific bit of an icons icon flags is set to the
specified state - or toggled from one state to the other.
window% = handle of window containing icon.
icon% = number of icon.
bit% = number of icon flags bit to set/unset or toggle.
If state%=0 the specified bit will be set.
If state%=1 the specified bit will be unset.
If state%=2 the specified bit will be changed from its existing state to 
the other.
Note that if bit% is set to 23, no action will take place. Use 
PROCwimp_iconhide() instead.

Icons
PROCwimp_iconenable(window%,icon%,state%)
Allows an icon to be enabled or disabled (greyed out) or toggled 
from one state to the other.
window% = handle of window containing icon.
icon% = number of icon.
If state%=0 icon will be disabled (greyed out) and will not respond to 
mouse clicks.
If state%=1 icon will be enabled.
If state%=2 icon will be changed from its existing state to the other.

Icons
PROCwimp_iconhide(window%,icon%,state%)
Hides/shows an existing icon - and toggles between the two states.
window% = handle of window containing the icon.
icon% = icon number of icon to hide/show or toggle.
If state%=0 the icon is made to appear (show).
If state%=1 the icon is made to disappear (hide).
If state%=2 the icon is toggled between hide/show.

Icons
PROCwimp_iconselect(window%,icon%,state%)
Allows an icon to be selected or deselected or toggled from one state to 
the other.
Useful for selecting/deselecting/toggling radio and option icons.
window% = handle of window containing icon.
icon% = number of icon.
If state%=0 icon will be de-selected.
If state%=1 icon will be selected.
If state%=2 icon will be changed from its existing state to the other.

Icons
PROCwimp_losecaret
Removes the caret from the icon it is in - and removes input focus
from the window.

Icons
PROCwimp_moveicon(window%,icon%,minx%,miny%)
Moves an existing icon (without changing its size).
window%= window handle
icon%- icon handle
minx%=required new position of left edge of icon in work OS units.
miny%=required new position of bottom edge of icon in work OS units 
(probably a negative value).

Icons
PROCwimp_nudgeinteger()
NOT IN DrWimp LIBRARY.
PART OF Elixir_05 providing optional wimp-functions for managing 
nudger/bump icons - see Manual Section 2.36 and 3.16.
For managing a pair of nudger/bump icons using integer numbers.. 
(Intended to be used within PROCuser_mouseclick().)

Icons
PROCwimp_nudgereal()
NOT IN DrWimp LIBRARY.
PART OF Elixir_05 providing optional wimp-functions for managing 
nudger/bump icons - see Manual Section 2.36 and 3.16.
For managing a pair of nudger/bump icons using real numbers.. 
(Intended to be used within PROCuser_mouseclick().)

Icons
PROCwimp_ploticon(wminx%,wminy%,wmaxx%,wmaxy%,flags%,esg%,button%,fcol%,bcol%,font%,text$,sprname$,sarea%,maxind%,valid$)
Defines and plots an icon directly into a redraw window. (The plotting 
will be into the window currently being redrawn.)
wminx%,wminy%,wmaxx%,wmaxy% are bottom left and top
right corners of icon in work area OS coordinates.
flags% = number representing flags for icon.
esg% = esg number of icon. 0 for icons which arent radio buttons.
button% = button type of icon.
fcol%,bcol% = foreground and background colours of icons (if not 
using outline font) in desktop colours, so both in the range 0-15.
font% = handle of outline font. 0 if not using a font.
text$ = text for icon.
sprname$ = sprite name for icon.
sarea% = handle of sprite area, or 0 to use Wimp sprite area.
maxind% = if icon is indirected then maximum size.
valid$ = icon validation string.
(See Section 2.23 of Manual for details of flags%, button%, etc.)

Icons
PROCwimp_putcaret(window%,icon%,index%)
Puts the caret in the icon and gives window input focus. If there is text 
in the icon the caret position can be placed more precisely using 
index%
window% =handle of window containing icon.
icon% = number of icon (or set to -1 if caret not wanted in icon)
index% = required position of caret within icon text. (If index% is set 
to -1 or to a value greater than the length of the current text then the 
caret will be placed at the right-hand end of the text.)

Icons
PROCwimp_puticonbartext(text$)
If the iconbar icon has indirected text underneath it then it is
replaced by text$. (The length of text$ must not exceed the iconbars 
defined max. indirected text length.)

Icons
PROCwimp_puticonfont(window%,icon%,fonthandle%)
Changes font of icon text to the font and size specified by 
fonthandle%. (Icon must have been defined as using outline fonts.)
window% = handle of window containing icon.
icon% = number of icon.
fonthandle% = handle of required font.
Note: The caret position (if present) will be preserved.

Icons
PROCwimp_puticontext(window%,icon%,text$)
If the icon is indirected then the text in the icon is replaced with text$.
(For an indirected sprite-only icon, the same function is used to 
change the sprite; in which case text$ is the sprite-name of the required 
new sprite - which must already be in the Wimp sprite pool.)
If the icon is not indirected then an error is caused.
window% = handle of window containing icon.
icon% = number of icon.
text$ = the required new text (or sprite-name). If text$ exceeds the 
maximum indirected length specified in the icon definition it will be 
truncated - which could lead to a sprite not found error with a sprite-
only icon..
Note: The caret position (if present) will be preserved as far as is 
possible. If the caret is at the right-hand end of the current text, or if the 
length of the new text is shorter than the current caret index, then the 
caret will be placed at the right-hand end of the new text.

Icons
PROCwimp_putsliderpcent(window%,icon%,pcent)
Sets the percentage of the slider. If the icon is not a
slider then this is ignored.
window% = handle of window with slider in.
icon% = icon number of slider.
pcent = percentage to set. Can be integer or floating point number,
but must be in the range 0-100.

Icons
PROCwimp_resizeicon(window%,icon%,minx%,miny%,maxx%,maxy%)
Resizes (and/or moves) an existing icon.
window%= window handle
icon%- icon handle
minx%=required new position of left edge of icon in work OS units.
miny%=required new position of bottom edge of icon in work OS units 
(probably a negative value)
maxx%=required new position of right edge of icon in work OS units.
maxy%=required new position of top edge of icon in work OS units 
(probably a negative value).

Menus
FNwimp_createfontmenu
Creates a complete menu structure of the currently available (active) 
fonts.
A menu handle is returned.
(The many wimp-functions available to manipulate individual menu 
items cannot be applied to font menus.)

Menus
FNwimp_createmenu(menu$,size%)
Creates a menu structure from the string menu$. Returns menu
handle.
For more information on menu$ see the manual.
If size%>number of items then the menu is dynamic, ie.
the number of menu items can be increased up to size%.
(If size%=0 the menu will automatically be created to accomodate just 
the number of items contained in menu$.)
(All menu text is created as indirected.)

Menus
FNwimp_createmenuarray(array$(),size%)
Creates a menu from the array supplied. Returns menu handle.
Each item of the menu is in a separate element of the array.
e.g. array$(1)=Info.
The first element, array$(0), is the menu title, and the last
must be the string END.
array$() = array holding item strings.
size% = maximum number of elements to allocate room for
(doesnt have to be the current number). (If size%=0 the menu will 
automatically be created to accomodate just the number of items 
contained in the array.)
Returns a handle to the menu.
(All menu text is created as indirected.)

Menus
FNwimp_createmessagemenu(messagefilehandle%,token$,title$,size%)
Creates a menu automatically from a Message file. Returns menu 
handle.
messagefilehandle%= handle of messages file to be used (as returned 
by FNwimp_initmessages/FNwimp_reinitmessages).
token$ = token for menu. Eg: if token$=MMenu then the token 
MMenuT will specify the title, MMenu1 the first item, MMenu2 
the second etc.
If title$= then the title defined in the message file will be used, 
otherwise title$ will override whatever is defined in the messages file.
If size%>number of items then the menu is dynamic, ie. the items can 
subsequently be increased up to size%. (If size%=0 the menu will 
automatically be created to accomodate just the number of items 
contained in the messages file.)
(All menu text is created as indirected.)
(Also shown in Messages section.)

Menus
FNwimp_findmenuticksnumber(menu%)
NOT IN DrWimp LIBRARY.
ONLY USED AS PART OF Elixir_07 - see Manual Section 2.36 and 
3.16.

Menus
FNwimp_findmenuticksstring(menu%)
NOT IN DrWimp LIBRARY.
ONLY USED AS PART OF Elixir_07 - see Manual Section 2.36 and 
3.16.

Menus
FNwimp_getmenudottedline(menu%,item%)
Checks whether or not a menu item has a dotted line beneath it.
menu% = handle of menu.
item% = number of item (top item is 1).
Returns a 1 if the menu item has a dooted line beneath it.
Returns a 0 if the menu item does not have a dooted line beneath it.

Menus
FNwimp_getmenuenable(menu%,item%)
Checks whether a menu item is enabled or disabled (greyed out).
menu% = handle of menu.
item% = item number (top item is 1).
Returns 1 if menu item is enabled.
Returns 0 if menu item is disabled (greyed out).

Menus
FNwimp_getmenuitem(menu%,menuitemtext$)
Returns the menu item number (top=1) of the menu item whose text 
matches menuitemtext$.
menu% = handle of menu to search
menuitemtext$ = text string to match (not case sensitive)
Returns 0 if no match found.

Menus
FNwimp_getmenutext(menu%,item%)
Returns a string containing the text of the menu item in position 
item%.
menu% = handle of menu.
item% = number of item (top item is 1).

Menus
FNwimp_getmenutick(menu%,item%)
Returns 1 if the specified menu item is ticked, or returns 0 if it isnt.
menu% = handle of menu.
item% = number of item (top item is 1).

Menus
FNwimp_getmenutitle(menu%)
Returns a string containing the title of the menu.
menu% = handle of menu.

Menus
FNwimp_menumaxsize(menu%)
Returns the maximum number of entries (items) allowed in the menu, 
as determined on creation.
menu% = handle of menu.

Menus
FNwimp_menusize(menu%)
Returns the current number of entries (items) in the menu.
menu% = handle of menu.

Menus
FNwimp_recreatefontmenu(fontmenu%)
Re-creates a complete menu structure of the currently available (active) 
fonts, for a previously created font menu.
fontmenu% = handle of previously created font menu.
The menu handle is returned (which may be a new value).
(The many wimp-functions available to manipulate individual menu 
items cannot be applied to font menus.)

Menus
PROCwimp_attachsubmenu(menu%,item%,submenu%)
Attaches a submenu to a menu item.
menu% = handle of menu.
item% = item number (top item is 1).
submenu% = handle of submenu or window handle.

Menus
PROCwimp_group(handle%,type%,string$,state%)
NOT IN DrWimp LIBRARY.
ONLY USED AS PART OF Elixir_07 - see Manual Section 2.36 and 
3.16.

Menus
PROCwimp_menuclose
Closes the currently active menu.
Used if menu closure is required other than by normal (automatic) 
wimp process.

Menus
PROCwimp_menudottedline(menu%,item%,on%)
Adds/removes a dotted line to the menu below the item.
menu% = handle of menu.
item% = number of item (top item is 1).
If on%=1 dotted line is added; if on%=0 dotted line is removed.

Menus
PROCwimp_menuenable(menu%,item%,state%)
Allows a menu item to be enabled/disabled(greyed out) or to be 
toggled between these two states.
menu% = handle of menu.
item% = item number (top item is 1).
If state% =0, the menu item will be disabled (greyed out) and will not 
respond to mouse clicks.
If state% =1, the menu item will be enabled.
If state% =2, the menu item will be toggled from its existing state to 
the other.

Menus
PROCwimp_menuitemcolour(menu%,item%,colour%,background%)
Changes the text colour of the menu item specified.
menu% = handle of menu.
item% = item number (top item is 1).
colour% = colour required (standard Wimp colours in range 0-15)
(Colours 8, 10, 11, 13, 14 and 15 are best for visibility)
If background% = 1 then the background colour is changed.
If background% = 0 then the foreground colour is changed

Menus
PROCwimp_menupopup(menu%,pos%,x%,y%)
Displays the menu (or window) whose handle is menu%.
If pos%=0 then menu is displayed with its top left corner at screen 
coordinates x%,y%.
If pos%=1 then menu will be positioned as for an iconbar menu, as if
iconbar icon is at screen coordinate x% i.e. with left edge to the left of 
x% and at 96 OS units above the bottom of screen. (y% value is needed 
but is ignored.)
If pos%=2 then menu will be centred on screen (x%/y% values ignored 
but must be present)
If pos%=3 then menu will be opened slightly to the right of (and 
slightly above) pointer position - optimised to butt onto right edge of 
ptr_menu shape.
If pos%=4 then menu will be opened butting up against the right edge 
of  the icon over which the mouse was clicked. (Designed to be used 
with pop-up menu icons.)
Can also be used to open windows that close when the mouse is 
clicked elsewhere.

Menus
PROCwimp_menutick(menu%,item%,state%)
This function puts/removes a tick against the specified menu item - or 
toggles between these two states.
menu% = handle of menu.
item% = item number (top item is 1).
If state% = 0, any tick against the item will be removed.
If state% =1, a tick will be put against the item.
If state%=2, the tick will be toggled from its existing state to the other.

Menus
PROCwimp_menuwrite(menu%,item%,maxlength%,border%,valid$)
Makes the menu item writable.
menu% = handle of menu.
item% = number of item (top item is 1)
maxlength% = maximum length of text allowed to be entered.
If border%=1 a border will be placed around writable item.
If border%=0 no border will appear.
valid$ = validation string. (A default validation string 
Pptr_write;Knar; will always be applied - to which valid$ will be 
suffixed. See Section 2.5) 
(Any text already in the item will be re-inserted into the new writable 
item. If the existing text is longer than maxlength% then maxlength% 
will be increased accordingly.)

Menus
PROCwimp_putmenuitem(menu%,item%,item$)
Adds a new menu item at position item%. Any items below will be 
shuffled down. (menu% must have been already created with sufficient 
capacity to add extra items - see manual Section 2.18)
menu% = handle of menu.
item% = position of new item% (1 is first item) If item% is bigger than 
the current number of items+1, then it will be added to the bottom.
item$ = text of new item.

Menus
PROCwimp_putmenutext(menu%,item%,text$)
Replaces menu item text with text$.
menu% = handle of menu.
item% = number of item (Top item is 1).

Menus
PROCwimp_putmenutitle(menu%,title$)
Changes the title of the menu.
More than 11 characters can be used.
menu% = handle of menu.
title$ = new title.

Menus
PROCwimp_recreatemenu(menu%,menu$)
Rebuilds a menu using the string menu$.
More items can be included than the first time as long as you dont go
over the pre-defined limit.
menu% = handle of menu to rebuild.

Menus
PROCwimp_recreatemenuarray(menu%,array$())
Rebuilds a menu using the items in the array.
The first array item (array$(0)) is the menu title, and the
last has to be the string END.
Things like ticks and dotted lines are removed.
menu% = handle of menu to rebuild
array$() = array to get items from.

Menus
PROCwimp_recreatemessagemenu(menu%,messagefilehandle%,token$,title$)
Rebuilds a menu from a Message file.
menu% = handle of menu to rebuild
messagefilehandle%= handle of messages file to be used (as returned 
by FNwimp_initmessages/FNwimp_reinitmessages).
token$ = token for menu items. (See FNwimp_createmessagemenu()  
or Manual Section 2.18)
If title$= then the title defined in the message file will be used, 
otherwise title$ will override whatever is defined in the messages file.
(All menu text is created as indirected.)
(Also shown in Messages section.)

Menus
PROCwimp_removemenuitem(menu%,item%)
Removes the item from the menu. Any items below are
shuffled up. If there is only one item on the menu, then
it cannot be removed.
menu% = handle of menu.
item% = number of item to remove.

Sprites
FNwimp_buildsprite()
NOT IN DrWimp LIBRARY.
ONLY USED AS PART OF Elixir_03 for constructing a custom 
sprite - see Manual Section 2.36 and 3.16.

Sprites
FNwimp_countsprites(spritearea%)
Returns the number of sprites in a sprite area.
spritearea% = handle of sprite area.

Sprites
FNwimp_getspritename(spritearea%,spritenumber%)
Returns the name of a sprite in a sprite area, which has been loaded by 
FNwimp_loadsprites.
spritearea% = handle of sprite area.
spritenumber% = number of sprite in sprite area. First sprite is 1.

Sprites
FNwimp_getspritesize(spritename$,spritearea%,side%)
Returns the width/height (in OS units) of a sprite in a sprite area, which 
has been loaded by FNwimp_loadsprites or is in the Wimp sprite pool.
spritename$ = name of sprite.
spritearea% = handle of sprite area containing sprite (0 means in sprite 
pool).
If side%=0 then returns width of sprite.
If side%=1 then returns height of sprite.

Sprites
FNwimp_loadsprites(filepath$,address%,warning%)
Loads a spritefile into a block of memory at address%.
The memory block must have already been created after using 
FNwimp_measurefile().
Returns the address at which to load the next file (if any) into the same 
memory block.
filepath$ = full pathname of spritefile.
If warning% is not 0 then a non-fatal error will be given if filepath$ 
cannot be found.

Sprites
FNwimp_measurefile(filepath$,warning%)
Returns the size in bytes needed to store a file in memory prior to using 
FNwimp_loadfile(), FNwimp_loaddfile(), FNwimp_loadsprites() or 
FNwimp_loadjpegfile().
Returns -1 if filepath$ not found.
Always use this as opposed to any other form of measurement.
filepath$ = full pathname of spritefile.
warning% - if not 0, a non-fatal warning will be given if filepath$ 
cannot be found.
(This function is also listed in in other sections)

Sprites
PROCwimp_rendersprite(spritename$,spritearea%,bx%,by%,minx%,miny%,maxx%,maxy%,xscale,yscale)
Renders (plots) a sprite on the screen at the specified screen 
coordinates, using the clipping rectangle.
spritename$ = name of sprite to plot.
spritearea% = 0 if sprite is in Wimp sprite pool, or
spritearea% = handle of sprite area containing sprite, which has been 
loaded by FNwimp_loadsprites.
bx%,by% = screen coordinates (OS units) at which to put bottom left
corner of sprite.
minx%,miny% = coordinates of bottom left corner of clipping 
rectangle in screen coordinates (OS units).
maxx%,maxy% = coordinates of top right corner of clipping rectangle 
in screen coordinates (OS units).
xscale,yscale = respectively, required scaling factors in x and y 
directions. Values <1 reduce displayed size; values >1 increase size.
(1 meaning no change in size).

Sprites
PROCwimp_renderwindowsprite(window%,spritename$,spritearea%,bx%,by%,minx%,miny%,maxx%,maxy%,xscale,yscale)
Renders (plots) a sprite in a window at specified work area 
coordinates. The window must have its auto-redraw flag unset.
window% = handle of window to render sprite in.
spritename$ = name of sprite to render.
spritearea% = 0 if sprite is in Wimp sprite pool, or
spritearea% = handle of sprite area containing sprite, which has been 
loaded by FNwimp_loadsprites.
bx%,by% = work area coordinates (OS units) of where to put bottom 
left of sprite.
minx%,miny% = coordinates of bottom left corner of clipping
rectangle in screen coordinates (OS units).
maxx%,maxy% = coordinates of top right corner of clipping rectangle 
in screen coordinates (OS units).
(Clipping rectangle is the same as that passed to PROCuser_redraw.)
xscale,yscale = respectively, required scaling factors in x and y 
directions. Values <1 reduce displayed size; values >1 increase size.
(1 meaning no change in size).

Sprites
PROCwimp_savesprites(savepath$,spritearea%)
Saves the contents of a sprite area to a file. The sprites must have been 
loaded into the spritearea by FNwimp_loadsprites.
savepath$ = full pathname of file to be saved.
spritearea% = handle of sprite area containing sprites.

Sprites
PROCwimp_setdrawspritegraphiccolour()
NOT IN DrWimp LIBRARY.
ONLY USED AS PART OF Elixir_03 for constructing a custom 
sprite - see Manual Section 2.36 and 3.16.
Intended for use in PROCuser_spritegraphics().

Sprites
PROCwimp_writedrawspritetext()
NOT IN DrWimp LIBRARY.
ONLY USED AS PART OF Elixir_03 for constructing a custom 
sprite - see Manual Section 2.36 and 3.16.
Intended for use in PROCuser_spritegraphics().

Pointer
FNwimp_getpointerposition(side%)
Returns the screen coordinates of the pointer, in OS units.
If side%=0 then the x coordinate is returned.
If side%=1 then the y coordinate is returned.

Pointer
PROCwimp_bindpointer(window%)
Binds the mouse pointer within the given window in the same manner 
as a standard error message. It should be used when the window the 
mouse is to be bound in is opened.
The pointer is also placed inside the bound area if it was outside it.
Useful if your application uses its own error or message windows 
which you want to force the user to respond to.
As the pointer cannot reach any of the window control icons, your 
window should have a title bar at most.

Pointer
PROCwimp_pointer(pointer%,spritearea%,pointer$)
Changes mouse pointer between the default (number 1) and
the user defined pointer (number 2).
If pointer% = 0 default pointer is used.
If pointer% = 1 user defined pointer is used.
If spritearea% = 0 Wimp sprite pool is used, otherwise spritearea% is a 
handle to a sprite area.
pointer$ = sprite name of pointer.

Pointer
PROCwimp_releasepointer
Releases the mouse pointer to roam over the whole screen after using 
PROCwimp_bindpointer. It should be used when the window the 
mouse is bound in is closed.

Pointer
PROCwimp_setpointerposition(x%,y%)
Moves the pointer to a given position on the screen - in OS units.
x%,y% = screen coordinates to move the pointer to.

Drawfiles
FNwimp_getdfilesize(dfile%,side%)
Returns the width/height (in OS units) of drawfile graphic which has 
been loaded into memory using FNwimp_loaddfile().
dfile%= drawfile handle  
If side% = 0 returns width.
If side% = 1 returns height.
N.B. the returned dimensions are those of the overall bounding box 
surrounding all the drawfile objects i.e. as if all objects were grouped.

Drawfiles
FNwimp_loaddfile(filepath$,address%,warning%)
Loads a drawfile into a block of memory at address%.
The memory block must have already been created after using 
FNwimp_measurefile().
Returns the address (handle) at which to load the next file (if any) into 
the same memory block. (If filepath$ cannot be found the return will 
be the value of address% i.e. memory not used.)
filepath$ = full pathname of drawfile.
If warning% is not 0 then a non-fatal error will be given if filepath$ 
cannot be found.

Drawfiles
FNwimp_measurefile(filepath$,warning%)
Returns the size in bytes needed to store a file in memory prior to using 
FNwimp_loadfile(), FNwimp_loaddfile(), FNwimp_loadsprites() or 
FNwimp_loadjpegfile().
Returns -1 if filepath$ not found.
Always use this as opposed to any other form of measurement.
filepath$ = full pathname of spritefile.
warning% - if not 0, a non-fatal warning will be given if filepath$ 
cannot be found.
(This function is also listed in in other sections)

Drawfiles
PROCwimp_initdfiles
Initialises various blocks of memory ready to use with drawfiles.

Drawfiles
PROCwimp_render(dfile%,bx%,by%,minx%,miny%,maxx%,maxy%,scalex,scaley,origin%)
Renders (draws) a drawfile at the specified screen coordinates, using a 
clipping rectangle. Requires RISCOS Version 3.60 or higher.
All coordinates are in OS units.
dfile% = handle of drawfile to render (from using FNwimp_loaddfile)
bx%,by% = screen coordinates of where to put bottom left corner of
drawfile.
minx%,miny% = screen coordinates of bottom left corner of clipping 
rectangle.
maxx%,maxy% = screen coordinates of top right corner of clipping 
rectangle.
(Clipping rectangle is the same as that passed to PROCuser_redraw.)
scalex,scaley = respectively, required scaling factors in x and y 
directions. Values <1 reduce displayed size; values >1 increase size.
(1 meaning no change in size). Note that values less than 0 can be 
used, which will render the drawfile back-to-front and/or upside-down 
(but this will not work for JPEG objects in a drawfile).
If origin% = 0 drawfile will be rendered with bottom left corner of 
drawfile page at bx%/by%.
If origin% = 1 drawfile will be rendered with bottom left corner of 
drawfile objects overall bounding box at bx%/by%. (See Section 2.19)

Drawfiles
PROCwimp_renderwindow(window%,dfile%,bx%,by%,minx%,miny%,maxx%,maxy%,scalex,scaley,origin%)
Renders (draws) a drawfile in a window at the specified work area 
coordinates, using a clipping rectangle. Requires RISCOS Version 3.60 
or higher. The window must have its auto-redraw flag unset. All 
coordinates are in OS units.
window% = handle of window.
dfile% = handle of drawfile to render (from using FNwimp_loaddfile)
bx%,by% = work area coordinates of where to put bottom left corner 
of drawfile.
minx%,miny% = screen coordinates of bottom left corner of clipping 
rectangle.
maxx%,maxy% = screen coordinates of top right corner of clipping 
rectangle.
(Clipping rectangle is the same as that passed to PROCuser_redraw.)
scalex,scaley = respectively, required scaling factors in x and y 
directions. Values <1 reduce displayed size; values >1 increase size.
(1 meaning no change in size). Note that values less than 0 can be 
used, which will render the drawfile back-to-front and/or upside-down 
(but this will not work for JPEG objects in a drawfile).
If origin% = 0 drawfile will be rendered with bottom left corner of 
drawfile page at bx%/by%.
If origin% = 1 drawfile will be rendered with bottom left corner of 
drawfile objects overall bounding box at bx%/by%. (See Section 2.19)

Drawfiles
PROCwimp_savedfile(savepath$,dfile%)
Saves a drawfile stored in memory into a file.
dfile% = handle of drawfile to save (which must have been loaded into 
memory using FNwimp_loaddfile).
savepath$ = full pathname to save to.

Text
FNwimp_fontchangeh(font%)
Returns control codes in a string to change the current outline font.
Useful for using in the middle of a string of outline font text being 
plotted.
font% = handle of font to change to.

Text
FNwimp_fontcolour(fr%,fg%,fb%,br%,bg%,bb%)
Returns control codes in a string to change the current outline font 
colour. Useful for using in the middle of a string of outline font text 
being plotted.
fr%,fg%,fb% = red, green and blue components respectively of the 
foreground colour, in the range 0-255.
br%,bg%,bb% = red, green and blue components respectively of the 
background (anti-alias) colour, in the range 0-255.

Text
FNwimp_fontunderline(on%)
Returns control codes in a string to turn underlining on or off.
Useful for using in the middle of a string of outline font text being 
plotted.
If on%=0 turns underlining off.
If on%=1 turns underlining on.

Text
FNwimp_getfont(font$,sizex,sizey)
Obtains a font handle for a particular outline font at a particular point 
size.
font$ = name of font, period separated. eg: Trinity.Medium.
sizex = point size in horizontal direction.
sizey = point size in vertical direction.
Returns 0 if the font cannot be found.

Text
FNwimp_gettextsize(text$,font$,sizex,sizey,side%,scalex,scaley)
Returns the size (in OS units) of a text string as if it had been plotted in 
a particular outline font, using a string-specified font at specified point 
sizes and scaling. Returns 0 if the font cannot be found.
text$ = string to measure.
font$ = name of font, period separated, eg: Trinity.Medium.
sizex = point size in horizontal direction.
sizey = point size in vertical direction.
If side%=0 then the plotted width (length) of the text is returned.
If side%=1 then the plotted height of the text is returned.
scalex,scaley = respectively, required scaling factors in x and y 
directions. Values <1 reduce displayed size; values >1 increase size.
(1 meaning no change in size).

Text
FNwimp_gettextsizeh(text$,font%,side%,scalex,scaley)
Returns the size (in OS units) of a text string as if it had been plotted in 
a particular outline font, using a font handle and scaling.
text$ = string to measure.
font% = handle of font.
If side%=0 then the plotted width (length) of the text is returned.
If side%=1 then the plotted height of the text is returned.
scalex,scaley = respectively, required scaling factors in x and y 
directions. Values <1 reduce displayed size; values >1 increase size.
(1 meaning no change in size).

Text
PROCwimp_calcredrawlines()
NOT IN DrWimp LIBRARY.
ONLY USED AS PART OF Elixir_01 for fast scrolling of long text 
lists - see Manual Section 2.36 and 3.16.
Needs to be used with PROCuser_redrawtextline()

Text
PROCwimp_deskplottext(t$,align%,x%,y%,fr%,fg%,fb%,br%,bg%,bb%)
Plots text directly to screen, using the current desktop font. Requires 
RISC OS 3.50 or higher.
t$ = string to plot.
align% = if 0, text is left-aligned at x%/y%; if 1, text is centred on x%/
y%: if 2, text is right aligned to x%/y%.
x%,y% = screen coordinates (OS units) to plot the text at. (y% value is 
bottom of text)
fr%,fg%,fb% = foreground colour red, green and blue amounts in 
range 0-255.
br%,bg%,bb% = background colour red, green and blue amounts in 
range 0-255.

Text
PROCwimp_deskplotwindowtext(window%,t$,align%,x%,y%,fr%,fg%,fb%,br%,bg%,bb%,minx%,miny%,maxx%,maxy%)
Plots text in a window, using the current desktop font.  Requires RISC 
OS 3.50 or higher.
window% = handle of window to plot in.
t$ = string to plot.
align% = if 0, text is left-aligned at x%/y%; if 1, text is centred on x%/
y%: if 2, text is right aligned to x%/y%.
x%,y% = work coordinates (OS units) to plot the text at. (y% value is 
bottom of text)
fr%,fg%,fb% = foreground colour red, green and blue amounts in 
range 0-255.
br%,bg%,bb% = background colour red, green and blue amounts in 
range 0-255.
minx%,miny% = coordinates (OS units) of bottom left corner of 
clipping rectangle in screen coordinates.
maxx%,maxy% = coordinates (OS units) of top right corner of clipping
rectangle in screen coordinates.
(Clipping rectangle is the same as that passed to PROCuser_redraw.)

Text
PROCwimp_losefont(font%)
Forgets about a font i.e. closes its handle, like closing a file.
Should be called when you have finished with the font, eg. when the
application is quitting.
font% = handle of font to lose.

Text
PROCwimp_plottext(t$,f$,sizex,sizey,align%,x%,y%,fr%,fg%,fb%,br%,bg%,bb%,scalex,scaley,blending%)
Plots text directly to screen, using string-specified font at specified x/y 
point sizes, scaled and with choice of colours and alignment.
t$ = string to plot.
f$ = name of font to use, period separated e.g. Trinity.Medium. (If 
font cannot be found then Trinity.Medium is automatically 
substituted.)
sizex = point size in horizontal direction.
sizey = point size in vertical direction.
align% = if 0, text is left-aligned at x%/y%; if 1, text is centred on x%/
y%: if 2, text is right aligned to x%/y%.
x%,y% = screen coordinates (OS units) to plot the text at (y% value is 
bottom of text)
fr%,fg%,fb% = foreground colour red, green and blue amounts in 
range 0-255.
br%,bg%,bb% = background colour red, green and blue amounts in 
range 0-255.
scalex,scaley = respectively, required scaling factors in x and y 
directions. Values <1 reduce displayed size; values >1 increase size.
(1 meaning no change in size).
blending% - if any value except 0, font blending will be implemented 
(if Font Manager version supports this).

Text
PROCwimp_plottexth(t$,font%,align%,x%,y%,fr%,fg%,fb%,br%,bg%,bb%,scalex,scaley,blending%)
Plots text directly to screen, using font specified by font handle, with 
choices of colour, alignment and scaling.
t$ = string to plot.
font% = handle of font.
align% = if 0, text is left-aligned at x%/y%; if 1, text is centred on x%/
y%: if 2, text is right aligned to x%/y%.
x%,y% = screen coordinates (OS units) to plot the text at (y% value is 
bottom of text)
fr%,fg%,fb% = foreground colour red, green and blue amounts in 
range 0-255.
br%,bg%,bb% = background colour red, green and blue amounts in 
range 0-255.
scalex,scaley = respectively, required scaling factors in x and y 
directions. Values <1 reduce displayed size; values >1 increase size.
(1 meaning no change in size).
blending% - if any value except 0, font blending will be implemented 
(if Font Manager version supports this).

Text
PROCwimp_plotwindowtext(window%,t$,f$,sizex,sizey,align%,x%,y%,fr%,fg%,fb%,br%,bg%,bb%,minx%,miny%,maxx%,maxy%,scalex,scaley,blending%)
Plots text in a window, using string-specified font at specified x/y point 
sizes, scaled and with choice of colours and alignment.
window% = handle of window to plot in.
t$ = string to plot.
f$ = name of font to use, period separated e.g. Trinity.Medium.  (If 
font cannot be found then Trinity.Medium is automatically 
substituted.)
sizex = point size in horizontal direction.
sizey = point size in vertical direction.
align% = if 0, text is left-aligned at x%/y%; if 1, text is centred on x%/
y%: if 2, text is right aligned to x%/y%.
x%,y% = work area coordinates (OS units) to plot text at. (y% value is 
bottom of text)
fr%,fg%,fb% = foreground colour red, green and blue amounts in the 
range 0-255.
br%,bg%,bb% = background colour red, green and blue amounts in the 
range 0-255.
minx%,miny% = coordinates (OS units) of bottom left corner of 
clipping rectangle.
maxx%,maxy% = coordinates (OS units) of top right corner of clipping
rectangle.
(Clipping rectangle is the same as that passed to PROCuser_redraw.)
scalex,scaley = respectively, required scaling factors in x and y 
directions. Values <1 reduce displayed size; values >1 increase size.
(1 meaning no change in size).
blending% - if any value except 0, font blending will be implemented 
(if Font Manager version supports this).

Text
PROCwimp_plotwindowtexth(window%,t$,font%,align%,x%,y%,fr%,fg%,fb%,br%,bg%,bb%,minx%,miny%,maxx%,maxy%,scalex,scaley,blending%)
Plots text in a window, using font specified by font handle.
window% = handle of window to plot in.
t$ = string to plot.
font% = handle of font to use.
align% = if 0, text is left-aligned at x%/y%; if 1, text is centred on x%/
y%: if 2, text is right aligned to x%/y%.
x%,y% = work area coordinates (OS units) to plot text at. (y% value is 
bottom of text)
fr%,fg%,fb% = foreground colour red, green and blue amounts in the 
range 0-255.
br%,bg%,bb% = background colour red, green and blue amounts in the 
range 0-255.
minx%,miny% = coordinates (OS units) of bottom left corner of 
clipping rectangle.
maxx%,maxy% = coordinates (OS units) of top right corner of clipping
rectangle.
(Clipping rectangle is the same as that passed to PROCuser_redraw.)
scalex,scaley = respectively, required scaling factors in x and y 
directions. Values <1 reduce displayed size; values >1 increase size.
(1 meaning no change in size).
blending% - if any value except 0, font blending will be implemented 
(if Font Manager version supports this).

Printing
FNwimp_getpapersize(side%,type%)
Returns various information about the current paper size set up in 
loaded printer driver - in OS units.
If side%=0 then a horizontal measurement is returned.
If side%=1 then a vertical measurement is returned.
Which measurement is determined by type%.
If type%=0 then the width or height is returned.
If type%=1 then the left or bottom margin is returned.
If type%=2 then the printable width or printable height is returned.
If type%=3 then the right or top margin is returned.

Printing
FNwimp_getpdrivername
If a printer driver is loaded, the name of the printer driver is returned.
Check to make sure one is loaded first, with FNwimp_pdriverpresent.

Printing
FNwimp_papertoscreen(window%,coord%,side%,orient%)
Converts a paper x or y coordinate to a screen x or y coordinate - all in 
OS units.
window% = handle of window whose work area to use.
(A window reference is needed because paper values are assumed to 
map to positions in a window - Section 2.22.)
coord% = coordinate (x or y).
If side%=0 then coord% is a x coordinate, and an x coordinate is 
returned.
If side%=1 then coord% is a y coordinate, and a y coordinate is 
returned.
If orient%=0 then page is portrait.
If orient%=1 then page is landscape.

Printing
FNwimp_papertowork(coord%,side%,orient%)
Converts a paper x or y coordinate to a work area x or y coordinate - 
all in OS units.
(Paper values are assumed to map to positions in a window. Hence x 
values are the same and y values only referenced to different corner.)
coord% = coordinate (x or y).
If side%=0 then coord% is a x coordinate, and an x coordinate is 
returned.
If side%=1 then coord% is a y coordinate, and a y coordinate is 
returned.
If orient%=0 then page is portrait. If orient%=1 then page is landscape.

Printing
FNwimp_pdriverpresent
Checks to see if a printer driver is loaded.
Returns TRUE (-1) if a printer driver is loaded, or FALSE (0) if not.
(Note difference from usual Dr Wimp practice of returning 1 or 0)

Printing
FNwimp_screentopaper(window%,coord%,side%,orient%)
Converts a screen x or y coordinate to a paper x or y coordinate - all
in OS units.
(A window reference is needed because paper values are assumed to 
map to positions in a window - Section 2.22.)
window% = handle of window whose work area to use.
coord% = coordinate (x or y).
If side%=0 then coord% is a x coordinate, and an x coordinate is 
returned.
If side%=1 then coord% is a y coordinate, and a y coordinate is 
returned.
If orient%=0 then page is portrait.
If orient%=1 then page is landscape.

Printing
FNwimp_worktopaper(coord%,side%,orient%)
Converts a work area x or y coordinate to a paper x or y coordinate -
all in OS units.
(Paper values are assumed to map to positions in a window. Hence x 
values are the same and y values only referenced to different corner.)
coord% = coordinate (x or y).
If side%=0 then coord% is a x coordinate, and an x coordinate is 
returned.
If side%=1 then coord% is a y coordinate, and a y coordinate is 
returned.
If orient%=0 then page is portrait. If orient%=1 then page is landscape.

Printing
PROCwimp_declaredfilefonts(dfile%)
Declares the fonts used in a drawfile (especially) for postscript 
printing. (Intended to be used within PROCuser_declarefonts)
dfile% = handle of drawfile to be printed, which must have been 
loaded using FNwimp_loaddfile.

Printing
PROCwimp_declarefont(font$)
Declares a font for printing. (Intended to be used within 
PROCuser_declarefonts)
font$ = name of font to declare, period separated e.g. 
Trinity.Medium.

Printing
PROCwimp_declarefonth(font%)
Declares a font for printing using font handle. (Intended to be used 
within PROCuser_declarefonts)
font% = handle of font to declare.

Printing
PROCwimp_print(user%,window%,fpage%,lpage%,persheet%,interval%,copies%,orient%,xscale,yscale,order%,invert%)
Initiates printing of a document.
If user%=0 PROCuser_redraw is called to draw the pages (with 
printing% set to TRUE and the clipping rectangle set to the page 
coordinates).
If user%=1 PROCuser_print is called to draw the pages, with the 
clipping rectangle set to the page coordinates.
window% = handle of window to redraw if user%=0.
fpage% = page number of first page to print.
lpage% = page number of last page to print.
persheet% = number of pages to fit onto the sheet of paper. Can be
1, 2 or 4. (If 2 then page is rotated sideways and reduced to 70% before 
applying xscale/yscale values. If 4 then page is reduced to 50% before 
applying xscale/yscale values.)
interval% = allows pages in a sequence to be skipped. 1 means every
page to be printed; 2 means every other page, etc. (E.g. allows odd or
even pages to be printed.)
copies% = number of copies of each page to print.
If orient%=0 then page is portrait.
If orient%=1 then page is landscape.
xscale/yscale scale the printed output in the x/y directions 
independently. Values <1 reduce the size, values >1 increase the size. A 
value of 1 means no change in size. (There is a lower limit of 0.05.)
order% applies only when persheet% is 2 or 4. If order%=0 the pages 
are in the normal positions on the paper sheet. If order%=1 the 
positions of the pages are altered.
If invert%=0 the printed output is normal; if 1 the printed output is 
upside-down.
(See Section 2.22 for full details.)

Printing
PROCwimp_sendfiletoprinter(filepath$)
Sends the named file directly to the currently configured printer.
Has same effect as dragging the file to the printer icon on the iconbar.
filepath$ = full pathname of file.
If delete% is not 0, the file will be deleted after being sent to the 
printer.
(Also listed under Section 3.1 Miscellaneous)

Dynamic areas
FNwimp_changedynamic(darea%,absolute%,size%)
Changes the size of a dynamic area.
darea% = handle of dynamic area to be resized.
If absolute%=1 then the size in bytes given in size% is the new 
absolute size of the dynamic area.
If absolute%=0 then the size in bytes given in size% is the amount to 
change the dynamic area size by. (In this case, if size% is positive then 
the area will become larger, if size% is negative then the area will 
shrink.)
Returns a handle for the dynamic area, which may not be the same 
location as before.
Note the point about multiples of 4kbytes in 
FNwimp_createdynamic() above.

Dynamic areas
FNwimp_createdynamic(size%,maxsize%,drag%,name$)
Creates a dynamic area and returns a handle for it. (This wimp-
function needs RISCOS Version 3.60 or higher.)
size% = initial size of dynamic area in bytes.
maxsize% = maximum size of dynamic area in bytes. (-1 means no 
limit but use of this special value is not recommended.)
If drag% = 1 the user can change the size of the area by dragging in the 
Task Display.
name$ is the name of the dynamic area appearing in the Task Display.
Note: Dynamic area sizes may be restricted by the OS to multiples of 
4kbytes (4096 bytes). Automatic rounding up will then occur. See 
Section 2.20 of Manual.

Dynamic areas
FNwimp_measuredynamic(darea%)
Returns the current size of a dynamic area in bytes.
darea% = handle of dynamic area to measure.

Dynamic areas
PROCwimp_deletedynamic(darea%)
Deletes a dynamic area.
darea% = handle of dynamic area to delete.

Dynamic areas
FNwimp_getfreeRAM
Returns the number of bytes of free RAM available.

Colour picker
PROCwimp_opencolourpickermodel(model%,dialoguetype%,value1,value2,value3,value4,none%,x%,y%)
Requires RISCOS Version 3.50 or higher. Opens the colour picker 
window with the colour model set by model% and the initial colour 
set by the values of value1, value2, etc.
model%=0 for RGB model, 1 for CMYK model, 2 for HSV 
model.
value1, value2 etc. are in range 0-100%, except that value1 is
in the range 0-359 degrees (the colour angle in HSV) when 
model%=2.
value4, which must always be present, is ignored unless model%=1 
(CMYK model).
x%/y% are screen OS-unit coordinates of top left corner of window.
If dialoguetype%=0 the window will be closed by specific action e.g. 
selecting its Close icon.
If dialoguetype%=1 the window will close if the mouse is clicked 
outside the window.
If none%=0 the None button will be disabled.
If none%=1 the None button will be enabled and deselected.
If none%=2 the None button will be enabled and selected.
(Note: the window also closes when OK or None button is selected.)

Colour picker
PROCwimp_opencolourpickerrgb(dialoguetype%,red%,green%,blue%,none%,x%,y%)
Requires RISCOS Version 3.50 or higher. Opens the colour picker 
window with the initial colour set by the values of red%, green% and 
blue%, which are in the range 0-255.
The window will open in the RGB model (which means the set colour
values will actually be shown as percentages in the range 0-100%).
x%/y% give the screen OS-unit coordinates of the top left corner of
the opening window.
dialoguetype% determines how the window will close:
If dialoguetype%=0 the window will be closed by specific action e.g. 
selecting its Close icon.
If dialoguetype%=1 the window will close if the mouse is clicked 
outside the window.
If none%=0 the None button will be disabled.
If none%=1 the None button will be enabled and deselected.
If none%=2 the None button will be enabled and selected.
(Note: the window also closes when the OK or None button is 
selected.)

Colour picker
PROCwimp_opensubmenucolourpickermodel(model%,value1,value2,value3,value4,none%,x%,y%)
Requires RISCOS Version 3.50 or higher. Opens the colour picker 
window as a sub-menu, with the colour model set by model% and 
the initial colour set by the values of value1, value2, etc.
model%=0 for RGB model, 1 for CMYK model, 2 for HSV 
model.
value1, value2 etc. are in range 0-100%, except that value1 is
in the range 0-359 degrees (the colour angle in HSV) when 
model%=2.
value4, which must always be present, is ignored unless model%=1 
(CMYK model).
x%/y% are screen OS-unit coordinates of top left corner of window.
If none%=0 the None button will be disabled.
If none%=1 the None button will be enabled and deselected.
If none%=2 the None button will be enabled and selected.
As with any sub-menu, the window will close if the mouse is clicked 
outside the window or when the mouse pointer retraces the opening 
route. (Note: the window also closes when the OK or None button is 
selected.)

Colour picker
PROCwimp_opensubmenucolourpickerrgb(red%,green%,blue%,none%, x%,y%)
Requires RISCOS Version 3.50 or higher. Opens the colour picker 
window as a sub-menu, with the initial colour set by the values of 
red%, green% and blue%,
which are in the range 0-255.
The window will open in the RGB model (which means the set colour
values will actually be shown as percentages in the range 0-100%).
x%/y% give the screen OS-unit coordinates of the top left corner of
the opening window.
If none%=0 the None button will be disabled.
If none%=1 the None button will be enabled and deselected.
If none%=2 the None button will be enabled and selected.
As with any sub-menu, the window will close if the mouse is clicked 
outside the window or when the mouse pointer retraces the opening 
route. (Note: the window also closes when the OK or None button is 
selected.)

JPEG files
FNwimp_getjpegsize(jpeghandle%,side%,dpi90%)
Returns the width/height (in OS units) of the overall bounding box 
surrounding a JPEG graphic which has been loaded into memory using 
FNwimp_loadjpegfile().
jpeghandle%= JPEG file handle.
If side% = 0 returns width.
If side% = 1 returns height.
If dpi90%=0 then the natural dimensions are returned.
If dpi90%=1 then the dimensions are those for display at 90dpi.

JPEG files
FNwimp_getjpegsizefile(filepath$,side%,dpi90%,warning%)
Returns the width/height (in OS units) of the overall bounding box 
surrounding a JPEG graphic directly from its file. (Returns 0 if 
filepath$ cannot be found.)
filepath$ = full JPEG file path.
If side% = 0 returns width.
If side% = 1 returns height.
If dpi90%=0 then the natural dimensions are returned.
If dpi90%=1 then the dimensions are those for display at 90dpi.
warning% - if not 0, a non-fatal warning will be given if filepath$ 
cannot be found.

JPEG files
FNwimp_loadjpegfile(filepath$,address%,warning%)
Loads a JPEG file into a block of memory at address%.
The memory block must have already been created after using 
FNwimp_measurefile().
Returns the address (handle) at which to load the next file (if any) into 
the same memory block. (If filepath$ cannot be found the return will 
be the value of address% i.e. memory not used.)
filepath$ = full pathname of JPEG file.
warning% - if not 0, a non-fatal warning will be given if filepath$ 
cannot be found.

JPEG files
FNwimp_measurefile(filepath$,warning%)
Returns the size in bytes needed to store a file in memory prior to using 
FNwimp_loadfile(), FNwimp_loaddfile(), FNwimp_loadsprites() or 
FNwimp_loadjpegfile().
Returns -1 if filepath$ not found.
Always use this as opposed to any other form of measurement.
filepath$ = full pathname of spritefile.
warning% - if not 0, a non-fatal warning will be given if filepath$ 
cannot be found.
(This function is also listed in in other sections)

JPEG files
PROCwimp_renderjpeg(jpeghandle%,bx%,by%,minx%,miny%,maxx%,maxy%,scalex,scaley)
Renders (draws) a JPEG at the specified screen coordinates, using a 
clipping rectangle. All coordinates are in OS units.
The JPEG must already have been loaded into memory using 
FNwimp_loadjpegfile().
jpeghandle% = handle of JPEG
bx%,by% = screen coordinates of where to put bottom left corner of 
JPEG.
minx%,miny% = screen coordinates of bottom left corner of clipping 
rectangle.
maxx%,maxy% = screen coordinates of top right corner of clipping 
rectangle.
(Clipping rectangle is the same as that passed to PROCuser_redraw.)
scalex,scaley = respectively, required scaling factors in x and y 
directions. Values <1 reduce displayed size; values >1 increase size.
(1 meaning no change in size).

JPEG files
PROCwimp_renderjpegfile(jpegfilepath$,bx%,by%,minx%,miny%,maxx%,maxy%,scalex,scaley,warning%)
Renders (draws) a JPEG directly from its file to the specified screen 
coordinates, using a clipping rectangle. All coordinates are in OS units.
jpegfilepath$ = fullpath of JPEG file
bx%,by% = screen coordinates of where to put bottom left corner of 
JPEG.
minx%,miny% = screen coordinates of bottom left corner of clipping 
rectangle.
maxx%,maxy% = screen coordinates of top right corner of clipping 
rectangle.
(Clipping rectangle is the same as that passed to PROCuser_redraw.)
scalex,scaley = respectively, required scaling factors in x and y 
directions. Values <1 reduce displayed size; values >1 increase size.
(1 meaning no change in size).
warning% - if not 0, a non-fatal warning will be given if jpegfilepath$ 
cannot be found.
(Note: This function cannot be used for printing.)

JPEG files
PROCwimp_renderwindowjpeg(window%,jpeghandle%,bx%,by%,minx%,miny%,maxx%,maxy%,scalex,scaley)
Renders (draws) a JPEG in a window at the specified work area 
coordinates, using a clipping rectangle. The window must have its
auto-redraw flag unset. All coordinates are in OS units.
The JPEG must already have been loaded into memory using 
FNwimp_loadjpegfile().
window% = handle of window.
jpeghandle% = handle of JPEG
bx%,by% = work area coordinates of where to put bottom left corner 
of JPEG.
minx%,miny% = screen coordinates of bottom left corner of clipping 
rectangle.
maxx%,maxy% = screen coordinates of top right corner of clipping 
rectangle.
(Clipping rectangle is the same as that passed to PROCuser_redraw.)
scalex,scaley = respectively, required scaling factors in x and y 
directions. Values <1 reduce displayed size; values >1 increase size.
(1 meaning no change in size).

JPEG files
PROCwimp_renderwindowjpegfile(window%,jpegfilepath$,bx%,by%,minx%,miny%,maxx%,maxy%,scalex,scaley,warning%)
Renders (draws) a JPEG directly from its file to a window at the 
specified work area coordinates, using a clipping rectangle. The 
window must have its auto-redraw flag unset.
All coordinates are in OS units.
window% = handle of window.
jpegfilepath$ = fullpath of JPEG file
bx%,by% = work area coordinates of where to put bottom left corner 
of JPEG.
minx%,miny% = screen coordinates of bottom left corner of clipping 
rectangle.
maxx%,maxy% = screen coordinates of top right corner of clipping 
rectangle.
(Clipping rectangle is the same as that passed to PROCuser_redraw.)
scalex,scaley = respectively, required scaling factors in x and y 
directions. Values <1 reduce displayed size; values >1 increase size.
(1 meaning no change in size).
warning% - if not 0, a non-fatal warning will be given if jpegfilepath$ 
cannot be found.
(Note: This function cannot be used for printing.)

JPEG files
PROCwimp_savejpeg(savepath$,jpeghandle%)
Saves a JPEG currently loaded in memory to a file. The JPEG must 
have been loaded into memory by FNwimp_loadjpegfile.
savepath$ = full pathname of file to be saved.
jpeghandle% = handle of memory area containing the JPEG.

Elixirs
FNwimp_buildsprite(spritename$,sprwidth%,sprheight%)
NOT IN DrWimp LIBRARY.
ONLY USED AS PART OF Elixir_03 for constructing a custom 
sprite - see Manual Section 2.36.
Returns the handle of the sprite area containing the new sprite.
spritename$ - name of sprite
sprwidth%, sprheight% - required width and height of sprite in OS units

Elixirs
FNwimp_findmenuticksnumber(menu%)
NOT IN DrWimp LIBRARY.
ONLY USED AS PART OF Elixir_07 - see Manual Section 2.36.
Returns a single-byte integer number representing the menu items 
currently ticked. If menu item X is ticked then Bit X in the returned 
number will be set e.g return is 52 (%110100) if menu items 2, 4 and 5 
are currently ticked. Returns 0 if none ticked. (Bit 0 is not used and is 
always 0.)
menu% is menu handle.
(This wimp-function can only be used with menus having 31 menu 
items or less.)

Elixirs
FNwimp_findmenuticksstring(menu%)
NOT IN DrWimp LIBRARY.
ONLY USED AS PART OF Elixir_07 - see Manual Section 2.36.
Returns a comma-separated string of the menu items currently ticked 
e.g. 2,4,5 or a null string if none ticked.
menu% is menu handle.

Elixirs
PROCuser_definedragbox(startwindow%,dragbutton%,startmouseworkx%,startmouseworky%,RETURN userboxminx%,RETURN userboxminy%,RETURN userboxmaxx%,RETURN userboxmaxy%)
NOT IN  SKELETON !RunImage.
ONLY USED AS PART OF Elixir_04 for user-defined drag-boxes - 
see Manual Section 2.36
Defines size/position of required drag-box. (Called only by 
PROCwimp_startuserdragbox().)
startwindow% = handle of window where dragging was started.
dragbutton% = button used to start drag. (4 for <select>, 1 for 
<adjust>)
startmouseworkx%/startmouseworky% = mouse position at start of 
drag - in work OS units, referred to startwindow%.
userboxminx%/userboxminy%/userboxmaxx%/userboxmaxy% = 
edges of required drag-box - in work OS units, referred to 
startwondow%. (Default drag-box is a 32 OS unit square centred on 
mouse pointer.)

Elixirs
PROCuser_redrawtextline(x%,y%,line%)
NOT IN SKELETON !RunImage.
ONLY USED AS PART OF Elixir_01 for fast scrolling of long text 
lists - see Manual Section 2.36.
Needs to be used with PROCwimp_calcredrawlines().
x% - x-position to plot text line (in screen OS units)
y% - y-position to plot text line (in screen OS units)
line% - the number of the list line to be plotted/redrawn.

Elixirs
PROCuser_spritegraphics(spritearea%,spritename$,sprwidth%,sprheight%)
NOT IN SKELETON !RunImage.
ONLY USED AS PART OF Elixir_03 for constructing a custom 
sprite - see Manual Section 2.36.
Called only by PROCwimp_plotinsprite()
The required graphic/text VDU/PLOT-type commands should be 
placed in this user-function.
spritearea% - handle of sprite area containing the named sprite, as 
returned by FNwimp_buildsprite().
spritename$ - name of sprite, can be used to differentiate, if more than 
one sprite is being constructed.
sprwidth%, sprheight% - width and height of available sprite area, in 
OS units.

Elixirs
PROCwimp_calcredrawlines(leftmargin%,topmargin%,totallines%,linespacing%)
NOT IN DrWimp LIBRARY.
ONLY USED AS PART OF Elixir_01 for fast scrolling of long text 
lists - see Manual Section 2.36.
Needs to be used with PROCuser_redrawtextline().
leftmargin% - horizontal margin between left edge of list window and 
start of list text (in OS units).
topmargin% - vertical margin between top of list window and start of 
list area (in OS units).
totallines% - the total number of lines in the list.
linespacing% - the vertical spacing between lines of the list (in OS 
units).

Elixirs
PROCwimp_copydraggedicon(startwindow%,dragicon%,dragboxminx%,dragboxminy%,dragboxmaxx%,dragboxmaxy%,endwindow%,delete%)
NOT IN DrWimp LIBRARY.
ONLY USED AS PART OF Elixir_02 for copying a dragged icon - 
see Manual Section 2.36.
Needs to be used with PROCuser_endicondrag().
startwindow% - handle of window in which the dragged icon starts.
dragicon% - handle of dragged icon.
dragboxminx%, dragboxminy%, dragboxmaxx%, dragboxmaxy% - 
screen OS coords of drag box rectangle in its end-of-drag position. 
(Values to be carried through from the parameters of 
PROCuser_endicondrag() )
endwindow% -  handle of window in which the dragged icon ends. 
(Can only be an open window of the same application, and may be the 
same as startwindow%.)
delete% - if set to 0, the dragged icon will simply be copied to the end-
of-drag position.
delete% - if set to 1 then dragged icon will be deleted from its original 
position.

Elixirs
PROCwimp_getandsetwindowsettings(window%,windowname$,savedir$,hide%,warning%)
NOT IN DrWimp LIBRARY.
ONLY USED AS PART OF Elixir_06 - see Manual Section 2.36.
Retrieves a file saved in the format used by 
PROCwimp_savewindowsettings() and sets the window position/size/
scrolls accordingly.
window% - handle of window whose state is to be set.
windowname$ - leafname of saved file, without the W prefix i.e. 
name of window as used in PROCwimp_savewindowsettings().
savedir$ - directory path where file is located (without trailing .).
If savedir$ is set to a null string then file will be looked for in 
<Choices$Write> in a sub-directory with the same name as the 
application name i.e. the string which was used in the first parameter of 
FNwimp_initialise() when starting the application.
hide% - if 0 then window will be opened/re-opened after its state has 
been changed. If any other value then window will not be opened after 
its state has been changed.
warning% - if any value other than 0 a warning will be given if the file 
cannot be found. (If set to 0 and file cannot be found then no action 
will take place.)

Elixirs
PROCwimp_group(handle%,type%,string$,state%)
NOT IN DrWimp LIBRARY.
ONLY USED AS PART OF Elixir_07 - see Manual Section 2.36.
Enables/Disables/Selects/Deselects/Hides/Shows/Toggles a group of 
icons in the same window - or Enables/Disables/Ticks/Unticks/Toggles 
a group of menu items in the same menu.
handle% is the window (or menu) handle.
type%=1 means a group of icons is to be enabled/disabled/toggled;
type%=2 means a group of menu items is to be enabled/disabled/
toggled;
type%=3 means a group of icons is to be selected/de-selected/toggled.
type%=4 means a group of menu items is to be ticked/unticked/
toggled;
type%=5 means a group of icons is to be shown/hidden/toggled.
string$ is a comma-separated list of the icon numbers (or menu 
items) to which the action is to be applied.
state%=0 means disable/de-select/untick/show the icon/menu item;
state%=1 means enable/select/tick/hide the icon/menu item;
state%=2 means toggle the current state of the icon/menu item.
(Note that state% has the same meaning as in the corresponding 
wimp-functions in the main DrWimp library.)

Elixirs
PROCwimp_groupwindow(string$,type%,centre%,state%)
NOT IN DrWimp LIBRARY.
ONLY USED AS PART OF Elixir_07 - see Manual Section 2.36.
Opens/redraws/closes a group of windows.
string$ is a comma-separated list of the window handles to which the 
action is to be applied.
type%=1 means a group of windows is to be opened;
type%=2 means a group of windows is to be redrawn (values of 
centre% & stack% ignored.);
type%=3 means a group of windows is to be closed (values of centre% 
& stack% ignored.).
If centre% = 0 opens windows where they were last left on the screen 
(or where positioned in the template files).
If centre% = 1 opens the windows centred on the screen
(mode independent).
If centre% = 2 opens the windows centred on the pointer.
stack% = window handle to open behind, or -1 for top of window 
stack,  -2 for bottom, -3 for current stack position, or -4 for behind 
backdrop i.e. hidden.
(Note that centre% and stack% have the same meaning as in 
PROCwimp_openwindow() in the main DrWimp library.)

Elixirs
PROCwimp_nudgeinteger(window%,icon%,downicon%,upicon%,valueicon%,increment%,lowvalue%,highvalue%)
NOT IN DrWimp LIBRARY.
PART OF Elixir_05 providing optional wimp-functions for managing 
nudger/bump icons - see Manual Section 2.36.
For managing a pair of nudger/bump icons using integer numbers.. 
(Intended to be used within PROCuser_mouseclick().)
window% = handle of window containing nudger/bump icons.
icon% = nudger/bump icon currently being clicked.
downicon% = icon number of down icon.
upicon% = icon number of up icon.
valueicon% = icon number of value icon i.e. the icon whose value is 
being changed.
increment% = the amount by which the value icon is to be changed.
lowvalue% = the lowest value allowable in the value icon.
highvalue% = the highest value allowable in the value icon.

Elixirs
PROCwimp_nudgereal(window%,icon%,downicon%,upicon%,valueicon%,increment,shiftincrement,lowvalue,highvalue,decplaces%)
NOT IN DrWimp LIBRARY.
PART OF Elixir_05 providing optional wimp-functions for managing 
nudger/bump icons - see Manual Section 2.36.
For managing a pair of nudger/bump icons using real numbers.. 
(Intended to be used within PROCuser_mouseclick().)
window% = handle of window containing nudger/bump icons.
icon% = nudger/bump icon currently being clicked.
downicon% = icon number of down icon.
upicon% = icon number of up icon.
valueicon% = icon number of value icon i.e. the icon whose value is 
being changed.
increment = the amount by which the value icon is to be changed 
using <select> or <adjust>.
shiftincrement = the amount by which the value icon is to be changed 
using <shift-select> or <shift-adjust>.
lowvalue = the lowest value allowable in the value icon.
highvalue = the highest value allowable in the value icon.
decplaces% = the number of decimal places to be used for the results 
displayed in the value icon.

Elixirs
PROCwimp_plotinsprite(spritearea%,spritename$,sprwidth%,sprheight%)
NOT IN DrWimp LIBRARY.
ONLY USED AS PART OF Elixir_03 for constructing a custom 
sprite - see Manual Section 2.36.
Selects and sets up sprite ready for drawing graphics/text with VDU/
PLOT-type commands. Calls PROCuser_spritegraphics() below.
(Is called once by FNwimp_buildsprite() but thereafter may be called 
independently if graphics/text contents of sprite are to be altered.)
spritearea% - handle of sprite area containing the named sprite, as 
returned by FNwimp_buildsprite().
spritename$ - name of sprite
sprwidth%, sprheight% - required width and height of sprite in OS units

Elixirs
PROCwimp_savewindowsettings(window%,windowname$,savedir$)
NOT IN DrWimp LIBRARY.
ONLY USED AS PART OF Elixir_06 - see Manual Section 2.36.
Saves the current screen position/size/scrolls of a window to a text-file 
in a fixed format.
window% - handle of window whose state is to be saved.
windowname$ - arbitrary name of window, which will be used as 
leafname of saved file (prefixed with W)
savedir$ - directory path in which to locate saved file (no trailing .). 
If savedir$ is set to a null string then file will be saved to 
<Choices$Write> in a sub-directory with the same name as the 
application name i.e. the string which was used in the first parameter of 
FNwimp_initialise() when starting the application.
Used in conjunction with PROCwimp_getandsetwindowsettings()

Elixirs
PROCwimp_setdrawspritegraphiccolour(colour%)
NOT IN DrWimp LIBRARY.
ONLY USED AS PART OF Elixir_03 for constructing a custom 
sprite - see Manual Section 2.36.
Intended for use in PROCuser_spritegraphics().
Sets foreground colour for subsequent PLOT actions.
colour% - required colour (only colours 0-15 available).

Elixirs
PROCwimp_startuserdragbox(startwindow%,dragbutton%,startmouseworkx%,startmouseworky%)
NOT IN DrWimp LIBRARY.
ONLY USED AS PART OF Elixir_04 for user-defined drag-boxes - 
see Manual Section 2.36
Starts dragging of user-defined drag-box. (Intended to be used within 
PROCuser_mouseclick().)
startwindow% = handle of window where dragging is to be started.
dragbutton% = button used to start drag. (4 for <select>, 1 for 
<adjust>)
startmouseworkx%/startmouseworky% = mouse position at start of 
drag - in work OS units, referred to startwindow%.
This wimp-function also uses PROCuser_seticondragbounds(), 
PROCuser_draggingicon() and PROCuser_endicondrag() (all in the 
skeleton !RunImage) in which, in this case, the value of dragicon% 
will always be set to -1.

Elixirs
PROCwimp_writedrawspritetext(text$,fonth%,spritex%,spritey%,foreground%,background%)
NOT IN DrWimp LIBRARY.
ONLY USED AS PART OF Elixir_03 for constructing a custom 
sprite - see Manual Section 2.36.
Intended for use in PROCuser_spritegraphics().
Plots given text in an outline font at given position in anti-aliased 
colours (only colours 0-15 available).
text$ - required text.
fonth% - handle of required font/size i.e. must be previously declared.
spritex%, spritey% - start position of bottom left of text, with respect to 
bottom left corner of sprite.
foreground%, background% - required anti-aliased colours (only 
colours 0-15 available).
