;+ ; ; @file_comments ; ; @categories ; ; @param BASE {in}{required} ; The id of the widget where apply the drawing. ; ; @keyword NOBOXZOOM ; ; @keyword NODATES ; ; @keyword NOTYPE ; ; @returns ; ; @uses ; ; @restrictions ; ; @examples ; ; @history ; ; @version ; $Id$ ; ; @todo ; seb ; ;- PRO updatewidget, base, NOBOXZOOM=noboxzoom, NODATES=nodates, NOTYPE=notype ; compile_opt idl2, strictarrsubs ; widget_control,base, get_uvalue = top_uvalue smallin = extractatt(top_uvalue, 'smallin') numdessinin = smallin[2]-1 ; ;---------------------------------------------------------------------- widget_control, base, update = 0 ;-------------- ; date1 and date2 ;-------------- if keyword_set(nodates) then begin date1 = 0 date2 = 0 ENDIF ELSE BEGIN dates = (extractatt(top_uvalue, 'dates'))[*, numdessinin] date1 = dates[0] & date2 = dates[1] ENDELSE ;-------------- ; domain ;-------------- boxzoom = (extractatt(top_uvalue, 'domaines'))[*, numdessinin] if total(boxzoom) EQ 0 then boxzoom = -1 if keyword_set(noboxzoom) then boxzoom = 0 ;-------------- ; varinfo: filename & namevar ;-------------- varinfo = (extractatt(top_uvalue, 'varinfo'))[*, numdessinin] filename = varinfo[0] & nomvar = varinfo[1] ; if filename NE '' OR nomvar NE '' THEN BEGIN changefile, base, filename, fieldname = nomvar, BOXZOOM = boxzoom, DATE1 = date1, DATE2 = date2 ENDIF ELSE BEGIN if date1 NE 0 then begin date1id = widget_info(base, find_by_uname = 'calendar1') widget_control, date1id, set_value = date1 endif if date2 NE 0 then begin date2id = widget_info(base, find_by_uname = 'calendar2') widget_control, date2id, set_value = date2 endif if keyword_set(boxzoom) then BEGIN domainid = widget_info(base, find_by_uname = 'domain') widget_control, domainid, set_value = boxzoom endif ENDELSE ;-------------- ; exextra ;-------------- if n_elements(*((extractatt(top_uvalue, 'exextra'))[numdessinin])) NE 0 then begin exextra = *((extractatt(top_uvalue, 'exextra'))[numdessinin]) specifieid = widget_info(base,find_by_uname = 'specifie') widget_control, specifieid, set_value = exextra endif ;-------------- ; text command ;-------------- txtcmd = (extractatt(top_uvalue, 'txtcmd'))[numdessinin] if txtcmd NE '' then begin txtcmdid = widget_info(base, find_by_uname = 'txtcmd') widget_control, txtcmdid, set_value = txtcmd endif ;-------------- ; graphtype ;-------------- if NOT keyword_set(notype) then BEGIN graphtype = (extractatt(top_uvalue, 'types'))[numdessinin] if graphtype NE '' then begin actionid = widget_info(base,find_by_uname = 'action') widget_control, actionid, get_value = action_value widget_control, actionid, set_combobox_select = (where(action_value EQ graphtype))[0] endif endif ;-------------- widget_control, base, update = 1 ;-------------- ;---------------------------------------------------------------------- return end