;------------------------------------------------------------- ;+ ; NAME: ; WINLIST ; PURPOSE: ; List windows in use. ; CATEGORY: ; CALLING SEQUENCE: ; winlist, list ; INPUTS: ; KEYWORD PARAMETERS: ; Keywords: ; FREE=free Returned list of free windows. ; /QUIET Suppress listing. ; OUTPUTS: ; list = returned list of window numbers in use. out ; COMMON BLOCKS: ; NOTES: ; Note: lists window indices and sizes. ; MODIFICATION HISTORY: ; R. Sterner, 2001 Mar 30 ; ; Copyright (C) 2001, Johns Hopkins University/Applied Physics Laboratory ; This software may be used, copied, or redistributed as long as it is not ; sold and this copyright notice is reproduced on each copy made. This ; routine is provided as is without any express or implied warranties ; whatsoever. Other limitations apply as described in the file disclaimer.txt. ;- ;------------------------------------------------------------- pro winlist, list, free=free, quiet=quiet, help=hlp if keyword_set(hlp) then begin print,' List windows in use.' print,' winlist, list' print,' list = returned list of window numbers in use. out' print,' Keywords:' print,' FREE=free Returned list of free windows.' print,' /QUIET Suppress listing.' print,' Note: lists window indices and sizes.' return endif active = !d.window device,window_state=s list = where(s eq 1,n) free = where(s eq 0) if n eq 0 then begin print,' No windows are open.' return endif if keyword_set(quiet) then return print,' Windows in use, sizes, & lower left corner (from screen llc):' for i=0,n-1 do begin in = list(i) wset,in if in eq active then txt=' <-- current' else txt='' xs = !d.x_size ys = !d.y_size device, get_window_position=pos print,' '+strtrim(list(i),2)+': of size '+strtrim(xs,2)+' x '+$ strtrim(ys,2)+' at ('+strtrim(pos(0),2)+', '+strtrim(pos(1),2)+ $ ') '+txt endfor wset, active end