Safe Haskell | None |
---|---|
Language | Haskell2010 |
In UniForM we need ways of displaying typed directed graphs. In the original UniForM, it was only possible to use the DaVinci encapsulation for displaying directed graphs. While this is very good, in the new UniForM it is intended to factor out this encapsulation so that it will not be too difficult to replace DaVinci by other graph-drawing package (or variants of DaVinci) for particular graphs. Example alternatives that might be considered: (1) some sort of text-only interface. (2) Windows-style displaying of a tree structure using clickable folders. In this module we present the classes that any such "graph-drawing package" is supposed to implement.
This module is in two parts.
The first part contains the "user-friendly" versions of the functions. For these, it is assumed (as will usually be the case) that there is only one node/nodeType/arc/arcType around for a particular graph. The whole lot is indexed by the GraphAll, which contains ALL the functionality required for accessing the graphs (apart from configuration options). For example, the only daVinci-specific thing you should need to use to write a program which calls daVinci will be the daVinciSort variable.
The second part contains the "user-hateful" versions. All the user-hateful functions have names ending in "Prim". Graph display implementations only have to implement the user-hateful versions. The user-hateful versions should only be of interest to other people if the graph display provides more than one implementation of the NodeClass, NodeTypeClass (or whatever) implementation. One disadvantage to the user of using the user-hateful versions of the functions is that because of all the overloading, you have to put in lots of explicit types, or else get the most hideous type errors.
Configuring things like graph titles, shape of node boxes, menus, and so on should also be implemented, where possible, by graph display interfaces. The various options are documented in GraphConfigure.hs. They should be applied using the Computation.HasConfig interface.
The types which are supposed in various combinations to be instances of the classes are as follows:
graph. This corresponds to one graph display. graphConfig. This is configuration information for a graph. This might be a window title or size for example. graphParms. This is a collection of graphConfig's used to construct a graph.
Nodes and arcs carry values. Thus all the following carry
a type parameter. But, for ease of implementation with, for example,
DaVinci, the type parameter is required to be an instance of Typeable
.
- node. A value of this type is an actual node in a graph.
(Will be an instance of
Typeable
viaTypeable
.) - nodeType. Nodes are created with a particular UniForM "type" which is a Haskell value of type nodetype. In fact a graph might conceivably have multiply Haskell types corresponding to node and nodeType, meaning that nodes, or their UniForM types, will be distinguished additionally by the Haskell type system.
- nodeTypeConfig. Configuration information for a nodeType. This might include how a node with this type is to be displayed graphically. This also includes information on what to do when the node is clicked.
- nodeTypeParms. A collection of nodeTypeConfig's used to construct a nodeType
Similar constructions for arcs . . . arc. arcType. arcTypeConfig. arcTypeParms.
There are quite a lot of classes. This is partly because of the need to have a separate class for each subset of the type variables which is actually used in the type of a function.
This file is fairly repetitive, mainly because of the need to repeat the configuration machinery over and over again.
The functionality provided in this file is inspired by that provided by DaVinci. However we extend it by allowing nodes to have labels.
This file should be read in conjunction with GraphConfigure, which contains various configuration options to be used for graph objects.
Additional Notes ----------------
- At the end of a program using a GraphDisp instance,
shutdown
should be called. For example, in the case of the DaVinci instance this is required to get rid of the DaVinci and HTk processes. - It is more cumbersome writing the Graph Editor than I would like because the menu code doesn't give you direct access to the node or arc type. Unfortunately doing this would make the classes in this file even more complicated than they are now.
Synopsis
- newtype GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms = Graph graph
- newGraph :: GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> graphParms -> IO (Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms)
- redraw :: GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> IO ()
- getMultipleNodes :: GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> (Event (WrappedNode node) -> IO a) -> IO a
- class GraphParms graphParms where
- emptyGraphParms :: graphParms
- newNode :: (GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms, Typeable value) => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> nodeType value -> value -> IO (node value)
- setNodeType :: (GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms, Typeable value) => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> node value -> nodeType value -> IO ()
- deleteNode :: (GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms, Typeable value) => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> node value -> IO ()
- setNodeFocus :: (GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms, Typeable value) => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> node value -> IO ()
- getNodeValue :: (GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms, Typeable value) => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> node value -> IO value
- setNodeValue :: (GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms, Typeable value) => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> node value -> value -> IO ()
- newNodeType :: (GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms, Typeable value) => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> nodeTypeParms value -> IO (nodeType value)
- class NodeTypeParms nodeTypeParms where
- emptyNodeTypeParms :: Typeable value => nodeTypeParms value
- coMapNodeTypeParms :: (Typeable value1, Typeable value2) => (value2 -> value1) -> nodeTypeParms value1 -> nodeTypeParms value2
- newArc :: (GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms, Typeable value, Typeable nodeFromValue, Typeable nodeToValue) => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> arcType value -> value -> node nodeFromValue -> node nodeToValue -> IO (arc value)
- data WrappedNode node = forall value.Typeable value => WrappedNode (node value)
- newArcListDrawer :: (GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms, Typeable value, Typeable nodeFromValue) => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> node nodeFromValue -> ListDrawer (arcType value, value, WrappedNode node) (arc value)
- deleteArc :: (GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms, Typeable value) => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> arc value -> IO ()
- setArcValue :: (GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms, Typeable value) => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> arc value -> value -> IO ()
- setArcType :: (GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms, Typeable value) => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> arc value -> arcType value -> IO ()
- getArcValue :: (GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms, Typeable value) => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> arc value -> IO value
- newArcType :: (GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms, Typeable value) => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> arcTypeParms value -> IO (arcType value)
- class ArcTypeParms arcTypeParms where
- emptyArcTypeParms :: Typeable value => arcTypeParms value
- invisibleArcTypeParms :: Typeable value => arcTypeParms value
- coMapArcTypeParms :: (Typeable value1, Typeable value2) => (value2 -> value1) -> arcTypeParms value1 -> arcTypeParms value2
- class Eq1 takesParm where
- class Eq1 takesParm => Ord1 takesParm where
- class (GraphClass graph, NewGraph graph graphParms, GraphParms graphParms, NewNode graph node nodeType, DeleteNode graph node, SetNodeFocus graph node, NodeClass node, Typeable node, NodeTypeClass nodeType, NewNodeType graph nodeType nodeTypeParms, NodeTypeParms nodeTypeParms, NewArc graph node node arc arcType, SetArcType graph arc arcType, DeleteArc graph arc, ArcClass arc, Typeable arc, ArcTypeClass arcType, NewArcType graph arcType arcTypeParms) => GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms where
- displaySort :: Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms
- class (Destructible graph, Ord graph, Typeable graph, HasDelayer graph) => GraphClass graph where
- redrawPrim :: graph -> IO ()
- class (GraphClass graph, GraphParms graphParms) => NewGraph graph graphParms where
- newGraphPrim :: graphParms -> IO graph
- class GraphConfig graphConfig
- class (GraphClass graph, NodeClass node, NodeTypeClass nodeType) => NewNode graph node nodeType where
- newNodePrim :: Typeable value => graph -> nodeType value -> value -> IO (node value)
- setNodeTypePrim :: Typeable value => graph -> node value -> nodeType value -> IO ()
- class (GraphClass graph, NodeClass node) => DeleteNode graph node where
- deleteNodePrim :: Typeable value => graph -> node value -> IO ()
- getNodeValuePrim :: Typeable value => graph -> node value -> IO value
- setNodeValuePrim :: Typeable value => graph -> node value -> value -> IO ()
- getMultipleNodesPrim :: graph -> (Event (WrappedNode node) -> IO a) -> IO a
- class (GraphClass graph, NodeClass node) => SetNodeFocus graph node where
- setNodeFocusPrim :: Typeable value => graph -> node value -> IO ()
- class (Typeable node, Ord1 node) => NodeClass node
- class Typeable (nodeType :: * -> *) => NodeTypeClass nodeType
- class (GraphClass graph, NodeTypeClass nodeType, NodeTypeParms nodeTypeParms) => NewNodeType graph nodeType nodeTypeParms where
- newNodeTypePrim :: Typeable value => graph -> nodeTypeParms value -> IO (nodeType value)
- class Kind1 nodeTypeConfig => NodeTypeConfig nodeTypeConfig
- class (GraphClass graph, NodeClass nodeFrom, NodeClass nodeTo, ArcClass arc, ArcTypeClass arcType) => NewArc graph nodeFrom nodeTo arc arcType where
- newArcPrim :: (Typeable value, Typeable nodeFromValue, Typeable nodeToValue) => graph -> arcType value -> value -> nodeFrom nodeFromValue -> nodeTo nodeToValue -> IO (arc value)
- newArcListDrawerPrim :: (Typeable value, Typeable nodeFromValue) => graph -> nodeFrom nodeFromValue -> ListDrawer (arcType value, value, WrappedNode nodeTo) (arc value)
- class (ArcClass arc, ArcTypeClass arcType) => SetArcType graph arc arcType where
- setArcTypePrim :: Typeable value => graph -> arc value -> arcType value -> IO ()
- class (GraphClass graph, ArcClass arc) => DeleteArc graph arc where
- deleteArcPrim :: Typeable value => graph -> arc value -> IO ()
- setArcValuePrim :: Typeable value => graph -> arc value -> value -> IO ()
- getArcValuePrim :: Typeable value => graph -> arc value -> IO value
- class (Typeable arc, Ord1 arc) => ArcClass arc
- class (Typeable arcType, Ord1 arcType) => ArcTypeClass arcType where
- invisibleArcType :: Typeable value => arcType value
- class (GraphClass graph, ArcTypeClass arcType, ArcTypeParms arcTypeParms) => NewArcType graph arcType arcTypeParms where
- newArcTypePrim :: Typeable value => graph -> arcTypeParms value -> IO (arcType value)
- class Kind1 arcTypeConfig => ArcTypeConfig arcTypeConfig
User-Friendly Interface.
You should not need any more than this for drawing graphs.
newtype GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms Source #
The graph implementation will provide a value of this type to
get you started. For example, for daVinci this is called daVinciSort
.
However you then need to use it as an argument to newGraph
to construct
the actual graph.
Graph graph |
Instances
Eq graph => Eq (Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms) Source # | |
Defined in Graphs.GraphDisp (==) :: Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> Bool # (/=) :: Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> Bool # | |
Ord graph => Ord (Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms) Source # | |
Defined in Graphs.GraphDisp compare :: Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> Ordering # (<) :: Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> Bool # (<=) :: Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> Bool # (>) :: Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> Bool # (>=) :: Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> Bool # max :: Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms # min :: Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms # | |
GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms => Destroyable (Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms) Source # | |
Defined in Graphs.GraphDisp | |
GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms => Destructible (Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms) Source # | |
Defined in Graphs.GraphDisp | |
GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms => HasDelayer (Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms) Source # | |
Defined in Graphs.GraphDisp |
newGraph :: GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> graphParms -> IO (Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms) Source #
Construct a new graph. The input value will be something like
DaVinciGraph's value daVinciSort
; the resulting graph will be
returned.
redraw :: GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> IO () Source #
Redraw the graph. This is needed when you want to show updates.
getMultipleNodes :: GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> (Event (WrappedNode node) -> IO a) -> IO a Source #
Take over all interaction on the graph, and perform the given action, supplying it with an event which is activated when the user double-clicks a node. This is helpful when you need an interaction selecting several nodes.
class GraphParms graphParms where Source #
emptyGraphParms :: graphParms Source #
newNode :: (GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms, Typeable value) => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> nodeType value -> value -> IO (node value) Source #
construct a new node.
setNodeType :: (GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms, Typeable value) => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> node value -> nodeType value -> IO () Source #
set a node's type
deleteNode :: (GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms, Typeable value) => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> node value -> IO () Source #
delete a node
setNodeFocus :: (GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms, Typeable value) => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> node value -> IO () Source #
getNodeValue :: (GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms, Typeable value) => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> node value -> IO value Source #
get the value associated with a node
setNodeValue :: (GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms, Typeable value) => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> node value -> value -> IO () Source #
set the value associated with a node.
newNodeType :: (GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms, Typeable value) => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> nodeTypeParms value -> IO (nodeType value) Source #
construct a node type.
class NodeTypeParms nodeTypeParms where Source #
emptyNodeTypeParms :: Typeable value => nodeTypeParms value Source #
coMapNodeTypeParms :: (Typeable value1, Typeable value2) => (value2 -> value1) -> nodeTypeParms value1 -> nodeTypeParms value2 Source #
newArc :: (GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms, Typeable value, Typeable nodeFromValue, Typeable nodeToValue) => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> arcType value -> value -> node nodeFromValue -> node nodeToValue -> IO (arc value) Source #
construct a new arc.
data WrappedNode node Source #
forall value.Typeable value => WrappedNode (node value) |
newArcListDrawer :: (GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms, Typeable value, Typeable nodeFromValue) => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> node nodeFromValue -> ListDrawer (arcType value, value, WrappedNode node) (arc value) Source #
Given a node, construct a ListDrawer
which can be used as a way
of drawing ordered sets of out-arcs from that node.
(NB. At the moment daVinci does not do this properly, but that is
daVinci's fault, not mine.)
deleteArc :: (GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms, Typeable value) => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> arc value -> IO () Source #
delete an arc
setArcValue :: (GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms, Typeable value) => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> arc value -> value -> IO () Source #
set the value associated with an arc
setArcType :: (GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms, Typeable value) => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> arc value -> arcType value -> IO () Source #
getArcValue :: (GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms, Typeable value) => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> arc value -> IO value Source #
get the value associated with an arc
newArcType :: (GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms, Typeable value) => Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms -> arcTypeParms value -> IO (arcType value) Source #
create a new arc type
class ArcTypeParms arcTypeParms where Source #
emptyArcTypeParms :: Typeable value => arcTypeParms value Source #
invisibleArcTypeParms :: Typeable value => arcTypeParms value Source #
coMapArcTypeParms :: (Typeable value1, Typeable value2) => (value2 -> value1) -> arcTypeParms value1 -> arcTypeParms value2 Source #
User-Hateful Interface
This is only needed by people wanting to implement new implementations of the interface.
class (GraphClass graph, NewGraph graph graphParms, GraphParms graphParms, NewNode graph node nodeType, DeleteNode graph node, SetNodeFocus graph node, NodeClass node, Typeable node, NodeTypeClass nodeType, NewNodeType graph nodeType nodeTypeParms, NodeTypeParms nodeTypeParms, NewArc graph node node arc arcType, SetArcType graph arc arcType, DeleteArc graph arc, ArcClass arc, Typeable arc, ArcTypeClass arcType, NewArcType graph arcType arcTypeParms) => GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms where Source #
displaySort :: Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms Source #
Instances
(GraphClass graph, NewGraph graph graphParms, GraphParms graphParms, NewNode graph node nodeType, DeleteNode graph node, SetNodeFocus graph node, NodeClass node, NodeTypeClass nodeType, NewNodeType graph nodeType nodeTypeParms, NodeTypeParms nodeTypeParms, NewArc graph node node arc arcType, SetArcType graph arc arcType, DeleteArc graph arc, ArcClass arc, ArcTypeClass arcType, NewArcType graph arcType arcTypeParms) => GraphAll graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms Source # | |
Defined in Graphs.GraphDisp displaySort :: Graph graph graphParms node nodeType nodeTypeParms arc arcType arcTypeParms Source # |
class (Destructible graph, Ord graph, Typeable graph, HasDelayer graph) => GraphClass graph where Source #
redrawPrim :: graph -> IO () Source #
class (GraphClass graph, GraphParms graphParms) => NewGraph graph graphParms where Source #
newGraphPrim :: graphParms -> IO graph Source #
class GraphConfig graphConfig Source #
Instances
GraphConfig Delayer Source # | Allows the user to specify a |
Defined in Graphs.GraphConfigure | |
GraphConfig ActionWrapper Source # | |
Defined in Graphs.GraphConfigure | |
GraphConfig Orientation Source # | |
Defined in Graphs.GraphConfigure | |
GraphConfig FileMenuAct Source # | |
Defined in Graphs.GraphConfigure | |
GraphConfig AllowClose Source # | |
Defined in Graphs.GraphConfigure | |
GraphConfig AllowDragging Source # | |
Defined in Graphs.GraphConfigure | |
GraphConfig SurveyView Source # | |
Defined in Graphs.GraphConfigure | |
GraphConfig OptimiseLayout Source # | |
Defined in Graphs.GraphConfigure | |
GraphConfig GraphGesture Source # | |
Defined in Graphs.GraphConfigure | |
GraphConfig GraphTitle Source # | |
Defined in Graphs.GraphConfigure | |
GraphConfig GlobalMenu Source # | |
Defined in Graphs.GraphConfigure | |
GraphConfig (SimpleSource GraphTitle) Source # | |
Defined in Graphs.GraphConfigure |
class (GraphClass graph, NodeClass node, NodeTypeClass nodeType) => NewNode graph node nodeType where Source #
newNodePrim :: Typeable value => graph -> nodeType value -> value -> IO (node value) Source #
setNodeTypePrim :: Typeable value => graph -> node value -> nodeType value -> IO () Source #
class (GraphClass graph, NodeClass node) => DeleteNode graph node where Source #
deleteNodePrim :: Typeable value => graph -> node value -> IO () Source #
getNodeValuePrim :: Typeable value => graph -> node value -> IO value Source #
setNodeValuePrim :: Typeable value => graph -> node value -> value -> IO () Source #
getMultipleNodesPrim :: graph -> (Event (WrappedNode node) -> IO a) -> IO a Source #
class (GraphClass graph, NodeClass node) => SetNodeFocus graph node where Source #
setNodeFocusPrim :: Typeable value => graph -> node value -> IO () Source #
class Typeable (nodeType :: * -> *) => NodeTypeClass nodeType Source #
class (GraphClass graph, NodeTypeClass nodeType, NodeTypeParms nodeTypeParms) => NewNodeType graph nodeType nodeTypeParms where Source #
newNodeTypePrim :: Typeable value => graph -> nodeTypeParms value -> IO (nodeType value) Source #
class Kind1 nodeTypeConfig => NodeTypeConfig nodeTypeConfig Source #
Instances
NodeTypeConfig FontStyleSource Source # | |
Defined in Graphs.GraphConfigure | |
NodeTypeConfig BorderSource Source # | |
Defined in Graphs.GraphConfigure | |
NodeTypeConfig Color Source # | |
Defined in Graphs.GraphConfigure | |
NodeTypeConfig Shape Source # | |
Defined in Graphs.GraphConfigure | |
NodeTypeConfig DoubleClickAction Source # | |
Defined in Graphs.GraphConfigure | |
NodeTypeConfig NodeDragAndDrop Source # | |
Defined in Graphs.GraphConfigure | |
NodeTypeConfig NodeGesture Source # | |
Defined in Graphs.GraphConfigure | |
NodeTypeConfig ValueTitleSource Source # | |
Defined in Graphs.GraphConfigure | |
NodeTypeConfig ValueTitle Source # | |
Defined in Graphs.GraphConfigure | |
NodeTypeConfig LocalMenu Source # | |
Defined in Graphs.GraphConfigure |
class (GraphClass graph, NodeClass nodeFrom, NodeClass nodeTo, ArcClass arc, ArcTypeClass arcType) => NewArc graph nodeFrom nodeTo arc arcType where Source #
newArcPrim :: (Typeable value, Typeable nodeFromValue, Typeable nodeToValue) => graph -> arcType value -> value -> nodeFrom nodeFromValue -> nodeTo nodeToValue -> IO (arc value) Source #
newArcListDrawerPrim :: (Typeable value, Typeable nodeFromValue) => graph -> nodeFrom nodeFromValue -> ListDrawer (arcType value, value, WrappedNode nodeTo) (arc value) Source #
class (ArcClass arc, ArcTypeClass arcType) => SetArcType graph arc arcType where Source #
setArcTypePrim :: Typeable value => graph -> arc value -> arcType value -> IO () Source #
class (GraphClass graph, ArcClass arc) => DeleteArc graph arc where Source #
deleteArcPrim :: Typeable value => graph -> arc value -> IO () Source #
setArcValuePrim :: Typeable value => graph -> arc value -> value -> IO () Source #
getArcValuePrim :: Typeable value => graph -> arc value -> IO value Source #
class (Typeable arcType, Ord1 arcType) => ArcTypeClass arcType where Source #
invisibleArcType :: Typeable value => arcType value Source #
class (GraphClass graph, ArcTypeClass arcType, ArcTypeParms arcTypeParms) => NewArcType graph arcType arcTypeParms where Source #
newArcTypePrim :: Typeable value => graph -> arcTypeParms value -> IO (arcType value) Source #
class Kind1 arcTypeConfig => ArcTypeConfig arcTypeConfig Source #
Instances
ArcTypeConfig Head Source # | |
Defined in Graphs.GraphConfigure | |
ArcTypeConfig EdgeDir Source # | |
Defined in Graphs.GraphConfigure | |
ArcTypeConfig EdgePattern Source # | |
Defined in Graphs.GraphConfigure | |
ArcTypeConfig Color Source # | |
Defined in Graphs.GraphConfigure | |
ArcTypeConfig DoubleClickAction Source # | |
Defined in Graphs.GraphConfigure | |
ArcTypeConfig ValueTitle Source # | |
Defined in Graphs.GraphConfigure | |
ArcTypeConfig LocalMenu Source # | |
Defined in Graphs.GraphConfigure |