Back to Contents Previous Next
4. 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.
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 hasn’t 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.
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.
PROCwimp_redrawwindow(window%)
Causes the complete window whose handle is window% to be redrawn/updated.
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.)
PROCwimp_closewindow(window%)
Closes a window (removes it from the screen).
window% = handle of window to close.
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)
FNwimp_getwindowworksize(window%,side%)
Returns the size, in OS units, of a window’s 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.)
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.)
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%.
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.)
FNwimp_getwindowtitle(window%)
Returns a string containing the window title.
window% = handle of window.
PROCwimp_putwindowtitle(window%,title$)
Changes the window title to title$
window% = handle of window.
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.)
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.
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.)
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.)
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.)
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.
FNwimp_createwindow(vminx%,vminy%,vmaxx%,vmaxy%,wminx%,wmi-ny%,wmaxx%,wmaxy%,flags%,colourflags%,button%,title$,titleflags%,ti-tlefont%,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.)
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.
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()
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()
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()
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.
Top of page Back to Contents Previous Next