gtk-rs / examples

DEPRECATED, use https://github.com/gtk-rs/gtk-rs repository instead!
MIT License
284 stars 75 forks source link

Add Glade signal handlers example if applicable #336

Closed adnan449 closed 3 years ago

adnan449 commented 3 years ago

Glade makes it possible to connect to functions to emitted signals. In python they usually create a class called Handler and define methods there. And in Glade the author connects those methods names to appropriate signals: https://python-gtk-3-tutorial.readthedocs.io/en/latest/builder.html#example

Does Gtk-rs offer any such solutions? Thank you.

sdroege commented 3 years ago

https://github.com/gtk-rs/examples/blob/5d38aff77331b509f141514e309b8e8cd99cffad/src/bin/builder_signal.rs#L31-L44 is an example of that. It's not very convenient yet, see https://github.com/gtk-rs/gtk-rs/issues/128