Skip to content

Gtk::Builder: Add helper functions for getting widgets and objects more cleanly [master]

Daniel Boles requested to merge wip/dboles/builder-nicer-4 into master

See #43 (closed) and the individual commits, but in brief, this adds new overloads enabling

  • auto button = builder->get_widget<Gtk::Button>(id);
  • auto derived = Gtk::Builder::get_derived<Derived>(builder, id, args);
  • auto adjustment = builder->get_object<Gtk::Adjustment>(id);

and makes tests/builder use these, as well as demos/gtk-demo/example_builder use the new widget overloads.

If this is accepted, I'd like if we can get it into gtkmm-3-24 (or 3.26 if that's around by then) too. I've not backported it yet though until it's definitely worthwhile.

Edited by Daniel Boles

Merge request reports