I'm trying to create a program with Gtk2Hs and Haskell and I wonder whether it is possible to make different widgets communicate with one another.
I have a text entry, which is used to write commands, a drawing area, which draws something when the text entry is validated. These two widgets works together fine.
However, I would like to add an "optional" treeview in a different window, which would be updated when all commands in the text entry have been executed (this can take a long time).
As the treeview is "optional" and created only afterwards, I can't define callbacks to its update in the text entry definition (like the drawing area).
I would to create a signal (event?) to be emitted when all the operations are done and caught by the treeview to update its data.
My questions are :
- Is there a way to do that with Gtk2Hs and Glib?
- Is there a module that could be used to make it (portable to Linux/Windows, if possible)?
- Is there a correct way to make a widget interract/communicate with others?
I'm using GHC 7.4.1 and Gtk2Hs 0.12.3