;------------------------------------------------------------- ;+ ; NAME: ; MAKE_WINDOW ; PURPOSE: ; Make a window, regular or scrolling. ; CATEGORY: ; CALLING SEQUENCE: ; make_window, xs, ys ; INPUTS: ; xs,ys = x and y window size. in ; KEYWORD PARAMETERS: ; Keywords: ; X_SCR=x_scr X size of scrolling region. ; Y_SCR=y_scr Y size of scrolling region. ; Def = up to 90% of screen size. ; TITLE=tt Window title (def=none). ; OUTPUTS: ; COMMON BLOCKS: ; NOTES: ; MODIFICATION HISTORY: ; R. Sterner, 2002 Apr 16 ; ; Copyright (C) 2002, 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 make_window, xs, ys, x_scr=x_scr, y_scr=y_scr, $ title=tt, help=hlp if (n_params(0) lt 2) or keyword_set(hlp) then begin print,' Make a window, regular or scrolling.' print,' make_window, xs, ys' print,' xs,ys = x and y window size. in' print,' Keywords:' print,' X_SCR=x_scr X size of scrolling region.' print,' Y_SCR=y_scr Y size of scrolling region.' print,' Def = up to 90% of screen size.' print,' TITLE=tt Window title (def=none).' return endif if n_elements(tt) eq 0 then tt=' ' ;---- Get size limits -------- device,get_screen_size=sz sz = 0.90*sz xmx = round(sz(0)) ymx = round(sz(1)) if n_elements(x_scr) eq 0 then x_scr=xmx if n_elements(y_scr) eq 0 then y_scr=ymx ;---- Set up window ----------- if (xs gt xmx) or (ys gt ymx) then begin swindow,xs=xs,ys=ys,x_scr=xs