Hi, (I'm starting a new thread as the inital problem (showing widgets in glade 3) seems to be solved. I discovered 2 more issues about properties and yould like to comment murray's suspicion on libglade not setting properties)
What works: - you can add your gtkmm-widgets to to glade3 palette by just * defining an additional constructor * writing some glue code that registers the types of your widgets * specify a postcreate-function for each widget in the glade catalog - you can add Glib::Properties to your class, these show up automatically in glades "Properties" window for your class and get saved to the .glade file. see the attachment to http://mail.gnome.org/archives/gtkmm-list/2006-November/msg00184.html as a starter. What needs work (1) properties do not get set by libglade on widget instantiation. (2) Glib::Property<enum> does not show up in glade. (3) GLib::Property<float> cannot have a default value of 0 or smaller Possible solutions: (1) Murray suspected in http://mail.gnome.org/archives/gtkmm-list/2006-November/msg00198.html that libglade applies the properties to the GObject before constructing the C++-object. This could possibly be fixed in libglademm, however, a workaround would be to use glade_register_widget() http://developer.gnome.org/doc/API/2.0/libglade/libglade-Libglade-Build.html#glade-register-widget but i could not yet create a GladeNewFunc that works (like the _postcreate-function does) (2) You will frequently want to have properties that select different behaviour and should be presentd in glade as a kind of ComboBox. If you define a Property that takes an enum a its template parameter, it gets mapped to glibmm__CustomBoxed type and is not shown in glade at all. I'm curenty experimenting with making a Property that has Value_Enum as its ValueType, but didn't have much succes so far. (3) filed a bug on this (including patch) http://bugzilla.gnome.org/show_bug.cgi?id=378040 Maybe a specialization of Glib::Value<float> with a replaced create_param_spec() could serve as a workaround. Hope we get on as well as we did up to now, folks :-) --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 _______________________________________________ gtkmm-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gtkmm-list
