🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #36560

Re: Xlib drawing routines in DEC widgets

#36560
From: Ken Lee
Date: Thu, 08 Feb 1990 23:29
20 lines
1482 bytes
In article <9002081943.AA01411@brahms.cs.byu.edu>,
dmitc@BRAHMS.CS.BYU.EDU (David Mitchell) writes:
> I also defined a widget for drawing (lines, rectangles
> etc.) by using the DwtWindow call.  I get the screen, display, and
> window from the XtScreen, XtDisplay, and XtWindow calls using
> the widget I defined for drawing as the argument for these calls.
> When I then use these returned values to XDrawLine the line will not
> appear on the display.

Make sure you wait for Expose events before drawing.  The DECwindows
window widget (created by your DwtWindow call) provides an Expose event
callback to simplify this for you.  Only by putting your drawing
function in the callback will the X toolkit maintain your drawing.  The
callback gives you the original Expose event, so your drawing function
can be as smart or dumb as you like.

Ken Lee
DEC Western Software Laboratory, Palo Alto, Calif.
Internet: klee@wsl.dec.com
uucp: uunet!decwrl!klee
Technical Details
Message-ID: <2708@bacchus.dec.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!mcgill-vision!bloom-beacon!snorkelwacker!usc!elroy.jpl.nasa.gov!decwrl!chico.pa.dec.com!klee
References: <9002081943.AA01411@brahms.cs.byu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!mcgill-vision!bloom-beacon!snorkelwacker!usc!elroy.jpl.nasa.gov!decwrl!chico.pa.dec.com!klee
From: klee@chico.pa.dec.com (Ken Lee)
Newsgroups: comp.windows.x
Subject: Re: Xlib drawing routines in DEC widgets
Message-ID: <2708@bacchus.dec.com>
Date: 8 Feb 90 23:29:57 GMT
References: <9002081943.AA01411@brahms.cs.byu.edu>
Sender: news@decwrl.dec.com
Reply-To: klee@decwrl.dec.com
Organization: DEC Western Software Laboratory
Lines: 20