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/10/19 10:25 AM, Daniel Boles via gtkmm-list wrote:
>  Do you think it would be possible, or worth thinking about, to add 
> ways to do this (and probably custom signals) in C++? It would be nice 
> if we could add properties and signals to the class without having to 
> go into C (or rather, by having glibmm do that for us). Properties 
> especially, to make them usable with GtkBuilder .ui files as mentioned.
It's probably possible, but I don't know how difficult it will be. I 
don't volunteer, at least not for the foreseeable future.
>
> If such properties can be added, could they still be used with 
> Glib::PropertyProxy, or does it require its target property to have 
> been fully created by Glib::Property?
>
_WRAP_PROPERTY("visible", bool) in Gtk::Widget generates the code

Glib::PropertyProxy<bool> Widget::property_visible()
{  return Glib::PropertyProxy<bool>(this, "visible"); }

Glib::PropertyProxy_ReadOnly< bool > Widget::property_visible() const
{  return Glib::PropertyProxy_ReadOnly<bool>(this, "visible"); }

If custom properties are registered like glib/gtk+ register properties, 
I see no reason why similar code should not work for the custom properties.

_______________________________________________
gtkmm-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gtkmm-list
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.