[haiku-appserver] Re: (new clipping code) breakthrough and t

  • From: Adi Oanca <adioanca@xxxxxxxxxxxxxx>
  • To: haiku-appserver@xxxxxxxxxxxxx
  • Date: Wed, 19 Oct 2005 15:05:09 +0300

Hi Stefano,

Stefano Ceccherini wrote:
  Is this solution good? Shouldn't we cache the frame and >localOrigin for each 
BView? I ask this
because I think Bounds() and Frame() methods are used quite >frequently.


I'm not that familiar with BView code, but aren't we caching the frame of the 
BView already ?
Isn't there a BRect member in BView to cache it ? Aren't we using it already ? 
If not, why ? :)

First, I would like to ask you to read may previous mail again. :-)

   If you still don't understand, then I must explain better. :-)
   B_VIEW_MOVED/RESIZED is sent only for BViews that registered for such 
events. For the rest of them,
how do we know when/how to update the coordinates of a view's children when it 
gets resized?
A better example is when you resize a window with the mouse: how do you inform 
views that don't have
B_FRAME_EVENTS flag set, that their frame has changed?
   To answer directly to your questions: There is a BRect member, but we don't 
have a mechanism to have
it in sync with server's data. We are using it, but it's OK until we connect it 
to the server, after that
it's not safe anymore, it's data may be old because it will not be updated 
correctly.

   If this does not clear things up, say, and I will try to explain again. :-)


bye, Adi.

Other related posts: