Path: utzoo!attcan!uunet!peregrine!elroy!ames!nrl-cmf!ukma!rutgers!att!whuts!picuxa!gpasq From: gpasq@picuxa.UUCP (Greg Pasquariello X1190) Newsgroups: comp.windows.x Subject: Re: (none) Message-ID: <701@picuxa.UUCP> Date: 16 Nov 88 13:36:39 GMT References: <8811152003.AA11042@uc.msc.umn.edu> Reply-To: gpasq@picuxa.UUCP (Greg Pasquariello X1190) Organization: AT&T/EDS Product Integration Center Lines: 52 In article <8811152003.AA11042@uc.msc.umn.edu> dtj@SC.MSC.UMN.EDU writes: - -I have a stupid question and there is probably something simple that I -am overlooking. - -Objective: Create a scrollable window on which we can place widgets - and do simple graphics (i.e. boxes and lines). - - +-----------------------+ \ - | _______ | \ - | [_______] | \ - | ___|___ | \ Viewport - | [_______] | / - | ___|___ | / - | [_______] | / - +-----------------------+ / - ___|___ - [_______] - ___|___ - [_______] - | - -Problem: Placing widgets works as advertised, but the graphics - doesn't stay around. If you do graphics in the viewport - and then scroll around, you lose the graphics that have - been done. You also can't do graphics off of the displayed - viewport (almost a necessity). - -Solution: ? - - -Is there anybody out there in X11land that can break the news to me that -it's really simple and "any good C programmer can write useful X applications -in a very short period of time"? - - -Dean Johnson (dtj@caffeine.cray.com or dtj@msc-sc) - User Interfaces Group - Cray Research, Inc. - Mendota Heights, MN You can either do the graphics in the viewport, or create another widget (like a box) and do the graphics there. What you need to be sure to do however, is redraw the graphics on exposure. What that means is an event handler for your graphics window. What I typically do is keep the graphics in a pixmap and upon exposure simply copy the pixmap to the exposed window. This X stuff is keen! (keen?) -- ============================================================================= By the time they had diminished from Greg Pasquariello AT&T PMTC 50 to 8, the dwarves began to suspect Hungry. att!picuxa!gpasq =============================================================================