-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Labels
c-bugBug - some feature is not working as expectedBug - some feature is not working as expectedp-highHigh PriorityHigh Priority
Milestone
Description
Creating controls is unsound at the moment. libui enforces a tree structure. We should enforce it in the API.
I would like to do this by creating a trait which permits adding a control, and implementing it on all containers (like windows and grids and boxes).
The question is, should we have individual methods for each control:
let btn: &mut Button = window.add_button("Button text!");
or should we have an enum with all the controls?
let btn: &mut Button = window.add(Controls::Button("Button text!"));
Metadata
Metadata
Assignees
Labels
c-bugBug - some feature is not working as expectedBug - some feature is not working as expectedp-highHigh PriorityHigh Priority