Path: utzoo!attcan!uunet!husc6!bloom-beacon!ATHENA.MIT.EDU!swick From: swick@ATHENA.MIT.EDU (Ralph R. Swick) Newsgroups: comp.windows.x Subject: Re: can callbacks map widgets in realized parents? Message-ID: <8808031406.AA02529@LYRE.MIT.EDU> Date: 3 Aug 88 14:06:50 GMT References: <8808031313.AA00898@dinorah.wustl.edu> Sender: daemon@bloom-beacon.MIT.EDU Organization: DEC/MIT Project Athena Lines: 24 The answer to your subject question is yes, but the scenario you describe is a lot more complicated. Remember that geometry negotiation behaves very differently before and after a widget (branch) is realized. When a widget hierarchy is created and managed before any of its ancestors have been realized, then geometries are effectively calculated from the inside out. This allows each parent's layout routine to be called exactly once and have full information on the desires of it's children. Once the hierarchy has been realized, however, the parent must react to each individual change in it's managed set of children and must negotiate any changes in it's own geometry with it's parent. Thus, geometries of realized hierarchies are effectively calculated from the outside in. One technique that will work well when you want to create and destroy branches of a realized tree is to leave the uppermost node of the branch unmanaged until the remainder of the branch has been created (and managed). You can then set the uppermost node to be managed, which will also cause the entire branch to be realized. You may also want some way to inform the parent of the new branch not to perform a re-layout operation between the time you destroy the old branch and manage the new one. Some composite widgets will support this (deferring a re-layout) and some won't. The better one probably will.