This is not meant to be pulled in, just a request for comments before making it nicer to see if the approach is okay in the first place. The full goal is to make it easy to add features to the gui such as adding new elements, adding styling, and supporting composition.
Things that need to be added/changed:
Actually use builder pattern for things like Button (avoided as it's a lot of work wasted if you don't like the idea)
Remove ButtonManager and replace it with a Panel class
Add WidgetContainer trait to support composition. Panel would impl WidgetContainer for example. WidgetContainer would have add_widget fn and would require a Widget impl as well.
Rename new2 (used to avoid immediate need to apply the new changes) to new and remove new_small in Button.
This is not meant to be pulled in, just a request for comments before making it nicer to see if the approach is okay in the first place. The full goal is to make it easy to add features to the gui such as adding new elements, adding styling, and supporting composition.
Things that need to be added/changed: