Algorithmic Solutions > LEDA > LEDA Guide > GraphWin > Interactive Interface

The GraphWin Interactive Interface

The interactive user interface of GraphWin is simple and intuitive. The best way to learn about it is to open a GraphWin and play around with it, e.g., by compiling and running the following simple program. It is also possible to customize the interactive interface.

#include <LEDA/graphics/graphwin.h>
	
int main()
{	
   leda::GraphWin gw;	
   gw.display(); gw.edit();

   return 0;
}
On the right you see a screenshot of the program after adding some nodes and edges. Clicking on the picture shows the Graphwin in original size.

Example GraphWin Interactive Interface

On this page we briefly describe the standard interactive interface of GraphWin. More details can be found in the LEDA Book.

Operations

  • Create a new node: Click on the background with the left mouse button.
  • Create a new edge:
    • Select source node of new edge: Click on a node with the left mouse button
    • Define target of edge: Next click with the left mouse button either on an existing node or on window background (creates a new node).
    • Bends: may be introduced using the middle mouse button before defining the target node.
    • Cancelling the creation of an edge: Click the right mouse button.
  • Move node: Select a node with the left mouse button, hold the button down, and drag the object by moving the cursor.
  • Move connected component: Press SHIFT key while dragging a node of the component.
  • Move entire graph: Select the background with left mouse button, hold button down, and move the mouse pointer.
  • Open a dialog box for setting and changing attributes: Double click on a node or edge .
For more information on the functionality of the middle and right mouse button have a look at the Help menu of GraphWin.

Menus

Here is a brief description of all buttons of the default menu of GraphWin.
  • File: A menu that offers file I/O operations for graphs in three different formats, allows to export drawings of graphs, print graphs, and contains the exit button.
  • Edit: A menu with panels for setting the (default) attributes of nodes and edges.
  • Graph: A menu that offers graph generators, modifiers, and checkers. There are generators for random, planar, complete, bipartite graphs ... The modifiers change the current graph, e.g., by removing or adding edges, to make it connected, biconnected, bidirected, ... The checkers can be used to check graph properties, like planarity, connectedness, ...
  • Layout: A menu that gives access to tools for simple layout manipulations, e.g., removing all edge bends or fitting the graph into a box or window, and a collection of graph drawing algorithms.
  • Window: A menu with (zoom) operations for changing the user space of the drawing window.
  • Options: A menu with various sub-panels for editing the window and editor parameters.
  • Help: A menu that explains the use of the mouse buttons and gives information about GraphWin.
  • Undo (<): A button to undo the last update operation.
  • Redo (>): A button to undo the last undo
  • Done: Button to leave GraphWin. (See also the description of the programming interface
  • .)

See also:

GraphWin

Customizing the Interactive Interface

Attributes and Parameters

Programming Interface


Graph Data Types

Graph Drawing Algorithms


Windows and Panels

Panel Buttons

Parameters


LEDA Book


Manual Pages:

Manual Page GraphWin

Manual Page Windows

Manual Page Graphs




Please send any suggestions, comments or questions to leda@algorithmic-solutions.com
© Copyright 2001-2003, Algorithmic Solutions Software GmbH