Module "DaVinci.curry"

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


 Exported names:

Datatypes:
DvEdge | DvGraph | DvId | DvNode | DvScheduleMsg | DvWindow

Functions:
dvAddEdge | dvAddNode | dvDelEdge | dvDisplay | dvDisplayInit | dvEmptyH | dvNewGraph | dvNodeWithEdges | dvSetClickHandler | dvSetEdgeColor | dvSetNodeColor | dvSimpleEdge | dvSimpleNode


 Summary of exported functions:

dvDisplay  :: DvGraph -> IO ()  deterministic 
          Displays a graph with daVinci and run the scheduler for handling events.
dvDisplayInit  :: DvGraph -> (Port DvScheduleMsg -> Success) -> IO ()  deterministic 
          Displays a graph with daVinci and run the scheduler for handling events after performing some initialization events.
dvNewGraph  :: [DvNode] -> DvGraph  deterministic 
          Constructs a new graph from a list of nodes.
dvSimpleNode  :: DvId -> String -> (Port DvScheduleMsg -> Success) -> DvNode  deterministic 
          A node without outgoing edges.
dvNodeWithEdges  :: DvId -> String -> [DvEdge] -> (Port DvScheduleMsg -> Success) -> DvNode  deterministic 
          A node with a list of outgoing edges.
dvSimpleEdge  :: DvId -> DvId -> (Port DvScheduleMsg -> Success) -> DvEdge  deterministic 
          An edge to a particular node.
dvSetNodeColor  :: DvId -> String -> Port DvScheduleMsg -> Success  deterministic 
          An event handler that sets the color (second argument) of a node.
dvAddNode  :: DvId -> String -> (Port DvScheduleMsg -> Success) -> Port DvScheduleMsg -> Success  deterministic 
          An event handler that adds a new node to the graph.
dvSetEdgeColor  :: DvId -> String -> Port DvScheduleMsg -> Success  deterministic 
          An event handler that sets the color (second argument) of an edge.
dvAddEdge  :: DvId -> DvId -> DvId -> (Port DvScheduleMsg -> Success) -> Port DvScheduleMsg -> Success  deterministic 
          An event handler that adds a new edge to the graph.
dvDelEdge  :: DvId -> Port DvScheduleMsg -> Success  deterministic 
          An event handler that deletes an existing edge from the graph.
dvSetClickHandler  :: DvId -> (Port DvScheduleMsg -> Success) -> Port DvScheduleMsg -> Success  deterministic flexible
          An event handler that changes the event handler of a node or edge.
dvEmptyH  :: Port DvScheduleMsg -> Success  deterministic 
          The "empty" event handler.

 Imported modules:

List
Ports
Prelude

 Exported datatypes:

DvWindow

Type synonym: DvWindow = Port DvScheduleMsg


DvId

The abstract datatype for identifying nodes in a graph. Used by the various functions to create and manipulate graphs.

Constructors:


DvGraph

The abstract datatype for graphs represented by daVinci. Such graphs are constructed from a list of nodes by the function dvNewGraph.

Constructors:


DvNode

The abstract datatype for nodes in a graph represented by daVinci. Nodes are constructed by the functions dvSimpleNode and dvNodeWithEdges.

Constructors:


DvEdge

The abstract datatype for edges in a graph represented by daVinci. Edges are constructed by the function dvSimpleEdge.

Constructors:


DvScheduleMsg

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:



 Exported functions:

dvDisplay :: DvGraph -> IO ()  deterministic 

Displays a graph with daVinci and run the scheduler for handling events.

Further infos:
  • might behave indeterministically

dvDisplayInit :: DvGraph -> (Port DvScheduleMsg -> Success) -> IO ()  deterministic 

Displays a graph with daVinci and run the scheduler for handling events after performing some initialization events.

Further infos:
  • might behave indeterministically

dvNewGraph :: [DvNode] -> DvGraph  deterministic 

Constructs a new graph from a list of nodes.

Further infos:
  • solution complete, i.e., able to compute all solutions

dvSimpleNode :: DvId -> String -> (Port DvScheduleMsg -> Success) -> DvNode  deterministic 

A node without outgoing edges.

Example call:  (dvSimpleNode node label clickH)

Parameters:
node - a graph identifier (usually: a free variable)
label - a label written at this node
clickH - an event hander to be executed whenver the user clicks on this node
Returns:
a new graph node
Further infos:
  • solution complete, i.e., able to compute all solutions

dvNodeWithEdges :: DvId -> String -> [DvEdge] -> (Port DvScheduleMsg -> Success) -> DvNode  deterministic 

A node with a list of outgoing edges.

Example call:  (dvNodeWithEdges node label edges clickH)

Parameters:
node - a graph identifier (usually: a free variable)
label - a label written at this node
edges - a list of outgoing edges
clickH - an event hander to be executed whenver the user clicks on this node
Returns:
a new graph node
Further infos:
  • solution complete, i.e., able to compute all solutions

dvSimpleEdge :: DvId -> DvId -> (Port DvScheduleMsg -> Success) -> DvEdge  deterministic 

An edge to a particular node.

Example call:  (dvSimpleEdge edge node clickH)

Parameters:
edge - a graph identifier for this edge (usually: a free variable)
node - a graph identifier of the target node
clickH - an event hander to be executed whenver the user clicks on this edge
Returns:
a new graph edge

dvSetNodeColor :: DvId -> String -> Port DvScheduleMsg -> Success  deterministic 

An event handler that sets the color (second argument) of a node.

Further infos:
  • might behave indeterministically

dvAddNode :: DvId -> String -> (Port DvScheduleMsg -> Success) -> Port DvScheduleMsg -> Success  deterministic 

An event handler that adds a new node to the graph.

Further infos:
  • might behave indeterministically

dvSetEdgeColor :: DvId -> String -> Port DvScheduleMsg -> Success  deterministic 

An event handler that sets the color (second argument) of an edge.

Further infos:
  • might behave indeterministically

dvAddEdge :: DvId -> DvId -> DvId -> (Port DvScheduleMsg -> Success) -> Port DvScheduleMsg -> Success  deterministic 

An event handler that adds a new edge to the graph.

Further infos:
  • might behave indeterministically

dvDelEdge :: DvId -> Port DvScheduleMsg -> Success  deterministic 

An event handler that deletes an existing edge from the graph.

Further infos:
  • might behave indeterministically

dvSetClickHandler :: DvId -> (Port DvScheduleMsg -> Success) -> Port DvScheduleMsg -> Success  deterministic flexible

An event handler that changes the event handler of a node or edge.

Further infos:
  • might behave indeterministically

dvEmptyH :: Port DvScheduleMsg -> Success  deterministic 

The "empty" event handler.

Further infos:
  • solution complete, i.e., able to compute all solutions


Generated by CurryDoc (Version 0.4.1 of June 7, 2007) at Jun 16 17:09:14 2009