comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Generating EXPOSE events, in direct graphics with RETAIN=2
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Generating EXPOSE events, in direct graphics with RETAIN=2 [message #9511] Thu, 10 July 1997 00:00
Robert Moss is currently offline  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.
Re: Generating EXPOSE events, in direct graphics with RETAIN=2 [message #9518 is a reply to message #9511] Wed, 09 July 1997 00:00 Go to previous message
David Foster is currently offline  David Foster
Messages: 341
Registered: January 1996
Senior 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?

I give windows their "own" colormap by using the KBRD_FOCUS_EVENTS
keyword, which works fine. I would think that you'd *want* to have
events generated every time the cursor crosses the widget frame,
even if the window has not been exposed; you want the colors
restored whenever the cursor is within the widget, right? Or are
you headed in another direction?

Dave

--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2200
La Jolla, CA 92037
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~

"I have this theory that if we're told we're bad,
then that's the only idea we'll ever have.
But maybe if we are surrounded in beauty,
someday we will become what we see." - Jewel Kilcher
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Xcd: change directory via mouse
Next Topic: How to use "defroi.pro" in widget applications

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:37:25 PDT 2025

Total time taken to generate the page: 0.00567 seconds