[comp.sys.mac.programmer] Think C 4.0 and InvalRect question

bernard@boulder.colorado.edu (Bernie Bernstein) (03/01/90)

I am using Think C 4.0 to create something like a network editor.  I
create a bunch of objects and allow the user to move them around.  The
objects are opaque, but when I move an object over others, they all
get refreshed.

The way I implemented an opaque box was by filling it in with white.
When the object receives a Refresh message, InvalRect is called in the
Pane class for the frame of the object.  I move an object to the front
by putting it on the end of the itsSubviews list.  That way, when they
are all drawn, the top one is drawn last, obscuring anything below it.

Is there a better method of doing this so that all the objects which
are supposed to be obscured by the larger object don't get redrawn
anytime the top object is refreshed.

All suggestions are appreciated.




      o,  ,,   ,      | Bernie Bernstein                      | ,    ,,
      L>O/  \,/ \    ,| University of Colorado at boulder     |/ \,,/  \
     O./  '  / . `, / | office: (303) 492-8136                |     / ` \  ,.
    ,/   /  ,      '  | email: bernard@boulder.colorado.edu   | /        ''  \