From: Michael S. <msh...@in...> - 2012-07-07 02:43:58
|
On 07/07/12 04:08, Axel Simon wrote: > Hi Michael, > > On 06.07.2012, at 18:03, Michael Sharman wrote: > >> Hi, >> >> I'm new to Gtk2hs but relatively familiar with Haskell and have a >> question related to implementation of custom widgets derived from other >> GTK widgets. >> >> What I would like to is to derive an object from >> Graphics.UI.Gtk.SourceView.SourceBuffer that would add functionality in >> a similar way to how GtkSourceBuffer derives from GtkTextView. >> >> As far as I can tell Gtk2Hs doesn't have that level of interoperability >> from Haskell to GObject ? >> >> Is that correct? > Yes, there is no real way to create all the proper stuff so that a Haskell GObject looks like a C GObject. But that may not be necessary. You can attach additional attributes to any GObject. Signals that are being emitted can be connected to and their standard C handler can be disabled which allows for some sort of inheritance. So, maybe you can implement what you want by adding some additional features to an existing object? > > Cheers, > Axel > Thanks, I'll try connecting to events and see what is possible. Michael |