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

Home » Public Forums » archive » Re: Determining window types
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: Determining window types [message #33323] Thu, 19 December 2002 08:57 Go to next message
Liam E. Gumley is currently offline  Liam E. Gumley
Messages: 378
Registered: January 2000
Senior Member
"James Tappin" <sjt@star.sr.bham.ac.uk> wrote in message
news:atsr1t$9hu$1@sun3.bham.ac.uk...
[stuf deleted]
> The particular application I had in mind was a case where I wanted to run
an
> interactive locator tool within a package that can either be operated from
> a CLI in which case it uses regular graphics windows, or from a GUI in
> which case it uses a draw_widget and since they get positions in different
> ways this is clearly tricky.

Any chance you could modify the application so it *always* uses draw
widgets?

Cheers,
Liam.
Practical IDL Programming
http://www.gumley.com/
Re: Determining window types [message #33324 is a reply to message #33323] Thu, 19 December 2002 08:10 Go to previous messageGo to next message
James Tappin is currently offline  James Tappin
Messages: 54
Registered: December 1995
Member
David Fanning wrote:

> James Tappin (sjt@star.sr.bham.ac.uk) writes:
>
>> Is there any way of determining whether a graphics window is:
>> 1) A draw widget
>> 2) A pixmap or
>> 3) A regular window?
>>
>> While "device, window_state=wstat" is useful to prevent trying to do
>> illegal operations on on-existent windows, there are sufficient
>> differences between the 3 types of window it would be very useful to be
>> able to distinguish from within a program.
>
> I don't think there is any way to determine between
> windows of different types, but I have to admit I
> don't really see the need for this capability.
>
> Graphics programs are typically either written in such
> a way that they are completely ignorant of where they
> are "going" (I.e., they go into PostScript output as
> easily as they go into the current graphics window)
> or they are written in such as way that you know
> *exactly* where graphic output is going (ie., a
> widget program).
>
> I think only programs that *hope* they know what
> the hell they are doing would benefit from this
> feature. :-)

The particular application I had in mind was a case where I wanted to run an
interactive locator tool within a package that can either be operated from
a CLI in which case it uses regular graphics windows, or from a GUI in
which case it uses a draw_widget and since they get positions in different
ways this is clearly tricky.

James
--
+------------------------+-------------------------------+-- -------+
| James Tappin | School of Physics & Astronomy | O__ |
| sjt@star.sr.bham.ac.uk | University of Birmingham | -- \/` |
| Ph: 0121-414-6462. Fax: 0121-414-3722 | |
+--------------------------------------------------------+-- -------+
Re: Determining window types [message #33327 is a reply to message #33324] Thu, 19 December 2002 06:29 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
James Tappin (sjt@star.sr.bham.ac.uk) writes:

> Is there any way of determining whether a graphics window is:
> 1) A draw widget
> 2) A pixmap or
> 3) A regular window?
>
> While "device, window_state=wstat" is useful to prevent trying to do illegal
> operations on on-existent windows, there are sufficient differences between
> the 3 types of window it would be very useful to be able to distinguish
> from within a program.

I don't think there is any way to determine between
windows of different types, but I have to admit I
don't really see the need for this capability.

Graphics programs are typically either written in such
a way that they are completely ignorant of where they
are "going" (I.e., they go into PostScript output as
easily as they go into the current graphics window)
or they are written in such as way that you know
*exactly* where graphic output is going (ie., a
widget program).

I think only programs that *hope* they know what
the hell they are doing would benefit from this
feature. :-)

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: Determining window types [message #33405 is a reply to message #33324] Fri, 20 December 2002 09:52 Go to previous message
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
I think Liam's suggestion is the way to go. If you had multiple DG
windows and worked in CLI you have no other means of changing the target
window but WSET. And if you do use WSET then you obviously know the
target window ID.
The only way to allow interactive window selection, AFAIK, is to use
widgets. Here's one simple template that may help:
http://www.ainaco.com/idl/idl_library/smart_w.pro
Cheers,
Pavel

James Tappin wrote:
>
> David Fanning wrote:
>
>> James Tappin (sjt@star.sr.bham.ac.uk) writes:
>>
>>> Is there any way of determining whether a graphics window is:
>>> 1) A draw widget
>>> 2) A pixmap or
>>> 3) A regular window?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: The IDL Book Bidness
Next Topic: How do I get the path for a UNIT of a file?

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

Current Time: Wed Oct 08 15:13:08 PDT 2025

Total time taken to generate the page: 0.00665 seconds