Digraph library?

Hey all-

I am looking to make a UI where the user can drag nodes into a graph
and connect them in a flowchart/digraph style. Essentially, given so
many steps, I want the user to be able to order them in the manner
they prefer.

Once the nodes have been ordered and the edges of the digraph
constructed, I also would like to be able to export the graph into
self-specified LISP code. Basically I want to have a way to cleanly
extract the nodes and their connections in text form.

Are there and libraries or widgets specifically designed for this?
Has anyone encountered a similar need?

Jason

Jason G wrote:

Hey all-

I am looking to make a UI where the user can drag nodes into a graph
and connect them in a flowchart/digraph style. Essentially, given so
many steps, I want the user to be able to order them in the manner
they prefer.

Once the nodes have been ordered and the edges of the digraph
constructed, I also would like to be able to export the graph into
self-specified LISP code. Basically I want to have a way to cleanly
extract the nodes and their connections in text form.

Are there and libraries or widgets specifically designed for this?
Has anyone encountered a similar need?

Jason

Encountered a similar need for producing / editing graphical models (of various flavours). I used OGL. I subclassed ogl.ShapeCanvas and ogl.ShapeEvtHandler for my canvas class and node and edge handler classes. Nodes and edges are added / named / deleted via mouse clicks and the keyboard rather than dragging. When I've needed multiple node types I've just used a menu to select the current node type before adding them. I reserve right clicking on nodes / edges for adding data. But you might prefer other choices. I also use Graphviz for graph layout (when opening a file). It doesn't take much work to get something up and running for a new type of model. OGL worked for me, but OGLlike might be easier (I haven't tried it yet).

Duncan

Thanks for the quick response Duncan. I will look into this library
and hopefully it can accomplish what I am looking for.

I will post a future update of my success/failure as a reference for
others
interested in this topic.

···

On Jul 14, 7:07 pm, duncan smith <buzz...@contactbox.co.uk> wrote:

Encountered a similar need for producing / editing graphical models (of
various flavours). I used OGL. I subclassed ogl.ShapeCanvas and
ogl.ShapeEvtHandler for my canvas class and node and edge handler
classes. Nodes and edges are added / named / deleted via mouse clicks
and the keyboard rather than dragging. When I've needed multiple node
types I've just used a menu to select the current node type before
adding them. I reserve right clicking on nodes / edges for adding data.
But you might prefer other choices. I also use Graphviz for graph
layout (when opening a file). It doesn't take much work to get
something up and running for a new type of model. OGL worked for me,
but OGLlike might be easier (I haven't tried it yet).

Duncan

indeed OGL like seems a good choice (easier, smaller
and more flexible than OGL)

  here some examples of what I've done with it.

if you’re interested let me know and I’ll upload the latest
version.
cheers,
Stef

···

http://mientki.ruhosting.nl/data_www/pylab_works/pw_circuit_editor.html
http://mientki.ruhosting.nl/data_www/pylab_works/pw_bricks_2d_scene.html

Stef Mientki wrote:

[snip]

indeed OGL like seems a good choice (easier, smaller and more flexible than OGL)
here some examples of what I've done with it.
  http://mientki.ruhosting.nl/data_www/pylab_works/pw_circuit_editor.html
  http://mientki.ruhosting.nl/data_www/pylab_works/pw_bricks_2d_scene.html
if you're interested let me know and I'll upload the latest version.

cheers,
Stef

The most important (to me) application I've developed using OGL is for creating / editing Bayes nets and related graphical models. It doesn't demonstrate the flexibility of OGL / OGLlike in the same way as the above, but it's probably fairly close to what the OP is after. It's a work in (slow, occasional) progress and there's quite a bit I want to refactor, but I could supply screenshots if they'd be of interest. I might rewrite the canvas code using OGLlike if I can decide whether an application / canvas aimed specifically at creating / editing graphical models would be useful. What I have now works for me, but it could do with tidying up (and switching to OGLlike might make that easier). Cheers.

Duncan

···

  On 15-07-2010 02:07, duncan smith wrote: