[haiku-development] Re: Scrolling with child views - bug or feature?

  • From: Rene Gollent <anevilyak@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 17 Jul 2009 07:17:50 -0500

On Fri, Jul 17, 2009 at 2:34 AM, Stephan Assmus<superstippi@xxxxxx> wrote:
> Maybe I am missing something, but from your explaination, I would say it's
> intentional. Why would scrolling the parent view affect something local to
> the child views?

The problem is  that means the view has no way of determining its
viewport. To give an example, if I'm scrolled say, 10% down, the
parent's bounds are something like (top = 1350, bottom = 1737).
However, the child view always gives back (top = 0, bottom = 13000),
which corresponds to the entire range of the scroll bar, regardless of
the actual scroll position. However, the app_server obviously knows,
since it gives correct ranges for Draw's update rects, and also
correctly gives me the appropriate B_EXITED_VIEW /  B_OUTSIDE_VIEW
transits. However, I basically can't determine, without the help of
the parent bounds rect, where outside my view the mouse pointer lies,
which is needed to determine the direction to scroll in when drag
selecting with the mouse. Furthermore, that only works in this case
because there's a 1:1 correspondence between the height of the child
and the height of the parent. To me it seems unintuitive at best that
you're saying the child cannot be self contained in this case. There
needs to be some way for the child to discover its current viewport.

Regards,

Rene

Other related posts: