Changes between Initial Version and Version 1 of Ticket #6407, comment 3
- Timestamp:
- Aug 19, 2010, 2:43:43 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #6407, comment 3
initial v1 3 3 4 4 Basically, there are two places where it will be useful: 5 *It will allow for nested layouts, so that instead of this kind of thing:6 5 * It will allow for nested layouts, so that instead of this kind of thing: 6 {{{ 7 7 BGroupView* myGroupView = new BGroupView(B_HORIZONTAL); 8 8 BGroupView* nestedGroup; … … 14 14 nestedGroup->AddChild(new BButton("b")); 15 15 nestedGroup->AddChild(new BButton("b")); 16 }}} 16 17 17 18 You could forego the creation of the nestedGroup BView, and simply add BGroupLayouts to myGroupView. This way, we avoid the overhead of having another two views in there, when their only purpose is to host a BGroupLayout. This also means that all those BButtons will be children of myGroupView. (That's not really an advantage, but I thought I'd mention it) 18 19 An even more 'extreme' scenario might be to avoid adding any organizational views at all to your window (of course, BWindow::fTopView will still be there). 19 20 20 *Another use case is laying out objects that are not strictly related to BViews. (Composing a document for example, you could use many nested layouts for the different elements).21 * Another use case is laying out objects that are not strictly related to BViews. (Composing a document for example, you could use many nested layouts for the different elements).