Opened 14 months ago
Last modified 14 months ago
#18316 new enhancement
Add BBox support to BLayoutBuilder
Reported by: | pulkomandy | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Kits/Interface Kit | Version: | R1/beta4 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
It would be nice to be able to do this:
BLayoutBuilder::Group<>(someView) .Add(...) .AddBox("box label") .AddGroup(B_VERTICAL) ... .End() .End() .End();
Currently, using BBox in layout mode is annoying, you have to:
- Declare and allocate the BBox
- Set its label
- Add an inner view to it
- Use a BLayoutBuilder to populate that inner view
- Finally add the box to the global layout
This breaks the nice pseudo-declarative workflow for GUIs.
Change History (2)
comment:1 by , 14 months ago
comment:2 by , 14 months ago
With current API you have to do something like this:
BBox* box = new BBox("box label"); BGroupView* innerView = new BGroupView(B_VERTICAL); box->AddChild(innerView); BLayoutBuilder::Group<>(innerView) ... // Same content as the ... in the initial example .End(); BLayoutBuilder::Group<>(someView) .Add(...) .Add("box") .End();
Note:
See TracTickets
for help on using tickets.
Can you give an equivalent code based on current existing API?