Study GUI and FRP sequentially or concurrently? Superimposing graphics and text.

Hi! I want to write a mindmapping app, like Freeplane, which involves drawing rectangles containing text and arrows connecting them. For that purpose, today I installed reactive-banana, wxWidgets, wxHaskell and reactive-banana-wx. (It's the first complex install for which I didn't have to write the list for help!) Am I correct that the question of whether graphics can be superimposed over text depends only on wxHaskell, and not reactive-banana? Would you recommend first writing code that uses only wxHaskell, to become familiar with the library, or jumping right in by using reactive-banana at the same time? Regards, Jeff

I personally picked up both wxHaskell and reactive-banana at the same time
and it was fine. In practice the two are almost orthogonal—reactive-banana
completely supplants parts of wx and doesn't touch the rest at all, for the
most part. (I recall some wx-specific quirks that leak out into
reactive-banana code, but nothing too bad.)
For me, the examples included with reactive-banana-wx were probably the
most useful learning aide. Once you figure out how the examples work, you
can modify them and see the changes right away, which is enough of a
stepping stone to figure the rest out from the API docs.
As far as superimposing text on an image, that should only take
wxHaskell-specific code. You'll probably have to mess around with the
layout, but the two widgets (text and image) should still be the same and
so act the same from the perspective of reactive-banana.
On Tue, Jan 6, 2015 at 5:06 PM, Jeffrey Brown
Hi!
I want to write a mindmapping app, like Freeplane, which involves drawing rectangles containing text and arrows connecting them. For that purpose, today I installed reactive-banana, wxWidgets, wxHaskell and reactive-banana-wx. (It's the first complex install for which I didn't have to write the list for help!)
Am I correct that the question of whether graphics can be superimposed over text depends only on wxHaskell, and not reactive-banana? Would you recommend first writing code that uses only wxHaskell, to become familiar with the library, or jumping right in by using reactive-banana at the same time?
Regards, Jeff
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Hi Jeffrey
You might want to take a serious look at Blobs:
https://hackage.haskell.org/package/Blobs-0.3/src/
Almost certainly it will have bit-rotted, but when it was active it
would definitely have been the best starting point for a "boxes and
arrows" editor.
Best wishes
Stephen
On 7 January 2015 at 01:06, Jeffrey Brown
Hi!
I want to write a mindmapping app, like Freeplane, which involves drawing rectangles containing text and arrows connecting them. For that purpose, today I installed reactive-banana, wxWidgets, wxHaskell and reactive-banana-wx. (It's the first complex install for which I didn't have to write the list for help!)
Am I correct that the question of whether graphics can be superimposed over text depends only on wxHaskell, and not reactive-banana? Would you recommend first writing code that uses only wxHaskell, to become familiar with the library, or jumping right in by using reactive-banana at the same time?
Regards, Jeff
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Jeffrey Brown
Hi!
I want to write a mindmapping app, like Freeplane, which involves drawing rectangles containing text and arrows connecting them. For that purpose, today I installed reactive-banana, wxWidgets, wxHaskell and reactive-banana-wx. (It's the first complex install for which I didn't have to write the list for help!)
Am I correct that the question of whether graphics can be superimposed over text depends only on wxHaskell, and not reactive-banana? Would you recommend first writing code that uses only wxHaskell, to become familiar with the library, or jumping right in by using reactive-banana at the same time?
Hi Jeffrey, You might be interested in the work I'm doing on a 2D level editor for a game I'm building. The game is "hadoom", and it's a clone of Doom (inventive name, eh?). The level editor is top-down cartography software, and you can see fairly recent screenshots here: http://t.co/LgMRHw2y0Z http://t.co/O2DhKZWwcG There is also an old video here https://www.youtube.com/watch?v=Cfc4QkfAHx4 Anyway, the reason I say this might be interesting, is this is built using reactive-banana, GTK, and the "diagrams" library. I've found this a really nice way of building an interactive GUI such as this - GTK gives me the basic framework of the application, and I use a GtkDrawingArea for the main canvas. I then model all interaction through reactive-banana, and finally output a Diagram at the end. I use the diagrams-cairo backend to render this directly into the GtkDrawingArea. The source code for this is at https://github.com/ocharles/hadoom/tree/master/hadoom-editor though I should warn you it's somewhat in a state of rapid development, so things may change wildly. However, the basic approach of using GTK, reactive-banana & diagrams will not change. Hope this helps! -- ocharles

