The Drag and Drop User Interface

To the user of an IDL program that supports drag and drop functionality, the activity of dragging and dropping conforms to platform guidelines. The user selects one or more nodes using the left mouse button and drags them while holding the mouse button down. When dragging a node, the cursor indicates where the drop is allowed (above, on, below) or not allowed. Optionally, the cursor can include a + symbol to indicate the different between copy and move operations.

Note
On Windows platforms, the cursor shows an opaque copy of the node under the mouse pointer, but does not show all selected nodes, even though they are selected and are dragged. On UNIX platforms, a cursor reflecting the active drag is all that is shown.

In addition to the default platform-specific drag and drop behavior, IDL tree widgets implement the following:

As the user drags the selected nodes, the drag and drop cursor changes to indicate whether a drop is allowed at the current position. The drag and drop cursor is displayed differently on different platforms:

Table 9-1: Platform-Specific Appearance of the Drag and Drop Cursor

Node
Placement
Windows
UNIX

Above

Horizontal line above target node

Arrow bent and pointed up

On

Target node highlighted

Straight arrow

Below

Horizontal line below target node

Arrow bent and pointed down

Not Allowed

Circle with slash through

Circle with slash through

Figure 9-2 shows the appearance of the drag and drop cursor when inserting a node (here named Leopard) after a node named Jaguar, but within the node category Spotted.

Figure 9-2: Inserting a Node After Another Node
in Windows (left) and Unix (right)

TWexample01.gif

Note
The IDL application ultimately controls which nodes to copy or move, where they are placed, and the destination tree's final state. For example, IDL may override the restoration of a previous selection and instead select newly copied nodes.