Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uunet!mstan!chuck From: chuck@Morgan.COM (Chuck Ocheret) Newsgroups: comp.windows.x Subject: Re: how do I refresh widgets inside a drawing area Keywords: refresh widgets Message-ID: <3033@s5.Morgan.COM> Date: 16 Apr 91 19:58:20 GMT References: <571@clbull.frcl.bull.fr> Organization: Morgan Stanley, & Co., Inc. / New York City, NY Lines: 31 > I have drawn pictures inside a drawing area widget and also > put several drawn button widgets. > > I use "XCopyArea" to copy the pictures (done with the Xlib functions) > from a pixmap to the drawing area. Then, my drawn buttons become hidden > by the pictures. > If there any possibility to tell the drawing area: "Now, redraw your > children (the drawn buttons) to get them visible". If the children of the drawing area are not gadget's then they have their own windows. Therefore as long as the GC you feed to XCopyArea has its Subwindow Mode set to ClipByChildren then you should never even draw over you children. If, however, your children are gadgets, they don't get their own windows and therefore there is no way to avoid drawing over them without setting a clip mask in your GC (not necessarily too bad a solution). To cause your gadgets to redraw themselves you can either use XClearArea for the appropriate rectangles in the drawing area (sending expose events) or you must somehow trick the gadget into redrawing itself (not too difficult with Motif) by resetting some odd resource or other. ~chuck -- +--------------------+ Chuck Ocheret +---------------+ |chuck@fid.Morgan.COM| Morgan Stanley & Co., Inc. |(212) 703-4474 | | Duty now ... |19th Floor, 1251 Avenue of the Americas|for the future.| +--------------------+ New York, N.Y. 10020 USA +---------------+