Re: having IDL output to another X11 window [message #32083] |
Wed, 11 September 2002 10:23 |
Ken Mankoff
Messages: 158 Registered: February 2000
|
Senior Member |
|
|
On Wed, 11 Sep 2002, David Fanning wrote:
> Bringfried Stecklum (stecklum@tls-tautenburg.de) writes:
>
>> Interesting suggestion. I checked it out with the following result
>>
>> IDL Version 5.4.1 (linux x86). (c) 2000, Research Systems, Inc.
>> IDL> window,set_x_id='194.94.209.12:0.0'
>> Xlib: unexpected async reply (sequence 0xaa)!
>> % X windows protocol error: BadDrawable (invalid Pixmap or Window parameter).
>>
>> It seems the keyword is still there but the connection to the X server
>> could not be established.
>
> The ID must be the ID of a X window "visual". I
> don't recall now what this is exactly, but I'm
> pretty sure it is not the display number
> sequence you used. This is a number that the
> operating system assigns to a window when
> it is created.
>
> You can probably use the GET_X_ID keyword when
> you create a window in IDL to see what one of
> these would look like. You will have to do some
> Motif programming, I guess, to get to it.
Or run 'xwininfo' at the command line.
and 'man xwininfo' mentions 'xprop'
-k.
|
|
|
Re: having IDL output to another X11 window [message #32097 is a reply to message #32083] |
Wed, 11 September 2002 06:39  |
Jacques Basson
Messages: 17 Registered: May 1999
|
Junior Member |
|
|
David Fanning wrote:
> Bringfried Stecklum (stecklum@tls-tautenburg.de) writes:
>
>
>> Interesting suggestion. I checked it out with the following result
>>
>> IDL Version 5.4.1 (linux x86). (c) 2000, Research Systems, Inc.
>> IDL> window,set_x_id='194.94.209.12:0.0'
>> Xlib: unexpected async reply (sequence 0xaa)!
>> % X windows protocol error: BadDrawable (invalid Pixmap or Window parameter).
>>
>> It seems the keyword is still there but the connection to the X server
>> could not be established.
>
>
> The ID must be the ID of a X window "visual". I
> don't recall now what this is exactly, but I'm
> pretty sure it is not the display number
> sequence you used. This is a number that the
> operating system assigns to a window when
> it is created.
>
> You can probably use the GET_X_ID keyword when
> you create a window in IDL to see what one of
> these would look like. You will have to do some
> Motif programming, I guess, to get to it.
>
> Cheers,
>
> David
>
I have used this recently, and David's description is perfectly correct,
so here is a working example.
Run the following wish script to get a window and ID (alternatively
check out "man xwininfo" for finding the id of some other window if you
don't have wish installed)
------------------------------------------------------------
#!/bin/sh
# the next line restarts using wish \
exec wish "$0" "$@"
frame .test -width 500 -height 500
listbox .windowid -height 1
button .exit -text "Exit" -command exit
set frameid [winfo id .test]
.windowid insert end $frameid
pack .exit .test .windowid
------------------------------------------------------------ -
Then in IDL
IDL Version 5.5a (linux x86). (c) 2001, Research Systems, Inc.
IDL> window, set_x_id='0x380000e'X
IDL> plot, findgen(100)
Of course yout must insert the appropriate ID (in hex above). Works with
no problems for me. Don't know about Motif though...
Jacques
|
|
|
Re: having IDL output to another X11 window [message #32100 is a reply to message #32097] |
Wed, 11 September 2002 06:30  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Bringfried Stecklum (stecklum@tls-tautenburg.de) writes:
> Interesting suggestion. I checked it out with the following result
>
> IDL Version 5.4.1 (linux x86). (c) 2000, Research Systems, Inc.
> IDL> window,set_x_id='194.94.209.12:0.0'
> Xlib: unexpected async reply (sequence 0xaa)!
> % X windows protocol error: BadDrawable (invalid Pixmap or Window parameter).
>
> It seems the keyword is still there but the connection to the X server
> could not be established.
The ID must be the ID of a X window "visual". I
don't recall now what this is exactly, but I'm
pretty sure it is not the display number
sequence you used. This is a number that the
operating system assigns to a window when
it is created.
You can probably use the GET_X_ID keyword when
you create a window in IDL to see what one of
these would look like. You will have to do some
Motif programming, I guess, to get to it.
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: having IDL output to another X11 window [message #32104 is a reply to message #32100] |
Wed, 11 September 2002 01:16  |
Bringfried Stecklum
Messages: 75 Registered: January 1996
|
Member |
|
|
Dear David,
interesting suggestion. I checked it out with the following result
IDL Version 5.4.1 (linux x86). (c) 2000, Research Systems, Inc.
IDL> window,set_x_id='194.94.209.12:0.0'
Xlib: unexpected async reply (sequence 0xaa)!
% X windows protocol error: BadDrawable (invalid Pixmap or Window parameter).
It seems the keyword is still there but the connection to the X server
could not be established.
regards,
B.St.
--
Bringfried Stecklum
Th"uringer Landessternwarte Tautenburg
Sternwarte 5, D - 07778 Tautenburg, Germany
Phone: +49-36427-863-54, FAX: +49-36427-863-29
|
|
|
Re: having IDL output to another X11 window [message #32105 is a reply to message #32104] |
Tue, 10 September 2002 23:35  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
John R. Iverson wrote:
> The documentation seems sure that I can cause IDL to output graphics to
> another X-Window (external development guide, Ch 19, p348):
>
> "The IDL X Windows graphics driver can draw in windows it did not create
> as long as the window is compatible with the IDL display connection".
>
> However, I can't find any reference as to how to do this. Specifically,
> I am developing a Motif application in which I would like to embed some
> IDL graphics (a map) in an existing display.
>
> Thanks for your help, in advance!
>
> -Rob Iverson
> Sandia National Labs
> jrivers@sandia.gov
if you have a look into idls online help you can read.
DISPLAY
IDL uses the DISPLAY environment variable to choose which X display is
used to display graphics.
Reimar
--
Reimar Bauer
Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
============================================================ =======
|
|
|
Re: having IDL output to another X11 window [message #32117 is a reply to message #32105] |
Tue, 10 September 2002 12:20  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
John R. Iverson (jrivers@sandia.gov) writes:
> The documentation seems sure that I can cause IDL to output graphics to
> another X-Window (external development guide, Ch 19, p348):
>
> "The IDL X Windows graphics driver can draw in windows it did not create
> as long as the window is compatible with the IDL display connection".
>
> However, I can't find any reference as to how to do this. Specifically,
> I am developing a Motif application in which I would like to embed some
> IDL graphics (a map) in an existing display.
Well, years ago you could do this with undocumented keywords
to the X windows driver. I'm not sure it can still be done.
The keywords were SET_X_ID and SET_X_PID for the X window
ID and X pixmap window id, respectively. Use them on a WINDOW command
to set up the window to use the X ID of an existing X
drawable. If present, IDL does not create the required
drawable, but uses the one pointed to by the ID.
Best of luck. I'm thinking you will need it. :-)
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|