;+ ; ; @file_comments ; ; @categories ; ; @param TOP_UVALUE ; ; @param BASEDOMAIN ; ; @param SELECTED ; ; @keyword DESTROY ; ; @returns ; ; @uses ; ; @restrictions ; ; @examples ; ; @history ; ; @version ; $Id$ ; ; @todo seb ; ;- PRO domainpart, top_uvalue, basedomain, selected, DESTROY=destroy ; compile_opt idl2, strictarrsubs ; if keyword_set(destroy) then BEGIN ; id = widget_info(basedomain,find_by_uname = 'title') ; IF id NE 0 THEN widget_control, id, /destroy id = widget_info(basedomain,find_by_uname = 'oddsecchoice') IF id NE 0 THEN widget_control, id, /destroy id = widget_info(basedomain,find_by_uname = 'evensecchoice') IF id NE 0 THEN widget_control, id, /destroy id = widget_info(basedomain,find_by_uname = 'odd-evensecchoice') IF id NE 0 THEN widget_control, id, /destroy id = widget_info(basedomain,find_by_uname = 'basex') IF id NE 0 THEN widget_control, id, /destroy id = widget_info(basedomain,find_by_uname = 'basey') IF id NE 0 THEN widget_control, id, /destroy id = widget_info(basedomain,find_by_uname = 'basez') IF id NE 0 THEN widget_control, id, /destroy return endif ; ; we get the size of the dimension id of this section ; dimvar = *top_uvalue[1, findline(top_uvalue, 'dimvar')] selecteddim = dimvar[*, selected] typedim = *top_uvalue[1, findline(top_uvalue, 'typedim')] sorteddim = selecteddim[sortdim(typedim[selecteddim])] dimlist = *top_uvalue[1, findline(top_uvalue, 'dimlist')] ; ; longitude part ; basex=widget_info(basedomain,find_by_uname = 'basex') IF basex NE 0 THEN widget_control, basex, /destroy basex=widget_base(basedomain,/row, uname='basex') nothing=widget_text(basex,value='longitude', xsize = 10) nothing=cw_selectinterval(basex,dimlist.(sorteddim[0]),uname='xinterval',uvalue={name:'xinterval'}) ; ; latitude part ; basey=widget_info(basedomain,find_by_uname = 'basey') IF basey NE 0 THEN widget_control, basey, /destroy basey=widget_base(basedomain,/row, uname='basey') nothing=widget_text(basey,value='latitude', xsize = 10) nothing=cw_selectinterval(basey,reverse(dimlist.(sorteddim[1])), uname='yinterval',uvalue={name:'yinterval'}) ; ; depth part ; basez=widget_info(basedomain,find_by_uname = 'basez') IF basez NE 0 THEN widget_control, basez, /destroy basez=widget_base(basedomain,/row, uname='basez') nothing=widget_text(basez,value='depth', xsize = 10) nothing=cw_selectinterval(basez,dimlist.(sorteddim[2]),uname='zinterval',uvalue={name:'zinterval'}) ; end