Re: Reverse-wrapping gtkmm widgets to gtk+ (for glade3)
- From: Oliver Nittka <nittka esem com>
- To: Murray Cumming <murrayc murrayc com>
- Cc: gtkmm-list gnome org
- Subject: Re: Reverse-wrapping gtkmm widgets to gtk+ (for glade3)
- Date: Wed, 22 Nov 2006 18:06:58 +0100
Murray Cumming schrieb:
>> another possibility would be to glade_register_widget() each of our
>> widgets in glade_module_register_widgets(), with a custom *_new function
> So it doesn't seem like much extra work to make sure that the C++
> instance is instantiated before the properties are set.
well, seems it actually /is/ some extra work ;-)
libglade instantiates the GObject, assigns the properties and only then
libglademm wraps the GObject into a C++ Object.
Trouble is, the custom properties of your class are already registered
(Glib::Property does this automatically for us, which is like magic ;-)
but the according set_property() functions (which point to
custom_set_property_callback() ) cannot work because at that time, there
is no Glib::Property-instance to store the values, yet.
when later the Glib::Property-members of your Widget get created, their
values are just set to the default, so using your own widget in a glade
file would mean to manually set it's custom properties after loading the
glade file, or, as Alexander pointed out, to write an adapter function
for each and every property in your catalog file.
the other possibility (glade_register_widget() with custom *_new -
function) does not yet work for me, but I'm at it :-)
--o
--
Oliver Nittka
ESEM Grünau GmbH & Co. KG
Dornierstraße 6, 88677 Markdorf/Germany
phone: +49 7544 9583-25, fax: +49 7544 9583-60
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]