packages feed

graph-rewriting-gl 0.6.3 → 0.6.4

raw patch · 3 files changed

+20/−25 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

GraphRewriting/GL/Canvas.hs view
@@ -17,8 +17,6 @@ import Data.Maybe (catMaybes, listToMaybe) import Data.Vector.Class ---setupCanvas :: (View Rotation n', View Position n', Render n', View Position n) ⇒ (Graph n -> Graph n') -> (Edge -> [n'] -> [(Vector2, Vector2)]) -> IORef (GlobalVars n) -> IO GL.Window-  setupCanvas ∷ (View Position n, Render n', View Rotation n', View Position n')             ⇒ (Graph n → Graph n') → (Edge → [n'] → [(Vector2, Vector2)]) → IORef (GlobalVars n) → IO GL.Window
GraphRewriting/GL/UI.hs view
@@ -1,20 +1,18 @@--- | This module provides an easy-to-use interface to create an interactive, graphical front-end for you graph rewriting system. The controls of the GUI are:------ - left-click on a menu entry: rule selection. At all times for each redex (according to the selected rule) one node of the redex (the first node that is matched) is marked red in the graph.------ - right-click on a menu entry: applies the rule once for each redex currently existing in the graph. No contractions take place for redexes deleted or arisen during this process.------ - right-click on a (red) node: applies the selected rule to the redex containing the node.------ - drag a node: by this you can manually help out the graph drawing mechanism to find a better layout.------ - drag outside of a node: scroll around.------ - mouse wheel: zoom------ - @z@: autozoom+-- | This module provides an easy-to-use interface to create an interactive, graphical front-end for you graph rewriting system. The controls of the GUI are as follows: ----- - @space@: pause/resume layouting+-- - Left-click on a menu entry to /select/ a rewriting rule. At all times all redexes with respect to the selected rule are marked red in the graph. Note that the menu is hierarchical, which means that selecting a rule that has subordinate entries has the effect of all these entries being selected.+-- +-- - Right-click on a menu entry to apply the corresponding rule at every applicable position in the graph simultaneously (in no particular order). Redexes that are destroyed (or created) by prior contractions in this process are not reduced, thus if single applications of the rule terminate, so does its simultaneous application. Right-clicking does /not/ select the rule.+-- +-- - Right-click on a node of the graph to apply the selected rewriting rule at that position. You know before whether it is a applicable, since all redexes in the graph with respect to the selected rule are marked red. Right-clicking on a non-redexs node has no effect. The layouting stops while the right mouse-button is pressed.+-- +-- - Drag the background of the canvas to scroll around.+-- +-- - Drag individual nodes of the graph around to manually change the layouting of the graph.+-- +-- - Use your mouse-wheel to zoom in/out. Make sure to keep the mouse curser in the canvas area and not the menu while zooming.+-- +-- - Press space to pause/resume layouting. Currently layouting is automatically resumed when the graph is rewritten by right-clicking on an individual node and not when right-clicking on a menu entry. This also requires the mouse cursor to be positioned in the canvas area. -- -- Please have a look the graph-rewriting-ski package for an example application that makes use of this library. module GraphRewriting.GL.UI (module GraphRewriting.GL.UI, LabeledTree (..)) where
graph-rewriting-gl.cabal view
@@ -1,17 +1,16 @@ Name:           graph-rewriting-gl-Version:        0.6.3+Version:        0.6.4 Copyright:      (c) 2010, Jan Rochel License:        BSD3 License-File:   LICENSE Author:         Jan Rochel Maintainer:     jan@rochel.info+Homepage:       http://rochel.info/#graph-rewriting Stability:      beta-Build-Type:  Simple-Synopsis:       OpenGL interface for interactive hypergraph rewriting+Build-Type:     Simple+Synopsis:       OpenGL interface for interactive port graph rewriting Description:-  Once a graph rewriting system has been specified using the graph-rewriting library this package can be-  used to create an application that allows to experiment with this system by interactively applying the-  rewrite rules manually on the graph.+  Once a graph rewriting system has been specified using the @graph-rewriting@ library this package can be used to create an application that allows to experiment with this system by interactively applying the rewrite rules. The usage of the interface is the same for all applications. In the center you will see the graph. It might be moving around which is due the force-directed layouting. On the top-left corner you will find a menu with the individual rewriting rules of the rewriting system. The controls are described in the "GraphRewriting.GL.UI" module. Category:       Graphs, Graphics Cabal-Version:  >= 1.6 @@ -39,4 +38,4 @@     FlexibleContexts     MultiParamTypeClasses     TypeSynonymInstances-  GHC-Options:    -fno-warn-duplicate-exports -fwarn-unused-imports+  GHC-Options:    -fno-warn-duplicate-exports