[haiku-development] BView.ScollBy and scrolling BViews in general


Hi list

This message is most likely aimed at DarkWyrm, and may also be in the wrong list so apologies up front if that's the case...

I'm interested in understanding a bit more about scrolling BViews - the documentation seems to be pretty minimal on this so it's either (a) blatantly obvious and I'm missing the point or (b) complex and therefore has been skipped over. =)

I'd like to understand the mechanics a bit more as the documentation talks about a Bounds rectangle (which I understand) but also a 'Data' rectangle and I'm not sure where that fits in. For example, if I create a new BView with frame (10,10) (199,199) this will give me a 190x190 rectangle at point 10,10 in the parent (or BWindow) coordinate space. Now, if I do a BView.ScrollBy(20,0) this would scroll the view content by 20 pixels so now I get:

Frame = 10,10 - 199, 199 (i.e. no change)
Bounds = 20,0 - 219,199?

So how would I draw more content into the view?

As you can see, I'm really confused by this so any information from the devs would be greatly appreciated here!

TIA
Chris


Other related posts: