Re: How to pick a window? [message #23425] |
Sun, 28 January 2001 10:50  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
AM wrote:
>
> Hi,
> I am trying to find out which idl window I clicked on (ie, selected) if
> I have a number of them on the screen. I want to feed that back into a
> routine that then goes and does something depending on which window I
> click on. I am using the "old fashioned" windows created with 'window',
> rather than these new fangled "widget windows". Is here a solution or do
> I have to use widgets? I am using idl 5.4 in a unix environment. Maybe I
> can get the window manager to say something to idl?
No Iam sorry I have no solution to this but I will show you some trouble
you got if you don't save some system variables
tek_color
window,1,xs=100,ys=200
plot,findgen(100)
window,2,xs=200,ys=100
plot,findgen(100)
wset,1
oplot,findgen(100),color=4
wset,2
oplot,findgen(100),color=4
oplot on window 1 gives no blue line.
IDL stores always only for the last plot in !x, !y and so on
the parameters which are necessary needed to add some plots later.
We have two useful routines in our library to get out of this trouble.
;+
; NAME:
; savesysvar
;
; PURPOSE:
; saves the settings of the !p, !x, !y, !z system
; variables in a structure
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_source/idl_ html/dbase/download/savesysvar.tar.gz
+
; NAME:
; restsysvar
;
; PURPOSE:
; restores the settings of the !p, !x, !y, !z variables
; from a structure previously saved with savesyvar()
;
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_source/idl_ html/dbase/download/restsysvar.tar.gz
For further routines and licensing please look at
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml
regards
Reimar
--
Reimar Bauer
Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
=============================================
a IDL library at ForschungsZentrum J�lich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml
http://www.fz-juelich.de/zb/text/publikation/juel3786.html
|
|
|
Re: How to pick a window? [message #23488 is a reply to message #23425] |
Thu, 25 January 2001 20:18   |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
AM (amacphee@my-deja.com) writes:
> OK, I guess I asked for it :-) I'll check the books (including yours; I
> bought that a couple of weeks ago too :-)
> Just for some encouragement before I try this, is there an easy way to
> translate something like
>
> window
> tvscl, indgen(256,256)
>
> into 'widget speak'?
Yep.
IDL> FSC_Window, 'TVImage', Indgen( 256, 256)
Resizeable graphics window, automatic output to
all kinds of file output, color tables built
in, etc., etc.
You can find all the programs you need on my
web page. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: How to pick a window? [message #23492 is a reply to message #23488] |
Thu, 25 January 2001 17:56   |
amacphee
Messages: 9 Registered: September 2000
|
Junior Member |
|
|
OK, I guess I asked for it :-) I'll check the books (including yours; I
bought that a couple of weeks ago too :-)
Just for some encouragement before I try this, is there an easy way to
translate something like
window
tvscl, indgen(256,256)
into 'widget speak'?
Thanks,
Andrew
In article <MPG.14da61e9f8de5b13989d34@news.frii.com>,
davidf@dfanning.com (David Fanning) wrote:
> AM (no_spamus@yahoo.com) writes:
>
>> I am trying to find out which idl window I clicked on (ie, selected)
if
>> I have a number of them on the screen. I want to feed that back into
a
>> routine that then goes and does something depending on which window
I
>> click on. I am using the "old fashioned" windows created with
'window',
>> rather than these new fangled "widget windows". Is here a solution
or do
>> I have to use widgets? I am using idl 5.4 in a unix environment.
>
> Do you *have* to use widgets!?
>
> ...Nope. Huh, uh. I'm not gonna say anything...
>
> My mamma told me if you can't think of anything
> good to say, just keep your mouth shut.
>
>> Maybe I can get the window manager to say something to idl?
>
> Do you mean like ... No, no, just forget it.
>
> Cheers,
>
> David
>
> P.S. Let's just say if IDL weren't first written
> in Neanderthal times we would *all* be using widgets
> as windows. Sheesh!
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting
> Phone: 970-221-0438 E-Mail: davidf@dfanning.com
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Toll-Free IDL Book Orders: 1-888-461-0155
>
Sent via Deja.com
http://www.deja.com/
|
|
|
|
|
Re: How to pick a window? [message #23571 is a reply to message #23500] |
Tue, 30 January 2001 11:11  |
thompson
Messages: 584 Registered: August 1991
|
Senior Member |
|
|
davidf@dfanning.com (David Fanning) writes:
... stuff deleted ...
> P.S. Let's just say if IDL weren't first written
> in Neanderthal times we would *all* be using widgets
> as windows. Sheesh!
Let me just say that if IDL were written as an environment where everything
*had* to be done as a widget program, we probably would *not* be using IDL
today. We'd be using something else more forgiving. And I say this as someone
who's written a fair number of widget programs in his time.
William Thompson
|
|
|
Re: How to pick a window? [message #23624 is a reply to message #23425] |
Sun, 28 January 2001 11:03  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Reimar Bauer (r.bauer@fz-juelich.de) writes:
> ;+
> ; NAME:
> ; savesysvar
> ;
> ; PURPOSE:
> ; saves the settings of the !p, !x, !y, !z system
> ; variables in a structure
I'd add the !Map system variable too, if I wanted
a completely general solution. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|