This routine is used when mouse input is processed within a %gr drawing surface.
It remains local to the current drawing surface selected with
Mode 1 makes a box appear whenever the left mouse button is pressed. The corner
of the box will stay anchored to that point until the mouse button is released.
The other corner will follow the mouse cursor around the drawing surface
until the mouse button is released. By processing the mouse state and the
released information it is possible to determine the co-ordinates of the
Mode 2 is similar to mode 1 but a straight line joins the first point to the
second whilst the left mouse button is held down.
Mode 0 deactivates the box and line high-lighting mechanism. All the lines are
drawn on to and removed from the display with an XOR write which prevents the
destruction of any underlying graphics.
It is important to note that you should only call this routine once for each
line mode change required.