[haiku-development] Re: BBox and layout
- From: Clemens <clemens.zeidler@xxxxxxxxxxxxxx>
- To: haiku-development@xxxxxxxxxxxxx
- Date: Mon, 07 May 2012 11:48:07 +1200
Alex Wilson wrote:> My first solution is to just leave the label added to the BBox while > calling BView::DoLayout and just move it back to the right position> afterwards. This works fine but why BView::DoLayout layouts the label view > at all? I mean the label is not part of any layout class so it should be> ignored or what is the policy here?The reason the label is laid out is because it is a child of the view, andall children are part of the layout (or a nested layout). [...]Having worked for a while with Qt now, I'm no longer convinced that implementing the "adding to view adds to layout" automatism was a wise decision. The other way around is obviously useful (and also implemented that way in Qt), but occasionally one does want to manage a child view independently of the layout. A common example is an overlay, though that can generally not be implemented that way in Haiku due to the (unfortunately) missing Z-order between siblings. Anyway, it might be a good idea to remove that automatism before we go beta, since I think it is rarely relied upon (usually one adds children to the layout anyway, particularly when using a layout builder), but annoying when one explicitly doesn't want it.
yes, and in general it is even unknown how to add an item to a layout. For example, there is no mapping from BView::AddChild(BView* child) to BALMLayout::AddView(BView* view, XTab* left, YTab* top, XTab* right, YTab* bottom).
Apart from that it's not very intuitive to me.
Cheers,
Clemens
- References:
- [haiku-development] Re: BBox and layout
- From: Ingo Weinhold
- [haiku-development] Re: BBox and layout
Other related posts:
- » [haiku-development] BBox and layout - Clemens
- » [haiku-development] Re: BBox and layout - Alex Wilson
- » [haiku-development] Re: BBox and layout - Ingo Weinhold
- » [haiku-development] Re: BBox and layout - Clemens
- » [haiku-development] Re: BBox and layout - Clemens
- » [haiku-development] Re: BBox and layout - Stephan Aßmus
- » [haiku-development] Re: BBox and layout - Axel Dörfler
- » [haiku-development] Re: BBox and layout - Clemens Zeidler
- » [haiku-development] Re: BBox and layout - Alex Wilson
- » [haiku-development] Re: BBox and layout - Alex Wilson
- » [haiku-development] Re: BBox and layout - clemens . zeidler
- » [haiku-development] Re: BBox and layout - Clemens
- » [haiku-development] Re: BBox and layout - Alex Wilson
- » [haiku-development] Re: BBox and layout - Alex Wilson
- » [haiku-development] Re: BBox and layout - Clemens
- » [haiku-development] Re: BBox and layout - Clemens
- » [haiku-development] Re: BBox and layout - Clemens
- » [haiku-development] Re: BBox and layout - Alex Wilson
- » [haiku-development] Re: BBox and layout - Axel Dörfler
- » [haiku-development] Re: BBox and layout - Alex Wilson
- » [haiku-development] Re: BBox and layout - Alex Wilson
- » [haiku-development] Re: BBox and layout - Clemens
- » [haiku-development] Re: BBox and layout - Ingo Weinhold
- » [haiku-development] Re: BBox and layout - Clemens
- » [haiku-development] Re: BBox and layout - Ingo Weinhold
- » [haiku-development] Re: BBox and layout - Stephan Aßmus
- » [haiku-development] Re: BBox and layout - Clemens
- » [haiku-development] Re: BBox and layout - Clemens
- » [haiku-development] Re: BBox and layout - Ingo Weinhold
- » [haiku-development] Re: BBox and layout - pulkomandy
- » [haiku-development] Re: BBox and layout - Clemens Zeidler
- » [haiku-development] Re: BBox and layout - Clemens Zeidler
- » [haiku-development] Re: BBox and layout - Ingo Weinhold
- » [haiku-development] Re: BBox and layout - Alex Wilson
- » [haiku-development] Re: BBox and layout - Clemens Zeidler
- » [haiku-development] Re: BBox and layout - Ingo Weinhold
- » [haiku-development] Re: BBox and layout - Clemens
- » [haiku-development] Re: BBox and layout - Ingo Weinhold
- » [haiku-development] Re: BBox and layout - Clemens Zeidler
- » [haiku-development] Re: BBox and layout - Ingo Weinhold