User Guide
Advanced GUI Editing
Mouse Handling
This section describes how to handle mouse interaction using the Mouse components. With the introduction of the Ruby component you can
now also do this using Ruby code. For more details see the Interaction section in the Ruby Component chapter.
Mouse Area
In order to receive mouse messages in a part of your front panel you must first define a mouse area. This is done using the Mouse Area
component.
The example below shows how the right half of a module can be made to receive mouse messages. This is indicated by a change in cursor
as the mouse pointer passes over the mouse area.
Mouse Clicks
To trap mouse clicks on a mouse area you'll need a Mouse L-
Button Down component. Link the Mouse output connector on
the Mouse Area component to the input on the Mouse L-
Button Down component.
Whenever you click in the mouse area a trigger will be sent to
the Trigger output on the Mouse L-Button Down. The
coordinates of the click point (in grid squares) will be available from the two Float outputs.
Mouse Dragging
You can track the mouse position while the left mouse button is held down. This allows you to implement drag operations.
The component you need to do this is the Mouse Drag component. This takes Mouse messages at it's input and sends the coordinates to it's
two Float outputs as you drag.
92 of 212