Re: Generating EXPOSE events, in direct graphics with RETAIN=2 [message #9511] |
Thu, 10 July 1997 00:00  |
Robert Moss
Messages: 74 Registered: February 1996
|
Member |
|
|
C. David Cooke wrote:
>
> I have an application that puts up a couple of windows at the same time,
> and I would like to be able to load a window-specific color table for each
> window, when it becomes the top or 'exposed' window. The new EXPOSE_EVENTS
> keyword to WIDGET_BASE does exactly what I want, but it forces you to set the
> RETAIN keyword to 0, forcing you to do the window update - which would be OK,
> except I am using direct graphics, and the data I'm displaying takes a couple
> of seconds to generate and display - long enough to be annoying. The
> KBRD_FOCUS_EVENTS keyword to WIDGET_BASE generates an event everytime the
> cursor crosses the window frame, even if the window has not been exposed,
> so this doesn't work either. So I was wondering if there was another way to
> duplicate the EXPOSE_EVENTS keyword of the WIDGET_BASE, but with the ability
> to set the RETAIN keyword to 2?
>
> Thanks -
>
> --
>
> David Cooke
> Emory University School of Medicine, Atlanta, GA
Well, I do have one suggestion... do your direct graphics into a
pixmap, then use the pixmap to update the window when it is exposed.
This will be much much faster than redrawing the graphics from scratch
each time.
--
Robert M. Moss, Ph.D. - mossrm@texaco.com - FAX (713)954-6911
------------------------------------------------------------ -----
This does not necessarily reflect the opinions of Texaco Inc.
|
|
|