home *** CD-ROM | disk | FTP | other *** search
/ Kosovo Orphans' Appeal Charity CD / KosovoOrphansAppeal.iso / commercialdemos / claresmicrosupplies / pca / docs / totest < prev    next >
Text File  |  1996-06-28  |  4KB  |  121 lines

  1. How to test:
  2. ============
  3.  
  4. Read the file 'intro' for an explanation of the terms 'local' and 'remote'.
  5.  
  6. Load at least two copies of !Spaint (more if you like).
  7.  
  8. Load a 24 bit sprite into one copy of !SPaint by dragging to the iconbar
  9. icon. A window opens with three icons attached. These are from top down:
  10.  
  11. o Close window
  12. o Information - does nothing
  13. o Utils - opens up a list of PCA Compliant applications
  14.  
  15. Click on the Utils icon in the toolbar attached to the window. This will
  16. construct a dialogue of the PCA compatible programs which are running that
  17. can do something to the sprite in question.
  18.  
  19. Choose one of these to link it to the 'Local' image.
  20.  
  21. A Toolbar with three icons pops up at the bottom of the window. The icons
  22. from left to right are:
  23.  
  24. o De-link Remote application
  25. o Pop up Colour Picker
  26. o Third icon is for show only - does nothing
  27.  
  28. Select a colour and paint into the window with the mouse. 
  29.  
  30. Clicking MENU also pops up the colour picker.
  31.  
  32. The above is an example of 'in-place' editing where the second application
  33. ('remote') is providing tools that work on the 'Local' window.
  34.  
  35. Non In-Place editing
  36. ====================
  37.  
  38. Load one copy of !SPaint and one copy of !Processed.
  39.  
  40. Click on the Processed icon on the icon bar; press Menu over the window and
  41. untick the 'Accept in place' menu item.
  42.  
  43. Menu again and go off the Utilities menu and select Simple Paint.
  44.  
  45. This opens another window with the same image and the toolbar attached to
  46. the new window.
  47.  
  48. Editing in this 'Remote' window modifies the image in both windows.
  49.  
  50. Try also:
  51. =========
  52.  
  53. 1) Load !Processor bring up the Utilities menu on Processed and select the
  54. Tool item. Click on the Processor icon and use the sliders by clicking into
  55. them. This updates both images.
  56.  
  57. 2) Linking more than one copy of !Spaint into the same image and painting in
  58. different copies.
  59.  
  60. 3) Dragging a different sprite into the local image window.
  61.  
  62. 4) Quitting the copy of !Spaint containing the local image.
  63.  
  64.  
  65. What happens when you click menu in the 'local' window?
  66. -------------------------------------------------------
  67.  
  68. There are two cases
  69.  
  70. 1) When not using in-place editing
  71.  
  72. When you click the local copy of Spaint it broadcasts Message_WhosAbout with
  73. the filetype of the selected object and its address. The other PCA programs
  74. running spot this message and respond with Message_ImHere which the Local
  75. uses to build the dialogue box.
  76.  
  77. When the user selects an item it sends a Message_DoYourStuff message to the
  78. task which added the dialogue item.
  79.  
  80. When the user paints in the window Spaint broadcasts Message_UpdateArea which
  81. the other programs using the object respond to by redrawing the appropriate
  82. area of their windows.
  83.                                   
  84.  
  85. 2) When using in-place editing
  86.  
  87. All mouse clicks are passed to the remote, which will normally bring up its
  88. own menu in this case. See the file Remote_msg for details.
  89.  
  90.  
  91. Use in C programs
  92. =================
  93.  
  94. To use these applications you require the Acorn Toolbox modules. If you do
  95. not have these they are provided with the Virtualise demo available from
  96. Clares Web site at
  97.  
  98. http://www.stcoll.ac.uk/Clares/ 
  99.  
  100. The two application 'processor' and 'processed', demonstrate how PCAs can be
  101. written in C using Acorn's Toolbox. Not all the features of the protocol are
  102. used. 'Processed' does nothing in itself. It merely displays a sprite which
  103. can be modified by other PCA applications.  It also has a menu item which
  104. causes flex to move the memory containing the sprite. This demonstrates how
  105. to use the flex callback mechanism to notify linked applications of the
  106. move.
  107.  
  108. 'Processor' acts on sprites in other PCA applications. The sliders just
  109. alter the red and green components of pixels in the local. Not very useful,
  110. but it shows how addons can work.
  111.  
  112. Both applications use the virtual memory/dynamic area versions of flex,
  113. which is provided. They also use the sprite code from Risc_OsLib, which is
  114. also provided.
  115.  
  116.  
  117. Please not that these are not intended as models of how to write Toolbox
  118. code. They just show how the PCA protocols might me implemented in C.
  119.  
  120.  
  121.