Re: Setting custom Glib::Property values in Gtk::Builder .ui XML
- From: Kjell Ahlstedt <kjellahlstedt gmail com>
- To: Daniel Boles <dboles src gmail com>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: Setting custom Glib::Property values in Gtk::Builder .ui XML
- Date: Mon, 10 Jun 2019 09:44:26 +0200
On 6/9/19 11:04 AM, Daniel Boles via gtkmm-list wrote:
Short of having to write an underlying class in C, is there any way to
have custom derived widgets with custom Glib::Property, and set those
custom properties through a Gtk::Builder .ui?
Presuming the answer is no, because the properties are only registered
with GType when the instance is constructed - not when the class is
constructed, which GtkBuilder won't do anyway if it's C++ - is there
any way this could possibly work in future, or discussion I can read?
I think this has not been possible previously, but what about
Glib::ExtraClassInit, available since glibmm 2.60.0? Do you think it
will help? It makes it possible to add code to the class init func in
your custom widget. If you register properties in the class init func,
like C classes do, you shall probably not use Glib::Property<>, but
rather code that resembles what _WRAP_PROPERTY() generates.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]