Re: Setting custom Glib::Property values in Gtk::Builder .ui XML

Kjell Ahlstedt via gtkmm-list <[email protected]>
Newsgroups gmane.comp.gnome.gtkmm
Message-ID <[email protected]>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.