If you do not specify which figures you want to display when the SQ file is opened, SysQuake displays the first one. We will now dip into interactivity by allowing the user to move the tangent point and observe the tangent. Writing a mouse drag handler To enable the manipulation of a graphic element, a mouse drag handler must be declared under the same figure heading as the draw handler. The mouse drag handler is also a function defined in the function block. If you type the code above, you have a graphic where you can manipulate the vertical line with the mouse and see the tangent move.
Interactive manipulation is much easier if subtle hints about what can be manipulated are displayed.
Such hints include the shape of the cursor, which should be a finger only if a click permits the manipulation of an element, and messages in the status bar at the bottom of the window. The mouseover handler, which is called in Manipulate mode when the mouse is over a figure, gives this kind of information to SysQuake. The input arguments are similar to the mousedrag handler. In our case, it would be difficult to specify in a graphic the coefficients of the quadratic function. Let us add a menu entry which displays a dialog box where we can change the coefficients.