I'm trying to create a program with Gtk2Hs and Haskell and I wonder if it is possible to create a new signal with Gtk.
For example I created a hBox containing a button and a text entry. This component can be added at differents places in the window and I would like to trigger some action when the button is pressed or when the entry is edited.
Is it possible to create and force the widget (the hBox?) to emit a custom my_own_signal
with something like :
onbuttonPressed button $ do emit my_own_signal
onEntryActivate entry $ do emit my_own_signal
which could be captured by making a
on hbox my_own_signal $ do somethings
or
on my_widget my_own_signal $ do somethings
This way I could have a "global" signal for my widget/hbox
I'm using GHC 7.4.1 and Gtk2Hs 0.12.3