Re: [Haskell-cafe] graphical user interface library for editing graphs?

2009-06-15 Thread Malcolm Wallace
Claude Heiland-Allen claudiusmaxi...@goto10.org wrote:

 My question: can you suggest a library that would make implementing
 this  specification relatively painless?
 
 OpenGL-based would be preferable, as I would like to scale the graph 
 under construction automatically to fit the display, and
 launchMissiles  will require something with fast rendering.

There was a Haskell-written graph editor in Dazzle, which the authors
kindly open-sourced, to become the rudimentary application Blobs:

http://www.cs.york.ac.uk/fp/darcs/Blobs/

The GUI is implemented in wxHaskell, graphs are saved as XML files.
Some of the code may have bit-rotted since the days of ghc-6.4.

As distributed, the functionality for doing things with the graph after
drawing it is (intentionally) rather limited, since many of the
potential backends are in fact closed-source.  However, the backend is
the part that is going to be different for every client of the library
anyway.

Regards,
Malcolm
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] graphical user interface library for editing graphs?

2009-06-12 Thread Claude Heiland-Allen

Greetings,

I have an idea for a project.  The eventual aim is rather eccentric, but 
the specifications I have sketched out are roughly as follows (best 
viewed with fixed-width font due to diagrams):



0. the graphical user interface is entirely mouse driven, mouse 
position/clicks/releases are shown by [ ]


1. the world consists of empty space, nodes, and links between nodes

2. nodes may either be filled (*) or hollow (o);
   call hollow nodes targets, targets may be highlighted (O)

3a. left-click on empty creates a filled node linked to a target:

  [ ]*
=   |
 o

3b. left-click on a target fills it and links it to a new target:

   : :
  [o]*
=   |
 o

4a. right-click on empty creates a filled node linked to two targets:

  [ ]*
=  / \
   o   o

4b. right-click on a target fills it and links it to two new targets:

   : :
  [o]*
=  / \
   o   o

5a. left-click-drag on a filled node with 1 descending link highlights 
all targets linked under it:


   : :
  [*]   [*]
   :   =:
   * *
  / \   / \
 o   o O   O

5b. left-click-drag as in 5a, when released on a highlighted target, 
creates a weak link (not considered as descending for purposes of 5a) 
from the original node to that target. that target is filled, all other 
targets are unhighlighted:


   : :
   * *
   :   =:\
   * * \
  / \   / \|
 O  [O]o  [*]

6a. right-click-drag from a filled node at the top of a connected 
component highlights all targets not in that connected component:


[*] * [*] *
 :  |  =  :  |
o O

6b. right-click-drag as in 6a, when released on a highlighted target, 
joins the graphs together, such that the original node fills that 
target, and all other targets are unhighlighted:


 *  * *
 :  |  = |
   [O]   [*]
  :

7. when a connected component has no targets, double-clicking anywhere 
on it will launchMissiles



My question: can you suggest a library that would make implementing this 
specification relatively painless?


OpenGL-based would be preferable, as I would like to scale the graph 
under construction automatically to fit the display, and launchMissiles 
will require something with fast rendering.



Thanks,


Claude
--
http://claudiusmaximus.goto10.org

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe