Denis Bueno wrote:
On Dec 7, 2007 1:50 PM, Andrew Coppin <[EMAIL PROTECTED]> wrote:
Hi guys.

Here's a fairly basic question. I have several ideas for programs that
I'd like to write. They all involve placing "units" of some kind, and
then drawing "connections" between those units. How feasible is it to
program such a thing in Haskell? Where would you start? (Gtk2hs is the
only graphics API I'm familiar with using at present.)

A bit off-topic for this list, but seeing as I'm replying anyway, I've done something like that with SVG and Javascript:

http://www.blurty.com/users/claudiusmaximus/day/2007/10/03#419

I imagine (having never used it) Gtk has similar ways to bind "event listeners" to "graphical elements" to implement drag and drop type stuff, and it will most likely be much less error-prone than Javascript (I still haven't got the drag and drop right in Graphgrow...).

Do you need to update positions of the units in real time?  Do they
even evolve over time, or are you just trying to visualise?

If it's the latter, you might just take a collection of units and
connections between them, output them in the graphviz [0] format, and
see the resulting drawing.  Graphviz is for visualising arbitrary
graphs, and it's quite good at it.

Coincidentally I tried this the other day:

http://www.blurty.com/users/claudiusmaximus/day/2007/12/06#426


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

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

Reply via email to