Re: Reverse-wrapping gtkmm widgets to gtk+ (for glade3)
- From: Alexander Brinkman <a brinkman marin nl>
- To: Murray Cumming <murrayc murrayc com>
- Cc: gtkmm-list gnome org
- Subject: Re: Reverse-wrapping gtkmm widgets to gtk+ (for glade3)
- Date: Sun, 19 Nov 2006 23:42:53 +0100
On Sun, 2006-11-19 at 20:57 +0100, Murray Cumming wrote:
> But the problem then is that Glib::wrap(), used by Glade::get_widget(),
> doesn't know how to convert the C object (based on its GType) to a C++
> instance, so it falls back to Gtk::Label.
>
> I added a call to Glib::wrap_register() to fix this, and now it seems to
> work - see the attachment. This is analogous to what happens when you
> use an extra wrapper library. For instance, I am using gtksourceviewmm
> (which extends GtkTextView) in Glom with libglade in the same way, and
> the init() function of gtksourceviewmm does this for us.
>
> I'll have to think about how this might be done automatically when using
> a custom GType, but I don't think it's too inconvenient now. If it works
> without problems then we should add a section the gtkmm book about it.
I can confirm the example is now working as expected.
I'll try to wrap my widgets this way and see if I can get full Glade3 /
libglade integration (which would really be awesome :)). Thank you for
your help on this!
Btw: having this done automatically would be great, however doing it
this way is fine for now, especially if it would be covered somewhere in
the documentation.
Brgds,
Alexander Brinkman.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]