home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / toollib_2 / Examples / GFXView / !ReadMe
Encoding:
Text File  |  1996-06-13  |  3.3 KB  |  95 lines

  1. GFXView (c) Paul Field
  2. ~~~~~~~~~~~~~~~~~~~~~~
  3. GFXView is a program demonstrating how to use OSLib and the Toolbox to
  4. write a simple Wimp application. It also demonstrates how to handle errors
  5. by using exceptions (in C).
  6.  
  7. The program will display sprites, Draw files and JPEGs which are
  8. double-clicked or dropped onto its icon on the icon bar.
  9.  
  10. Note that JPEGs are only supported if you have the SpriteExtend
  11. module v0.99 or later (this is present in RISC OS 3.6).
  12. The program will not attempt to load JPEGs with earlier versions
  13. of SpriteExtend.
  14.  
  15.  
  16. Compiling
  17. ~~~~~~~~~
  18. To compile you will need to have Julian Smith's Makatic installed.
  19.  
  20. The source code and 'build applications' are in the Builds directory.
  21.  
  22. There are three ways to compile the program (three "builds"): double-click
  23. on !Debug to compile the debug version of the program; double-click
  24. on !Release to compile the production version; double-click on
  25. !MemCheck to build the memory checking version (you will need
  26. Julian Smith's/Warm Silence Software's C Tools for this).
  27.  
  28. The WimpSlot set up in !Run will need to be increased to run the debug
  29. or memory-checking versions.
  30.  
  31. Note that debug information is sent to the file pipe:$.debug.
  32.  
  33.  
  34. General notes
  35. ~~~~~~~~~~~~~
  36. GFXView is a reasonably complicated example that demonstrates the
  37. implementation of a multi-document application and also shows how to load
  38. files and render various graphics formats.
  39.  
  40. For a simpler example see !Tree which is only single-document (and so has
  41. simpler 'viewer' code). Note that !Tree does have some advanced features
  42. such as file saving (using ToolLib's facilities) and Draw file construction.
  43.  
  44.  
  45. GFXView's files
  46. ~~~~~~~~~~~~~~~
  47.  
  48. main        This is the code for initialising and quitting your program.
  49.             It shows how to use ToolLib's application framework.
  50.             
  51. picture     Code which provides a uniform 'picture' interface for differing
  52.             format such as Sprite, Draw or JPEG files. This is one way of
  53.             implementing a C++ abstract base class in C (see CAUGers 3:1
  54.             p9-14 which shows this arrangement as a class diagram).
  55.             
  56. draw_pic    Code for handling draw file 'pictures'. In C++ this would be
  57.             a class derived from picture.            
  58.             
  59. sprite_pic  Code for handling sprite 'pictures'. In C++ this would be
  60.             a class derived from picture.
  61.  
  62. jpeg_pic    Code for handling jpeg 'pictures'. In C++ this would be
  63.             a class derived from picture.
  64.             
  65. viewer      The code for handling a window containing a sprite (including
  66.             handling the 'scale' dialogue box). Demonstrates:
  67.               Loading files
  68.               Handling multiple 'documents'
  69.               How to manage a window that needs to be redrawn by the application
  70.               Using debug code to validate data structures in event handlers
  71.               
  72. Help!
  73. ~~~~~
  74. GFXView's main aim is to give you an example of a reasonably
  75. well-written Toolbox application using OSLib. If there's anything you don't
  76. understand please let me know so I can improve the program. If you have
  77. any sensible criticisms of the code (stylistic, organisational or whatever)
  78. please also let me know.
  79.  
  80.  
  81. Contact details
  82. ~~~~~~~~~~~~~~~
  83. Paul Field
  84. Editor of CAUGers
  85. 346 Chadwell Heath Lane
  86. Chadwell Heath
  87. Romford
  88. Essex
  89. RM6 4YH
  90. UK
  91.  
  92. phone:   uk:   0 181 598 9676
  93.      non-uk: +44 181 598 9676
  94.  
  95. email: paul.field@dial.pipex.com