The main purpose of this demo is to show how an OS can communicate with
an RTD application. There are 2 buttons within the OS panel
panrtd2Os.pan. One for drawing a slit and another one for
centering an object into the slit. Both send a SCRIPT command
to the RTD application 'panrtd2'. 'panrtd2' will receive this
command because it's previous initialization with the
'seq_ccsAsyncInput open' call.

The SCRIPT command calls a procedure 'docmd' which in turn calls the
'panrtd2Image::cmdAsync' method. Within this method we have access
to all member functions, private variables etc. of the 'panrtd2Image'
class.

You can see that 'panrtd2Image::cmdAsync' returns the result immediately
when the SLIT (i.e. draw the slit) command was given.
It uses the proc 'set_result'.

If the command TOSLIT was given then method 'panrtd2Image::objectSelect'
installes a callback which is called when the user has clicked
on the object. The procedure 'docmd' waits (tkwait) until the
result was set via 'set_result' from the 'panrtd2Image::objectDone'
method. The tkwait is necessary since the reply is sent when the
proc 'docmd' returns.

The result of TOSLIT are the pixel coordinates from(x,y), to(x,y).
The OS panel would typically send these coordinates to the
OS server. The OS server would then convert them to a telescope
offset (ra, dec) and send the offset command to tif. One of the next
images displayed in the RTD (provided that it is attached to
the CCD) would then show the object centered into the slit.

The application 'panrtd2' shows also
o how to include a zoom and pan window with the panel editor. Since
  both windows need the RtdImage object name they cannot be built with
  the panel editor. Instead we create class frames and create and pack
  them 'manually'.
o RtdImage.tcl uses the CanvasDraw class when the option -graphics was
  set. Since some more methods are to be added to this class we set
  with the panel editor the -graphics option to zero and create the
  draw object during initialization.
