Make `Widget.get_style_context() const` return a `StyleContext const`?
Daniel Boles via gtkmm-list <[email protected]>
| Newsgroups | gmane.comp.gnome.gtkmm |
|---|---|
| Message-ID | <CAKChMKMtrS8Det+XH95Kk7-rn2LL6vNxoatdNY=GsLbnqJpxgg@mail.gmail.com> |
I suspect this might have been asked and discredited already, so if it has, apologies and link me :) In gtk/src/widget.hg we have: ``` _WRAP_METHOD(Glib::RefPtr<StyleContext> get_style_context(), gtk_widget_get_style_context, refreturn) _WRAP_METHOD(Glib::RefPtr<Gtk::StyleContext> get_style_context() const, gtk_widget_get_style_context, refreturn, constversion) ``` Should the const version return a RefPtr to a `const StyleContext`? I feel like perhaps it should. If we have the style context, we can change how the widget is drawn, which is arguably quite a non-const thing to do with something whose main purpose is to be displayed :-) _______________________________________________ gtkmm-list mailing list [email protected] https://mail.gnome.org/mailman/listinfo/gtkmm-list