Back to Contents        Previous





16. 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.

PROCwimp_calcredrawlines(leftmargin%,topmargin%,totallines%,linesp-acing%)
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).



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.



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


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


PROCuser_spritegraphics(spritearea%,spritename$,sprwidth%,sprheig-ht%)
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.



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).


PROCwimp_writedrawspritetext(text$,fonth%,spritex%,spritey%,foregro-und%,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).



PROCuser_definedragbox(startwindow%,dragbutton%,startmousework-x%,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.)


PROCwimp_startuserdragbox(startwindow%,dragbutton%,startmousew-orkx%,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.



PROCwimp_nudgeinteger(window%,icon%,downicon%,upicon%,valuei-con%,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’.


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’.

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()


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.)



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.)

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.)


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.


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. < i>(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.)


The OLE Elixir (Elixir_08)
Details of all wimp- and user-functions for this Elixir are contained in separate documentation accompanying the Elixir files.






Top of page        Back to Contents        Previous