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

Home » Public Forums » archive » Re: passing objects between GUI callbacks
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: passing objects between GUI callbacks [message #42103] Thu, 30 December 2004 16:03
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Soren writes:

> I can't seem to find some good GUI examples on how to deal with object
> graphics in the IDL documentation.
> I have a gui consisting of an image time series and a plot. I want to
> plot the time course of the pixel that the mouse is over.
>
> 1) I figure that the best thing to do is to use object graphics for
> the plot since i continously and fast want to put in new ydata points
> (as the mouse hovers the image). Am i right?

I doubt it. :-)

If it were me, I wouldn't be going anywhere near
object graphics for something like this. This is
just a plot of some image pixel values, right?
I'd just plot them. If that flashes too much, I'd
do the drawing to a pixmap and DEVICE COPY that
to the real display. (Or, alternatively, keep the
plot axes on the pixmap and use that to erase the old
plot, then just OPLOT the new points on the axes.)
This would be a LOT faster than object graphics.

> 2) I will need to store the objects involved, view object, plot object
> and model object. Is the best way to put them in a structure and
> attach to the uname property of eg. the plot? I guess this must be a
> very common situation.

Commonly, you put all the information you need to run
your program in a structure (called variously "info"
or "state", etc.). That structure is either stored
directly in the user value of the top-level base, or
it is stored in a pointer, that is stored in the user
value of the top-level base. (It depends on whether your
aesthetic sense is more disturbed by a bunch of NO_COPY
keywords or a whole lot of parentheses.)

Cheers,

David

P.S. I don't mean to discourage you from learning object
graphics. If it is important to you, by all means go
ahead. But it is a fairly steep learning curve and there
are almost always easier ways for an IDL novice to proceed.

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: passing objects between GUI callbacks
Next Topic: Re: Unknown data type

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

Current Time: Thu Oct 09 22:14:35 PDT 2025

Total time taken to generate the page: 1.51584 seconds