source: trunk/ToBeReviewed/WIDGET/AUTOUR_de_XXX/updatewidget.pro @ 69

Last change on this file since 69 was 69, checked in by smasson, 18 years ago

debug + new xxx

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 2.8 KB
Line 
1PRO updatewidget, base, NOBOXZOOM = noboxzoom, NODATES = nodates, NOTYPE = notype
2;----------------------------------------------------------------------
3   widget_control,base, get_uvalue = top_uvalue
4   smallin = extractatt(top_uvalue, 'smallin')
5   numdessinin = smallin[2]-1
6;
7;----------------------------------------------------------------------
8   widget_control, base, update = 0
9;--------------
10; date1 et date2
11;--------------
12   if keyword_set(nodates) then begin
13      date1 = 0
14      date2 = 0
15   ENDIF ELSE BEGIN
16      dates = (extractatt(top_uvalue, 'dates'))[*, numdessinin]
17      date1 = dates[0] & date2 = dates[1]
18   ENDELSE
19;--------------
20; domain
21;--------------
22   boxzoom = (extractatt(top_uvalue, 'domaines'))[*, numdessinin]
23   if total(boxzoom) EQ 0 then boxzoom = -1
24   if keyword_set(noboxzoom) then boxzoom = 0
25;--------------
26; varinfo: filename & namevar
27;--------------
28   varinfo = (extractatt(top_uvalue, 'varinfo'))[*, numdessinin]
29   filename = varinfo[0] & nomvar = varinfo[1]
30;
31   if filename NE '' OR nomvar NE '' THEN BEGIN
32      changefile, base, filename, fieldname = nomvar, BOXZOOM = boxzoom, DATE1 = date1, DATE2 = date2
33   ENDIF ELSE BEGIN
34      if date1 NE 0 then begin
35         date1id = widget_info(base, find_by_uname = 'calendar1')
36         widget_control, date1id, set_value = date1
37      endif
38      if date2 NE 0 then begin
39         date2id = widget_info(base, find_by_uname = 'calendar2')
40         widget_control, date2id, set_value = date2
41      endif
42      if keyword_set(boxzoom) then BEGIN
43         domainid = widget_info(base, find_by_uname = 'domain')
44         widget_control, domainid, set_value = boxzoom
45      endif
46   ENDELSE
47;--------------
48; exextra
49;--------------
50   if n_elements(*((extractatt(top_uvalue, 'exextra'))[numdessinin])) NE 0 then begin
51      exextra = *((extractatt(top_uvalue, 'exextra'))[numdessinin])
52      specifieid = widget_info(base,find_by_uname = 'specifie')
53      widget_control, specifieid, set_value = exextra
54   endif
55;--------------
56; text command
57;--------------
58   txtcmd = (extractatt(top_uvalue,  'txtcmd'))[numdessinin]
59   if txtcmd NE '' then begin
60      txtcmdid = widget_info(base, find_by_uname = 'txtcmd')
61      widget_control, txtcmdid, set_value = txtcmd
62   endif
63;--------------
64; graphtype
65;--------------   
66   if NOT keyword_set(notype) then BEGIN
67      graphtype = (extractatt(top_uvalue, 'types'))[numdessinin]
68      if graphtype NE '' then begin
69         actionid = widget_info(base,find_by_uname = 'action')
70         widget_control, actionid, get_value = action_value
71         widget_control, actionid, set_combobox_select = (where(action_value EQ graphtype))[0]
72      endif
73   endif
74;--------------
75   widget_control, base, update = 1
76;--------------
77;----------------------------------------------------------------------
78   return
79end
Note: See TracBrowser for help on using the repository browser.