kas-gui / kas

Another GUI toolkit
Apache License 2.0
892 stars 27 forks source link

Add Collection trait #431

Closed dhardy closed 6 months ago

dhardy commented 6 months ago

Adds a trait representing a "list of widgets", e.g. Vec<W> or a struct where each field is a widget.

Adds kas::collection! to generate an anonymous implementation and instance of a Collection.

Adjusts List and Splitter widgets to use Collection; as such they no longer have the restriction that each child must have the same type.

Uses this to rewrite the Gallery's editor to use a Splitter and not use a custom widget.