Reactive-banana can work with GTK?! Heinrich, Oliver, should perhaps the
bindings at
https://github.com/ocharles/hadoom/blob/master/hadoom-editor/Reactive/Banana...
be referred to from the reactive banana homepage?
On Wed, Jan 7, 2015 at 2:32 AM, Oliver Charles
Jeffrey Brown
writes: Hi!
I want to write a mindmapping app, like Freeplane, which involves drawing rectangles containing text and arrows connecting them. For that purpose, today I installed reactive-banana, wxWidgets, wxHaskell and reactive-banana-wx. (It's the first complex install for which I didn't have to write the list for help!)
Am I correct that the question of whether graphics can be superimposed over text depends only on wxHaskell, and not reactive-banana? Would you recommend first writing code that uses only wxHaskell, to become familiar with the library, or jumping right in by using reactive-banana at the same time?
Hi Jeffrey,
You might be interested in the work I'm doing on a 2D level editor for a game I'm building. The game is "hadoom", and it's a clone of Doom (inventive name, eh?). The level editor is top-down cartography software, and you can see fairly recent screenshots here:
http://t.co/LgMRHw2y0Z http://t.co/O2DhKZWwcG
There is also an old video here
https://www.youtube.com/watch?v=Cfc4QkfAHx4
Anyway, the reason I say this might be interesting, is this is built using reactive-banana, GTK, and the "diagrams" library. I've found this a really nice way of building an interactive GUI such as this - GTK gives me the basic framework of the application, and I use a GtkDrawingArea for the main canvas. I then model all interaction through reactive-banana, and finally output a Diagram at the end. I use the diagrams-cairo backend to render this directly into the GtkDrawingArea.
The source code for this is at
https://github.com/ocharles/hadoom/tree/master/hadoom-editor
though I should warn you it's somewhat in a state of rapid development, so things may change wildly. However, the basic approach of using GTK, reactive-banana & diagrams will not change.
Hope this helps!
-- ocharles

Jeffrey Brown wrote:
Reactive-banana can work with GTK?! Heinrich, Oliver, should perhaps the bindings at https://github.com/ocharles/hadoom/blob/master/hadoom-editor/Reactive/Banana... be referred to from the reactive banana homepage?
Feel free to add a link to the project homepage on the Haskell wiki. Actually, there are several people who have made small bindings to GTK. Unfortunately, I can't bless any of them, because I never managed to install GTK correctly on MacOS X, which means that I can't test them. See also: https://github.com/HeinrichApfelmus/reactive-banana/pull/71#issuecomment-677... Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com

Jeffrey Brown
Reactive-banana can work with GTK?! Heinrich, Oliver, should perhaps the bindings at https://github.com/ocharles/hadoom/blob/master/hadoom-editor/Reactive/Banana... be referred to from the reactive banana homepage?
Well... as an example, sure. But they are hardly something that I'd expect to package up as a library. I haven't given them a huge amount of thought, and as you can see - they are just appearing as I need them. My project doesn't really interact with GTK a great deal, it just uses it to create a window and display some basic properties. The beauty of reactive-banana is that it's really just a very declarative way of dealing with IO callbacks. So it can support GTK, WxWidgets, QT (if we had bindings), and even GUI frameworks that don't even exist! :) -- ocharles
participants (5)
-
Heinrich Apfelmus
-
Jeffrey Brown
-
Oliver Charles
-
Stephen Tetley
-
Tikhon Jelvis