Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!polyslo!bwarkent From: bwarkent@polyslo.CalPoly.EDU (Brian Warkentine) Newsgroups: comp.windows.x Subject: Re: Re: XtReparentWidget (How about XtCopyWidget) Message-ID: <10039@polyslo.CalPoly.EDU> Date: 7 Apr 89 22:11:34 GMT References: <9941@polyslo.CalPoly.EDU> <9740088@hpfclp.SDE.HP.COM> Reply-To: bwarkent@polyslo.CalPoly.EDU (Brian Warkentine) Organization: Cal Poly State University -- San Luis Obispo Lines: 28 In article <9740088@hpfclp.SDE.HP.COM> diamant@hpfclp.SDE.HP.COM (John Diamant) writes: >The Toolkit does contain enough information. The size of a widget w can >be obtained as follows: > > XtClass(w)->core_class.widget_size; > >With that, you can malloc up a suitable sized chunk of memory and do a raw >memory copy using bcopy to the new location. On the contrary, this is not general at all. What if the widget has non-core part data? Also, if such a widget could be created you'd need a mechanism to inform the parent that a child has been created behind it's back. As Mike said in <9941@polyslo.CalPoly.EDU> the solution we've come up with is to destroy one widget and create another, copying all the resources from one to the other. I don't believe it would be a major redesign in the toolkit to provide this, but it would be a hefty chuck of implementation changes to work through. >John Diamant -- Brian Warkentine Cal Poly, San Luis Obispo, CA bwarkent@polyslo.calpoly.EDU ...!ucbvax!voder!polyslo!bwarkent