[haiku-development] Re: BBox and layout

  • From: Clemens Zeidler <clemens.zeidler@xxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 18 May 2012 10:03:42 +1200

On Fri, 18 May 2012 02:31:24 +1200, Ingo Weinhold <ingo_weinhold@xxxxxx> wrote:


Anyway, I feel the discussion is getting repetitive. The main decision to be made is what BBox shall be: a frame for an item/view or a framed container.
Browing a bit through the preferences, the BBox objects used in a layout
context seem to be used exclusively as the former (they don't set a layout
on the BBox and add a single child). I also favor that approach.

yes the discussion is getting a bit repetitive and because I neither really agree or disagree I crop the mail a bit. So I try to make it short :-)

Without answering the question if BBox shall be a frame for an item/view or a framed container (I probably would say: it depends) maybe this is a compromise: I would consider calling the debugger in this simple BBox case as a bad api design furthermore, it makes the SetLayout unused. So why not just overwrite SetLayout and let it set the layout into the content area directly? Think in case of the BBox its compatible enough with BView::SetLayout.


To the SetInset problem, maybe we can stop this discussion because its really not the most common case. At least I would not be totally unhappy if it's missing. However: To be able to place the layout within the BView just seems natural to me. By the way the BView does not just delegate all layout methods to the layout. For example, DisableLayoutInvalidation has its own independent variable in BView. For the other methods it's just natural that it delegates them to the one and only layout. I still think if SetInset is in BLayout it also must be in BView.

Cheers,
        Clemens

Other related posts: