home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / toollib_2 / Examples / !ReadMe
Text File  |  1996-06-14  |  3KB  |  80 lines

  1. An overview of the example programs
  2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3. All programs are provided with a !ReadMe file which gives details of the
  4. program's structure and operation. This section gives an overview of the
  5. examples and what you can learn from them.
  6.  
  7.  
  8. Text
  9. -----
  10. If you're a beginner, start with this program. It shows how to:
  11.  * Initialise an application using ToolLib
  12.  * Handle a single window whose contents must be redrawn by the application
  13.  * Use Toolib's text_plot facilities
  14.  
  15.  
  16. Click
  17. -----
  18. If you understand !Text, move on to this application. It shows how to:
  19.  * Initialise an application using ToolLib
  20.  * Handle errors using an exception-handling mechanism
  21.  * Handle a single window whose contents must be redrawn by the application
  22.  * Handle mouse clicks in the window
  23.  * Use a data structure to store the contents of the window (in contrast to
  24.    a non-Wimp program where you just plot on the screen)
  25.  
  26.  
  27. Tree
  28. ----
  29. This is a more complicated example but, like Click, is still
  30. "single-document". It shows how to:
  31.  * Initialise an application using ToolLib
  32.  * Handle errors using an exception-handling mechanism
  33.  * Handle a single window whose contents must be redrawn by the application
  34.  * Handle a dialogue box containing gadgets
  35.  * Save a Draw file
  36.  * Save using type 3 (i.e. in-memory or file) data transfer using ToolLib's
  37.    facilities
  38.  * Abstract an algorithm (i.e. a tree building algorithm) from implementation
  39.    details (i.e. what to do with the lines - plot them, save them, put them
  40.    in a Draw file etc...)
  41.    
  42.  
  43. GFXView
  44. -------
  45. This is a multi-document example. It shows how to:
  46.  * Initialise an application using ToolLib
  47.  * Handle errors using an exception-handling mechanism
  48.  * Handle multiple 'documents' each of which appears in a separate window
  49.  * Handle scaling and a scale dialogue box
  50.  * Load and render Sprites (including 'deep' sprites on RISC OS 3.5 upwards)
  51.  * Load and render Draw files
  52.  * Load and render JPEGs (on RISC OS 3.6)
  53.  * Organise a program well:
  54.      - The 'viewer' is separated from the data it views
  55.      - The different graphics formats are abstracted by 'picture' which
  56.        presents a uniform interface hiding the implementation details of
  57.        a particular graphics format. This makes the viewer code simpler and
  58.        it's very easy to add new graphics formats.
  59.      - Each graphics format is separated into a separate file
  60.    This organisation separates code in to groups of related code which should
  61.    make the program easier to understand and maintain. Note that the picture
  62.    abstraction would be an abstract base class in C++ with draw_pic,
  63.    sprite_pic and jpeg_pic derived from it.
  64.  
  65.  
  66. Contact details
  67. ~~~~~~~~~~~~~~~
  68. Paul Field
  69. Editor of CAUGers
  70. 346 Chadwell Heath Lane
  71. Chadwell Heath
  72. Romford
  73. Essex
  74. RM6 4YH
  75. UK
  76.  
  77. phone:   uk:   0 181 598 9676
  78.      non-uk: +44 181 598 9676
  79.  
  80. email: paul.field@dial.pipex.com