Re: Is that window open?? [message #8567 is a reply to message #8562] |
Thu, 03 April 1997 00:00   |
steinhh
Messages: 260 Registered: June 1994
|
Senior Member |
|
|
In article <brian.jackel.115.5380EC62@uwo.ca>, brian.jackel@uwo.ca (Brian Jackel) writes:
[..]
|> For the "standard" set of windows, DEVICE,WINDOW_STATE=window_state
|> works, but this seems to apply only to windows 0 to 30, and the Draw_widget
|> comes out of a pool from 31 or more. I ran across this when trying to make
|> a window manager which would remember plotting states in different windows,
|> but never found a good way to handle widget windows. In the end I wrapped
|> the WSET inside an EXECUTE(), and caught the error (if any) that way. Please
|> post if some more graceful approach is possible.
|>
I don't think this is a problem - the array size returned
by the WINDOW_STATE keyword expands as you go (at least for
me), e.g.:
IDL> device,window_state=w
IDL> help,w
W BYTE = Array(32)
IDL> base=widget_base()
IDL> drw=widget_draw(base,xsize=10,ysize=10)
IDL> widget_control,base,/realize
IDL> device,window_state=ww
IDL> help,ww
WW BYTE = Array(33)
The reason I know is that I once made a system for saving/restoring plot
region states which works OK. It's available as a tiny part of the solarsoft
library (see e.g., http://www.space.lockheed.com/eit/ssw_setup.html)
If you don't want the whole package, the routines are called
pstore.pro, prestore.pro, pconvert.pro, pfind.pro, at
http://sohowww.nascom.nasa.gov/solarsoft/gen/idl/display/
There may be dependencies on other software in the solarsoft/gen tree,
though... at least the following:
../idl/string/trim.pro
../idl/system/get_viewport.pro
../idl/system/setscale.pro
../idl/system/setwindow.pro
Regards,
Stein Vidar
|
|
|