[Contents] [Intro] [Reference] [Tutorial] [Questions [New [Index]
Overview -> Reference -> Graph Editor Application

Graph Editor Application

The graph editor is an interactive tool to modify an existing graph or to build a new graph from scratch. With the editor, the user is able to create new nodes/edges, delete existing nodes/edges, modify the attributes of node/edges, and so on.

The editor is not an independent program with a separate user interface. Instead, it is a GUI-less application which communicates with daVinci by using the API. From a users point of view, all graph manipulation is done inside the daVinci base window. To access the graph manipulation functions, the editor adds some extra menus, icons and dialogs to the daVinci user interface. Technically, daVinci and the editor are two individual processes with different responsibilities: the editor has its own graph data structure, it controls and manipulates this graph depending on menu events and sends the current graph back to daVinci for visualization after each update. So the structure of the graph in daVinci is never manipulated directly, only the application (i.e. the graph editor in this case) is able to do so. You can read more about daVinci applications in the API reference.

Please refer to the graph editor tutorial to learn how to use the graph editor.

Starting the Graph Editor

Before editing a graph, you have to connect the editor to the daVinci API. This can be done in daVinci at runtime with menu File/Connect Application.... Simply navigate with the file browser and select the graph editor binary grapheditor in directory daVinci_V2.1/grapheditor of the daVinci distribution. Note: If you do not know where daVinci is installed on your computer, type echo $DAVINCIHOME in a UNIX shell to display the location.

Another way to connect the graph editor is by starting daVinci and the editor at the same time by calling daVinci with commandline option -graphedit.

Using the Graph Editor

The graph editor application is some kind of "plug-in" to extend daVinci's basic functionality. To access the editing functions, the graph editor adds some extra menus to the daVinci user interface which are attached to the Edit menu. There you can find menu operations to manipulate the nodes and edges of a currently loaded graph, see below. For more convenience, the editor adds some icons to the daVinci icon bar to provide short-cuts for the most frequently used editing operations, see below.

The graph editor is able to edit several graphs at a time by using the multi-graph mode of daVinci. Please choose menu File/New to open a window for a new graph.

For a basic introduction, you can also read the section about the graph editor in the tutorial.

Menu Edit/Node

[Menu

This menu contains operations to manipulate the nodes of a graph, i.e. inserting nodes, deleting nodes and modifying node attributes.

Note: Menus can also be used mouseless with keyboard commands.

Menu Edit/Edge

[Menu

This menu contains operations to manipulate the edges of a graph, i.e. inserting edges, deleting edges and modifying edge attributes.

Note: Menus can also be used mouseless with keyboard commands.

Menu Edit/Toggle Drag & Drop

This operation toggles the Drag and Drop state of the current base window. The current state is written right to the graph editor version number in the status bar of the base window.

Node Popup-Menu

[Node

This menu can be accessed, if the mouse button BMenu is pressed over a node in the grapheditor.

Edge Popup-Menu

[Edge

This menu can be accessed, if the mouse button BMenu is pressed over an edgee in the grapheditor.

File Operations

To load and save a graph in the graph editor, simply use daVinci's menus File/Open... and File/Save As.... The graph editor application takes advantage of an API feature and controls daVinci's File menu to do its own I/O.

Graph Editor Icons on the Icon Bar

The graph editor icons appear on the icon bar of the daVinci
base window. To switch between the usual daVinci icons and the graph editor icons, simply click on the arrow (, ) in the lower part of the icon bar. These icons are short-cuts for the most frequently used menu operations of the graph editor, so pressing an icon is the same as selecting the corresponding menu operation which are described above. The following list shows the available icons and the corresponding menu operations. Edit/Node/Insert {Root | Child} (inserts root if no node is selected, child otherwise)
Edit/Node/Delete Node
Edit/Node/Attributes...
Edit/Edge/Insert Edge
Edit/Edge/Delete Edge
Edit/Edge/Attributes...
Edit/Toggle Drag & Drop

Drag and Drop in the grapheditor

The graph editor uses the Drag and Drop feature of daVinci to directly manipulate the graph. It is possible to
You can switch of Drag and Drop with the menu Edit/Toggle Drag & Drop or with the corresponding icon. The graph editor indicates, if drag and drop is switched on in the footer area of daVinci.

Observing the communication between daVinci and the grapheditor

In former graph editor versions, there was a secret option we have given away to some users of daVinci. This option has been removed from the graph editor in the current version. But you can still have a look at the communication by using the
command-line option -log of daVinci.


daVinci V2.1 Online Documentation - Page update: June 15, 1998