home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / utilities / utilst / wimpres / !Help next >
Text File  |  1995-05-21  |  4KB  |  76 lines

  1. Manual for Wimp Resources
  2. by Software7
  3.  
  4. License
  5. -------
  6. This document, the Wimp Demo application, the template files and the two sets of supplied code are Public Domain. There is no copyright, no fee for distribution and no restriction on who may use it.
  7.  
  8. Introduction
  9. ------------
  10. This is basically a set of programs to help in-experienced programmers program the WIMP. I have provided a demo application, some template files and two sets of program code. One of these uses extension modules, the other uses only the WIMP.
  11.  
  12. WimpDemo
  13. --------
  14. This is a simple application that demonstrates some of the features of the WIMP. It has three windows, the main window (Click select on the icon bar), the pane window (Click adjust on the icon bar) and the info window (click menu on the icon bar and move to the info option). The programs needs no further explanation.
  15.  
  16. Template files
  17. --------------
  18. These template files contain several window and icon definitions that comply with Acorn's Style Guide. You need a template editor to use these files, We recommend TemplEd which is available from most PD libraries or we can send you a copy. We recommend that you use these window definitions as it saves having to make your own, but feel free to edit them in ay way you like.
  19.  
  20. Code files
  21. ----------
  22. These are two shell WIMP programs for you to adapt and use. Before you start you need to know how a WIMP program works.
  23.  
  24. There are three stages to a WIMP program.
  25.  
  26. Initialisation
  27. This is where templates are loaded, menus defined, memory claimed, sprites loaded and your task registered with the Task Manager & any other extension modules.
  28.  
  29. Polling
  30. This is where you tell the wimp that your program is finished what it was doing and is ready for the user to do something. Generally your program will have a polling loop that goes on until your program is asked to quit. When you call Wimp_Poll the WIMP returns a reason code, this could be:
  31.  
  32. 0    No reason
  33. 1    Redraw window
  34. 2    Open window
  35. 3    Close window
  36. 4    Pointer leaving window
  37. 5     Pointer entering window
  38. 6    Mouse click
  39. 7    User drag box
  40. 8    Key pressed
  41. 9    Selection of menu item
  42. 10    Window scroll request
  43. 11    Lose the caret
  44. 12    Gain the caret
  45. 17    User message
  46. 18    User message
  47.  
  48. Each reason fills the WIMP block with the relevant data, this is described in the programs REM statements.
  49. Your program should do a CASE .. OF .. WHEN ..OTHERWISE loop to determine what the reason code was and then call a procedure to handle this.
  50.  
  51. CloseDown
  52. If your task suffers a fatal error, ot the users wants it quit then your program must de-register with the Task Manager and any extension modules and then call OS_Exit.
  53.  
  54. Using the programs
  55. ------------------
  56. To use the programs you must go through the code looking for any references to Task Name or Icon Name and <Your$Dir> and replace these with the appropriate names for your program. You must also supply a template file with the templates in the right order.
  57. In the menu building procedure of the second code, your info window won't be in the same place in the file so replace hand%!0 with hand%!x where x is the position from the start of the file (0) multiplied by 4.
  58. Also you must re write the mouse click handling procedure because the window numbers and icon numbers will be different for your templates.
  59.  
  60. This document contains no-where as much information as the Programmers Reference Manual so I would suggest that you buy this. If your budget doesn't stretch to £90 then get a copy of the Free Ware !StrongHelp program which runs in the desktop (unlike the PRM's!!!) and is absolutely brilliant.
  61.  
  62. For editing code you can't beat !Zap, which is also Free Ware & was written by Dominic Symes, this and !StrongHelp can be obtained from most PD libraries or we can supply them for you.
  63.  
  64. If you have any problems with this software, using the code in your own programs, bug reports, comments or ideas for new programs then please write to:
  65.  
  66. Software7
  67. 15 Stewarton Drive
  68. Cambuslang
  69. Glasgow
  70. Scotland
  71. G72 8DF
  72.  
  73. Any problems with the Wimp Extension module or the Menu Utils module should be send to Jon Ribbens & Alex Petrov respectively (Not me)
  74.  
  75. Have Fun!!!
  76.