Binding for the daVinci graph visualization tool.
This library supports the visualization of graphs by the daVinci graph drawing tool through the following features:
For a correct installation of this library, the constant dvStartCmd
defined below must be correctly set to start your local installation
of DaVinci.
Author: Johannes Koj (with modifications by Michael Hanus)
Version: August 2003
dvDisplay
:: DvGraph -> IO ()
Displays a graph with daVinci and run the scheduler for handling events. |
dvDisplayInit
:: DvGraph -> (Port DvScheduleMsg -> Success) -> IO ()
Displays a graph with daVinci and run the scheduler for handling events after performing some initialization events. |
dvNewGraph
:: [DvNode] -> DvGraph
Constructs a new graph from a list of nodes. |
dvSimpleNode
:: DvId -> String -> (Port DvScheduleMsg -> Success) -> DvNode
A node without outgoing edges. |
dvNodeWithEdges
:: DvId -> String -> [DvEdge] -> (Port DvScheduleMsg -> Success) -> DvNode
A node with a list of outgoing edges. |
dvSimpleEdge
:: DvId -> DvId -> (Port DvScheduleMsg -> Success) -> DvEdge
An edge to a particular node. |
dvSetNodeColor
:: DvId -> String -> Port DvScheduleMsg -> Success
An event handler that sets the color (second argument) of a node. |
dvAddNode
:: DvId -> String -> (Port DvScheduleMsg -> Success) -> Port DvScheduleMsg -> Success
An event handler that adds a new node to the graph. |
dvSetEdgeColor
:: DvId -> String -> Port DvScheduleMsg -> Success
An event handler that sets the color (second argument) of an edge. |
dvAddEdge
:: DvId -> DvId -> DvId -> (Port DvScheduleMsg -> Success) -> Port DvScheduleMsg -> Success
An event handler that adds a new edge to the graph. |
dvDelEdge
:: DvId -> Port DvScheduleMsg -> Success
An event handler that deletes an existing edge from the graph. |
dvSetClickHandler
:: DvId -> (Port DvScheduleMsg -> Success) -> Port DvScheduleMsg -> Success
An event handler that changes the event handler of a node or edge. |
dvEmptyH
:: Port DvScheduleMsg -> Success
The "empty" event handler. |
Type synonym: DvWindow = Port DvScheduleMsg
The abstract datatype for identifying nodes in a graph. Used by the various functions to create and manipulate graphs.
Constructors:
The abstract datatype for graphs represented by daVinci.
Such graphs are constructed from a list of nodes by the
function dvNewGraph.
Constructors:
The abstract datatype for nodes in a graph represented by daVinci.
Nodes are constructed by the functions
dvSimpleNode and dvNodeWithEdges.
Constructors:
The abstract datatype for edges in a graph represented by daVinci.
Edges are constructed by the function dvSimpleEdge.
Constructors:
The abstract datatype for communicating with the daVinci
visualization tool. The constructors of this datatype
are not important since all communications are wrapped
in this library. The only relevant point is that
Port DvScheduleMsg -> Success
is the type of an event handler that can manipulate a graph
visualized by daVinci (see dvSetNodeColor,
dvAddNode etc).
Constructors:
|
Displays a graph with daVinci and run the scheduler for handling events.
|
|
Displays a graph with daVinci and run the scheduler for handling events after performing some initialization events.
|
|
Constructs a new graph from a list of nodes.
|
|
A node without outgoing edges.
Example call:
|
|
A node with a list of outgoing edges.
Example call:
|
|
An edge to a particular node.
Example call:
|
|
An event handler that sets the color (second argument) of a node.
|
|
An event handler that adds a new node to the graph.
|
|
An event handler that sets the color (second argument) of an edge.
|
|
An event handler that adds a new edge to the graph.
|
|
An event handler that deletes an existing edge from the graph.
|
|
An event handler that changes the event handler of a node or edge.
|
|
The "empty" event handler.
|