Add an Example of Creating a Custom Widget
I would love to see an example of writing a custom widget, for example: A new widget that derives from DrawingArea and implements Scrollable. Information on how to do this seems to be disjointed and hard to find.
This would be identical to any other trait from a Rust library. Create a new type consisting of a collection of widgets relevant for your type, and implement the two traits for that type.
Could you clarify what the "two traits" are?
@mmstick I'm also wondering what the "two traits" are. I've seen WidgetNameExt traits in the existing widgets, but that's only 1 trait, and it's not even the same one for each widget.
Here is a blog post about that topic: https://www.figuiere.net/technotes/notes/tn002/ @bvinc maybe this example covers your needs https://gtk-rs.org/docs/src/glib/subclass/types.rs.html#195-224
Gtk-rs examples cover that question, too:
I think the issue can be closed