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

Claude Heiland-Allen claudiusmaximus at goto10.org
Fri Jun 12 11:04:50 EDT 2009


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



More information about the Haskell-Cafe mailing list