!ResTest
-=-=-=-=

How To Use !ResTest 
-------------------

It might be handy to read the specs of ResEd to get a better idea of some of
the concepts I will be talking about..!

!ResTest is loaded in the normal way, i.e. double clicking on its icon. After
that it will sit on the iconbar waiting...

With no resource files loaded you can only perform limited functionality,
that is to say you can do the usual Info and quit from the menu on the
iconbar, and by clicking with select will open the event log window, more of
which later.

To perform toolbox related things you must first load a resource file, this
is done in the normal way. All objects that have the auto-create flag set
will be created and all objects that have the auto-show flag set as well will
be shown.

From the iconbar menu you can now create objects from the create sub-menu,
this provides a list of template names that can be created. Clicking on
select will create the given object and close the menu, clicking with adjust
will create the object and leave the sub-menu open.

The show sub-menu provides a list of toolbox objects in the form
<object_id>:"template_name" if they are currently being displayed then they
will have a tick beside their entry. clicking with select on a given entry
will toggle the state of that object, so if an object is being shown it will
be hidden and vice versa. The adjust button allows the user to show objects
with menu semantics. This means that clicking with adjust will not keep the
menu tree open

The delete sub-menu provides a list of toolbox objects in the form
<object_id>:"template_name", as with the show sub-menu, selecting one of the
entries will recursively delete the given toolbox object, in other words all
objects related to the first will also be deleted, again the adjust button
acts in the same way as the select button when using this sub-menu.

By opening the 'ResTest event log' window, clicking with select on the
iconbar, The user can see the toolbox events being returned to the client
application. The log window attempts to behave in a similar way as a frontend
text window in the way in which it deals with text displaying, that is if
your scroll bar is at the bottom when a new event arrives the window is
scrolled and the text is displayed, however if the scroll bar isn't at the
bottom then the view on the text will remain the same.

If a sprite file is dragged to !ResTest it will be iconsprite'd and the user
will be informed via the log window.

Advanced use
------------

During development work it was decided that object templates whose names
start with an underscore are 'private' to an object modules and therefore
cannot be shown in the list of objects which the user can control.

However, during development work it is obviously important to be able to see
these objects so by altering the !Run file in the following way private
objects can be viewed. This may however cause problems as far deleting
objects is concerned. You have been warned.

Change the line:

Run <ResTest$Dir>.!RunImage

to 

Run <ResTest$Dir>.!RunImage -private

TBlockMess
----------

This file provides a generic means of decoding the event block returned from
a toolbox event, it has the following format:

E44ec0 "Error number  = %x" 4 2

where:
E44ec0  is the hex number of the event (in this case toolbox error) 

"Error number  = %x" is a printf style string to be displayed when this event
                     happens
                     
4 means at the 4th word into the event block you will find the data
2 means that you should use the contents of this addres so in this case
  a hex value
  
Another eaxmple would be:

E44ec0 "Error message = %s" 5 1

which means print the string at the 5th word and treat the value as an
address.
