home *** CD-ROM | disk | FTP | other *** search
- misc
- FNwimp_initialise(name$,wimpmem%,iconmem%,ver%)
- This function registers your application with the Task
- Manager and reserves some memory.
- name$ = the name of your application eg. 'Draw'.
- wimpmem% = number of bytes to reserve for icon data or
- menu entries.
- iconmem% = number of bytes to reserve for indirected
- text. eg. window titles or long menu entries.
- ver% = minimum version of RISC OS that the application
- is allowed to run on multiplied by 100.
-
- misc
- PROCwimp_poll
- This function is the main loop of your application. When
- it has finished, your application has quitted.
- If something happens to your application eg. an icon has
- been clicked on, then the relevent function will be
- called from the loop.
-
- misc
- PROCwimp_singlepoll
- The same as PROCwimp_poll, execpt that it is called once
- and not in a loop. If something happens then the
- relevent action will still be taken before returning.
- Useful for making loops multitask, eg: raytracing,
- printing, calculating, loading in data, etc.
-
- user
- PROCuser_redraw(window%,minx%,miny%,maxx%,maxy%)
- When this function is called, the Wimp wants you to
- update the specified box on the screen. The box is in
- the work area of the window whose handle is window%.
- minx%,miny% = bottom left co-ordinates of box.
- maxx%,maxy% = top right co-ordinates of box.
-
- user
- PROCuser_mouseclick(window%,icon%,button%)
- IF an icon has been clicked on in one of your windows
- then this function is called.
- window% = handle of window containing icon.
- icon% = number of the icon clicked on.
- button% = which mouse button was pressed. Eg. 4 for
- Select, 1 for Adjust.
-
- user
- FNuser_menu(window%,icon%)
- IF the specified window (and icon) has a menu which you
- want to appear when Menu is pressed over it, then this
- function should return the handle of the menu.
- window% = handle of window.
- icon% = number of icon.
-
- 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 to open behind, or -1 for top of
- window stack, or -2 for bottom.
-
- user
- PROCuser_closewindow(window%)
- IF this function is called, then the window whose handle
- is window% has just been closed.
-
- 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 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 independant).
- stack% = window handle to open behind, or -1 for top of
- window stack, or -2 for bottom.
-
- 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%.
- window% = handle of window to open.
- stack% = window handle to open behind, or -1 for top of
- window stack, or -2 for bottom.
-
- windows
- PROCwimp_closewindow(window%)
- Closes a window (removes it from the screen).
- window% = handle of window to close.
-
- messages
- PROCwimp_initmessages(pathname$)
- Reserves blocks of memory and sets up Messages file for
- use.
- pathname$ = full pathname of messages file to use.
-
- messages
- FNwimp_messlook0(token$)
- Returns the string in the messages file for the token
- token$.
-
- messages
- FNwimp_messlook1(token$,a$)
- Returns the string in the messages file for the token
- token$. Any '%0's in the string are replaced with a$
- before returning.
-
- messages
- FNwimp_messlook2(token$,a$,b$)
- Returns the string in the messages file for the token
- token$. Any '%0's and '%1's are replaced with a$ and b$
- respectively before returning.
-
- icons
- FNwimp_iconbar(sprite$,text$,pos%)
- Places an icon on the iconbar.
- sprite$ = name of sprite to put on iconbar.
- text$ = text to put underneath the icon eg. like the
- floppy drive icon. If text$ = "" then no text will be
- used, and the icon will be positioned correctly.
- pos% = controls the position of the icon. If pos% = 1
- then the icon will appear on the right. If pos% = 0 then
- it will appear on the left.
- Returns window handle.
-
- menus
- PROCwimp_menupopup(menu%,bar%,x%,y%)
- Brings up the menu whose handle is menu% at the
- co-ordinates x%,y%. If bar%=1 then the menu will be
- positioned as for an iconbar menu, otherwise use 0.
-
- icons
- FNwimp_geticontext(window%,icon%)
- Returns a string containing the text from the icon.
- window% = handle of window containing icon.
- icon% = icon number.
-
- icons
- PROCwimp_puticontext(window%,icon%,text$)
- If the icon is indirected then the text in the icon is
- replaced with text$. If the icon is indirected then an
- error is caused.
- window% = handle of window containing icon.
- icon% = number of icon.
-
- user
- FNuser_keypress(window%,icon%,code%)
- IF a key is pressed while one of your windows has the
- input focus, or a hotkey is pressed, then this function
- is called. If you don't use the key then return a 0. If
- you do then return a 1.
- window% = handle of window with input focus.
- icon% = number of icon with caret.
- code% = key code. For most keys it is an ASCII number.
- For special keys see the PRM.
-
- user
- PROCuser_menuselection(menu%,item%)
- This function is called when the user has chosen a menu
- item from one of your menus.
- menu% = handle of menu.
- item% = item number (top item is 1).
-
- menus
- FNwimp_createmenu(menu$,size%)
- Creates a menu structure from the string menu$. The menu
- handle is returned.
- For more information on menu$ see the manual.
- IF size%>number of items then the menu is dynamic, ie.
- the items can be increased up to size%.
-
- misc
- PROCwimp_error(title$,error$,button%,prefix%)
- Reports an error using a standard error box.
- title$ = title of error window.
- error$ = error message.
- IF button%=1 then will have an 'OK' button.
- IF button%=2 then will have a 'CANCEL' button.
- prefix% = prefix flag. If = 0 then the title is title$.
- If = 1 then the title is prefixed by 'Error from '. If =
- 2 then the title is prefixed by 'Message from '.
-
- misc
- FNwimp_errorchoice(title$,error$,prefix%)
- Reports an error using a standard error box.
- It has both 'OK' and 'CANCEL' buttons.
- title$ = title of error window.
- error$ = error message.
- IF prefix% = 0 then the title is title$. If prefix% = 1
- then the title is prefixed by 'Error from '. If prefix%
- = 2 then the title is prefixed by 'Message from '.
- Returns TRUE if 'OK' pressed. FALSE if 'CANCEL' pressed.
-
- menus
- FNwimp_menusize(menu%)
- Returns the number of entries in the menu.
- menu% = handle of menu.
-
- menus
- PROCwimp_menutick(menu%,item%)
- If the item doesn't have a tick next to it then this
- function places one. If the item does have a tick then
- it is removed.
- menu% = handle of menu.
- item% = item number (top item is 1).
-
- menus
- PROCwimp_menudisable(menu%,item%)
- Greys out the menu item so it is un-selectable.
- menu% = handle of menu.
- item% = item number (top item is 1).
-
- menus
- PROCwimp_menuenable(menu%,item%)
- Un-greys out the menu item so it is selectable.
- menu% = handle of menu.
- item% = item number (top item is 1).
-
- icons
- PROCwimp_puticonbartext(text$)
- If the iconbar icon has text underneath it then it is
- replaced by text$.
-
- icons
- PROCwimp_iconbarsprite(sprite$)
- Changes the sprite used for the iconbar icon to sprite$.
-
- menus
- PROCwimp_menudottedline(menu%,item%)
- Adds a dotted line to the menu below the item.
- menu% = handle of menu.
- item% = number of item (top item is 1).
-
- menus
- PROCwimp_menuclose
- Closes the currently active menu.
-
- misc
- PROCwimp_loadsprites(pathname$)
- Creates a user sprite area and loads the sprites into it
- so they can be used in windows, etc.
- pathname$ = full pathname to sprite file.
-
- windows
- FNwimp_loadwindow(pathname$,window$,sprite%)
- Loads in a window from a templates file and returns a
- handle for the window.
- pathname$ = full pathname to templates file.
- window$ = name of window in templates file.
- sprite% = sprite flag. If = 0 then use sprites from user
- sprite area for window. If = 1 then use sprites from the
- wimp sprite pool (RMA).
-
- icons
- PROCwimp_putcaret(window%,icon%)
- Puts the caret in the icon.
- window% = handle of window containing icon.
- icon% = number of icon.
-
- icons
- PROCwimp_losecaret
- Removes the caret from the icon it is in.
-
- windows
- PROCwimp_putwindowtitle(window%,title$)
- Changes the window title to title$
- window% = handle of window.
-
- windows
- FNwimp_getwindowtitle(window%)
- Returns a string containing the window title.
- window% = handle of window.
-
- misc
- FNwimp_getleafname(pathname$)
- Returns a string containing the leafname from the
- pathname.
- pathname$ = pathname.
-
- user
- PROCuser_savedata(pathname$,window%)
- When the user is required to save data, this function is
- called.
- pathname$ = full pathname of file to save data to.
- window% = handle of save window icon was dragged from.
-
- user
- FNuser_loaddata(pathname$,window%,icon%,filetype$)
- You load data here.
- pathname$ = full pathname of source file.
- window% = handle of window file was dragged on to.
- icon% = number of icon file was dragged on to.
- filetype$ = filetype of file to be loaded. Eg. "FFF".
-
- user
- FNuser_savefiletype(window%)
- You return the filetype for the save windows. eg.
- ='FFF'. For windows that aren't save windows, return an
- empty string eg. =''.
- window% = handle of window%
-
- user
- FNuser_help(window%,icon%)
- Return a string to be used for interactive help for the
- window (and icon).
- window% = handle of window (containing icon).
- icon% = number of icon.
-
- icons
- PROCwimp_iconenable(window%,icon%)
- Un-greys out icon so it can be selected.
- window% = handle of window containing icon.
- icon% = number of icon.
-
- icons
- PROCwimp_icondisable(window%,icon%)
- Greys out icon so it cannot be selected.
- window% = handle of window containing icon.
- icon% = number of icon.
-
- icons
- PROCwimp_iconselect(window%,icon%,state%)
- Selects (inverts) and un-selects icon.
- window% = handle of window containing icon.
- icon% = number of icon.
- If state% = 0 icon is un-selected. If state% = 1 icon
- is selected.
-
- windows
- PROCwimp_banner(window%,delay%)
- Opens window in the centre of the screen for specified
- delay before closing it.
- window% = handle of window to open.
- delay% = number of seconds to keep window on screen.
-
- misc
- PROCwimp_pointer(pointer%,area%,pointer$)
- Changes mouse pointer between the deafult (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 area% = 0 wimp sprite pool is used. If area% = 1 user
- sprite area is used.
- pointer$ = sprite name of pointer.
-
- user
- PROCuser_enteringwindow(window%)
- This function is called when the pointer enters a
- window.
- window% = handle of window.
-
- user
- PROCuser_leavingwindow(window%)
- This function is called when the pointer leaves a
- window.
- window% = handle of window.
-
- menus
- FNwimp_getmenutitle(menu%)
- Returns a string containing the title of the menu.
- menu% = handle of menu.
-
- menus
- PROCwimp_putmenutitle(menu%,title$)
- Changes the title of the menu.
- If the title>11 characters then it is truncated.
- menu% = handle of menu.
- title$ = new title.
-
- misc
- PROCwimp_starttask(command$)
- Sends command$ to the CLI. Omit '*'.
-
- menus
- PROCwimp_putmenutext(menu%,item%,text$)
- Replaces menu items text with text$.
- menu% = handle of menu.
- item% = number of item (Top item is 1).
-
- menus
- PROCwimp_menuwrite(menu%,item%,length%)
- Makes the menu item writeable.
- menu% = handle of menu.
- item% = number of item (top item is 1).
- length% = maximum length of text allowed to be entered.
-
- menus
- FNwimp_getmenutext(menu%,item%)
- Returns a string containing the text of the menu item.
- menu% = handle of menu.
- item% = number of item (top item is 1).
-
- windows
- FNwimp_getwindowsize(window%,side%)
- Returns the dimension required.
- If side% = 0 returns width. If side% = 1 returns height.
-
- 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 doesn't have a pane attached, then it should
- return a -1.
- window% = handle of window.
-
- misc
- FNwimp_libversion
- Returns the version number of the library x 100. Eg. if
- the version of the library is 1.03 then 103 will be
- returned.
-
- misc
- FNwimp_sysvariable(sysvar$)
- Returns a string for the system variable sysvar$.
- Note '<' and '>' are not required in sysvar$.
-
- user
- PROCuser_null
- This is called continuously. So if you are writing
- something like a clock, you would monitor the time here
- and change any windows as required.
- IF you want to use this function then set NULL=TRUE.
-
- menus
- PROCwimp_putmenuitem(menu%,item%,item$)
- If the menu is dynamic then item$ will be put into menu
- item item%. Any items below will be shuffled down. If
- item% is bigger than the current number of items+1, then
- it will be added to the bottom.
- menu% = handle of menu.
-
- 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.
-
- menus
- PROCwimp_recreatemenu(menu%,menu$)
- Rebuilds the menu using the string menu$. More items can
- be included than the first time as long as you don't go
- over the pre-defined limit.
- menu% = handle of menu to rebuild.
-
- menus
- FNwimp_createmenuarray(array$(),size%)
- Creates a menu from the array supplied. Each item of the
- menu is in a seperate element of the array. eg:
- array$(3)='Info>info%'. Note submenus are included in
- the usual way. the first element is the menu title, and
- the last must be 'END'.
- array$() = array to get items from.
- size% = maximum number of elements to allocate room for
- (doesn't have to be the current number).
- Returns a handle to the menu.
-
- menus
- PROCwimp_recreatemenuarray(menu%,array$())
- Rebuilds the menu using the items in the array. The
- first array item (array$(0)) is the menu title, and the
- last has to be 'END'.
- Things like ticks and dotted lines are reset.
- Submenus are included with each item in the usual way,
- ie. array$(4)='Info>info%'.
- menu% = handle of menu to rebuild
- array$() = array to get items from.
-
- misc
- PROCwimp_bar(window%,icon%,length%)
- Adjusts the length of a bar.
- window% = handle of window containing the bar.
- icon% = icon number of the bar.
- length% = length of the bar.
-
-