Manual

Main User Interface Using the Mouse

# Using the Mouse

In uDraw(Graph) you can use the three buttons of the mouse this way:

- The left mouse button is used for selecting and moving items.
- The middle mouse button is used for 2D-scrolling and drag & drop.
- The right mouse button is used for pop-up menu operations.

If your mouse has only two buttons there are two possibilities. On the Windows® platform, the middle mouse button is simulated in uDraw(Graph) by keeping the CTRL-Key on the keyboard pressed while using the left mouse button. On the UNIX® and Linux® platform, you have to refer to the documentation of your X11TM environment to see how the middle mouse button is simulated (often this is done by pressing both mouse buttons simultaneously). If you have a wheel mouse with two visible buttons, you might check if the wheel can be pressed, because the wheel is often used as the middle mouse button.

Note: On Mac OS® X the standard mouse has only one button. This is the left mouse button described here. If you want to have access to the features described for the other mouse buttons, you have to install a 3-button mouse. We have noticed that middle and right mouse buttons are misbehaving for some products, because middle mouse button (or scrolling wheel) triggers the right mouse button event and the right mouse button triggers the middle mouse button event. For future releases we will try to have a better integration into Mac OS®, hopefully even for one button.

## Left Mouse Button

As usually, this mouse button is used for any kind of selection, activation, movement and for placing the text cursor. In the graph area of a uDraw(Graph) base window, this button is used to select nodes and edges. By holding the SHIFT key, more than one node can be selected at the same time, but only one edge, so selection of multiple edges is not available. After making a new selection, the old one is lost. Many nodes can be selected in one step by using rubber band selection. To do so, click on empty space in the graph area with the left mouse button and hold it. Then move the mouse by still pressing the button. You can see a moving rectangular area on the screen (rubber band). After releasing the mouse button, all nodes are selected which are completely inside this rectangle.

A user can extend or reduce the current selection by using the SHIFT key and the left mouse button simultaneously. With SHIFT-select, you add or remove a particular node from the set of currently selected nodes, depending on whether or not the node was selected before. In other words: With SHIFT, the old selection will not be lost after a new selection. SHIFT selection also works in combination with rubber band selection.

Fine-tuning of a graph layout also works with the left mouse button. Dragging a node (i.e. holding down the button while moving the mouse) can be used to place it at a new position, for example to customize the layout according to your own ideas.

## Middle Mouse Button (or equivalent operation with a 2-button mouse, see above)

Note: if you have only a 2-button mouse without emulation for the middle mouse button, then the functions of the middle mouse button are not directly available for you. But they are only accelerators for functions that can be accessed elsewhere, too. Namely you can scroll with the vertical and horizontal scrollbars of the base window. Instead of using drag & drop, you can achieve the same insertion operations with the menus, for example in the graph editor application.

The middle mouse button is used for moving and copying elements. You can usually use the button to move (i.e. scroll) the visible part of a graph area in a base window. As long as you press the middle mouse button anywhere in the graph area, the window will scroll in both dimensions at the same time when you move the mouse. This is called 2D-scrolling.

The optional drag & drop mode is also controlled with the middle mouse button. An application program connected to the uDraw(Graph) API (for example the graph editor delivered with the distribution) can activate the drag & drop mode. Afterwards, the 2D-scrolling is switched off and the middle mouse button is used for drag & drop operations, for example to connect two nodes with a new edge by dragging a line from one node to the other. This only works when an application program is connected to the API.

## Right Mouse Button

This mouse button is used for working with pop-up menus. By clicking with the right button in the graph area of a base window, the user is able to select an operation by browsing through menus and submenus and releasing the mouse button over the desired menu entry. For acceleration, the graph area has a built-in pop-up menu with some frequently used functions.

Pop-up menus can also be used by an application program connected to the API. Here, nodes and edges in a graph can have a special pop-up attribute where the menu is defined. This pop-up menu is displayed when the user selects the node or edge with the right mouse button. Instead of starting a built-in operation when the button is released over a menu entry, a callback information is sent back by the API to inform the application about the choice of the user. Then the application is free to decide what to do next, depending on the context and choice. When the right mouse button is pressed on a node or edge which does not have this special attribute (the default), the regular pop-up menu is displayed which is also available over free space of the base window.