home *** CD-ROM | disk | FTP | other *** search
- How to test:
- ============
-
- Read the file 'intro' for an explanation of the terms 'local' and 'remote'.
-
- Load at least two copies of !Spaint (more if you like).
-
- Load a 24 bit sprite into one copy of !SPaint by dragging to the iconbar
- icon. A window opens with three icons attached. These are from top down:
-
- o Close window
- o Information - does nothing
- o Utils - opens up a list of PCA Compliant applications
-
- Click on the Utils icon in the toolbar attached to the window. This will
- construct a dialogue of the PCA compatible programs which are running that
- can do something to the sprite in question.
-
- Choose one of these to link it to the 'Local' image.
-
- A Toolbar with three icons pops up at the bottom of the window. The icons
- from left to right are:
-
- o De-link Remote application
- o Pop up Colour Picker
- o Third icon is for show only - does nothing
-
- Select a colour and paint into the window with the mouse.
-
- Clicking MENU also pops up the colour picker.
-
- The above is an example of 'in-place' editing where the second application
- ('remote') is providing tools that work on the 'Local' window.
-
- Non In-Place editing
- ====================
-
- Load one copy of !SPaint and one copy of !Processed.
-
- Click on the Processed icon on the icon bar; press Menu over the window and
- untick the 'Accept in place' menu item.
-
- Menu again and go off the Utilities menu and select Simple Paint.
-
- This opens another window with the same image and the toolbar attached to
- the new window.
-
- Editing in this 'Remote' window modifies the image in both windows.
-
- Try also:
- =========
-
- 1) Load !Processor bring up the Utilities menu on Processed and select the
- Tool item. Click on the Processor icon and use the sliders by clicking into
- them. This updates both images.
-
- 2) Linking more than one copy of !Spaint into the same image and painting in
- different copies.
-
- 3) Dragging a different sprite into the local image window.
-
- 4) Quitting the copy of !Spaint containing the local image.
-
-
- What happens when you click menu in the 'local' window?
- -------------------------------------------------------
-
- There are two cases
-
- 1) When not using in-place editing
-
- When you click the local copy of Spaint it broadcasts Message_WhosAbout with
- the filetype of the selected object and its address. The other PCA programs
- running spot this message and respond with Message_ImHere which the Local
- uses to build the dialogue box.
-
- When the user selects an item it sends a Message_DoYourStuff message to the
- task which added the dialogue item.
-
- When the user paints in the window Spaint broadcasts Message_UpdateArea which
- the other programs using the object respond to by redrawing the appropriate
- area of their windows.
-
-
- 2) When using in-place editing
-
- All mouse clicks are passed to the remote, which will normally bring up its
- own menu in this case. See the file Remote_msg for details.
-
-
- Use in C programs
- =================
-
- To use these applications you require the Acorn Toolbox modules. If you do
- not have these they are provided with the Virtualise demo available from
- Clares Web site at
-
- http://www.stcoll.ac.uk/Clares/
-
- The two application 'processor' and 'processed', demonstrate how PCAs can be
- written in C using Acorn's Toolbox. Not all the features of the protocol are
- used. 'Processed' does nothing in itself. It merely displays a sprite which
- can be modified by other PCA applications. It also has a menu item which
- causes flex to move the memory containing the sprite. This demonstrates how
- to use the flex callback mechanism to notify linked applications of the
- move.
-
- 'Processor' acts on sprites in other PCA applications. The sliders just
- alter the red and green components of pixels in the local. Not very useful,
- but it shows how addons can work.
-
- Both applications use the virtual memory/dynamic area versions of flex,
- which is provided. They also use the sprite code from Risc_OsLib, which is
- also provided.
-
-
- Please not that these are not intended as models of how to write Toolbox
- code. They just show how the PCA protocols might me implemented in C.
-
-
-