home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / toollib_2 / Examples / Tree / !ReadMe next >
Text File  |  1996-06-13  |  4KB  |  106 lines

  1. Tree  (c) Paul Field
  2. ~~~~~~~~~~~~~~~~~~~~
  3. Tree 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.  
  8. Compiling
  9. ~~~~~~~~~
  10. To compile you will need to have Julian Smith's Makatic installed.
  11.  
  12. The source code and 'build applications' are in the Builds directory.
  13.  
  14. There are three ways to compile the program (three "builds"): double-click
  15. on !Debug to compile the debug version of the program; double-click
  16. on !Release to compile the production version; double-click on
  17. !MemCheck to build the memory checking version (you will need
  18. Julian Smith's/Warm Silence Software's C Tools for this).
  19.  
  20. The WimpSlot set up in !Run will need to be increased to run the debug
  21. or memory-checking versions.
  22.  
  23. Note that debug information is sent to the file pipe:$.debug.
  24.  
  25.  
  26. General notes
  27. ~~~~~~~~~~~~~
  28. Tree is not designed to be a "multi-document" (in this case multi-tree)
  29. program; there is a single parameter window and a single tree display window.
  30. This makes the program fairly simple and thus a good example for beginners
  31. investigating Toolbox programming.
  32.  
  33. !GFXView is intended as a more advanced example which demonstrates, amongst
  34. other things, how to implement a multi-document application.
  35.  
  36. Note that !Tree does demonstrate some advanced features such as file saving
  37. (using ToolLib's 'saver' and 'save_buffer' facilities) and Draw file
  38. construction.
  39.  
  40.  
  41. Tree's files
  42. ~~~~~~~~~~~~
  43.  
  44. diagram_save   This saves lines as a Draw file using ToolLib's saver and
  45.                save_buffer facilities.
  46.  
  47. line_plotter   This is a particular sort of line_processor (see below) that
  48.                processes lines by plotting them on the screen.
  49.              
  50. line_processor This is an abstract definition of a system that processes lines.
  51.                It enable the tree calculating function (see below) to generate
  52.                lines without committing to a use for those lines (e.g. putting
  53.                them on the screen, or putting them in a Draw file).
  54.                In C++ this would be an abstract base class but note that this
  55.                C implementation only allows one instantiation of each
  56.                line_processor type (e.g. you can't have two line_storers).
  57.                GFXView's 'picture' overcomes this limitation but the code
  58.                is more complicated.
  59.                
  60. line_storer    This is a particular sort of line_processor that processes
  61.                lines by storing them. Additional functions are provided for
  62.                accessing the stored lines. Note that the 'shifting' memory
  63.                manager is used.
  64.                
  65. main           This is the code for initialising and quitting your program.
  66.                It shows how to use ToolLib's application framework.
  67.  
  68. tree           This is the main tree drawing code. Note how it is independent
  69.                of any operating system calls or uses for the lines it generates.
  70.                This is important because this code may need to be used in a
  71.                PC program (this tree program actually has a serious use,
  72.                believe it or not).
  73.  
  74. treeparams     This handles the tree parameters window. It demonstrates how
  75.                to manage a dialogue box and read values from it.
  76.  
  77. treewindow     This handles the tree display window. It demonstrates how to use
  78.                a redraw loop to draw the contents of a window.
  79.  
  80.               
  81. Help!
  82. ~~~~~
  83. !Tree was developed for my brother who is planning to use
  84. computer-generated trees in a learning paradigm for his psychology Ph.D.
  85. However, it will hopefully act as an example of a reasonably
  86. well-written Toolbox application using OSLib. If there's anything you don't
  87. understand please let me know so I can improve the program. If you have
  88. any sensible criticisms of the code (stylistic, organisational or whatever)
  89. please also let me know.
  90.  
  91.  
  92. Contact details
  93. ~~~~~~~~~~~~~~~
  94. Paul Field
  95. Editor of CAUGers
  96. 346 Chadwell Heath Lane
  97. Chadwell Heath
  98. Romford
  99. Essex
  100. RM6 4YH
  101. UK
  102.  
  103. phone:   uk:   0 181 598 9676
  104.      non-uk: +44 181 598 9676
  105.  
  106. email: paul.field@dial.pipex.com