[interfacekit] Re: a BView flag


DarkWyrm wrote:
a BView flag, namely:
        B_FULL_UPDATE_ON_RESIZE

Why is that needed?

It generally isn't needed unless changing the size of a view affects the contents of the entire view and not just the areas changed. An example of a need for this would be if, for example, a BView was being used to draw a BBitmap which wasn't an overlay or background bitmap and you wanted it scaled in proportion to the window's size. A better example would be in StyledEdit where (assuming that you have word wrap on) a word may end up being moved to another line depending on how the window is resized,
Yey, thanks for the examples!

But why not just use Invalidate(Bounds())?
Then again, the server would just request a redraw of the region that became visible... and we would've called Invalidate from within Draw() only if the update rect was different from the bounds one, then return without drawing something.
I thought that Invalidate(Bounds()) can replace B_FULL_UPDATE_ON_RESIZE, but apparently it can't - it would complicate the code.


OK, thanks!


Adi.




---------------------------------------------------------------
Cauta-ti perechea pe http://dating.acasa.ro


Other related posts: