source: trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/updatewidget.pro @ 367

Last change on this file since 367 was 327, checked in by pinsard, 16 years ago

modification of headers : mainly blanks around = sign for keywords in declaration of function and pro

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.0 KB
Line 
1;+
2;
3; @file_comments
4;
5; @categories
6;
7; @param BASE {in}{required}
8; The id of the widget where apply the drawing.
9;
10; @keyword NOBOXZOOM
11;
12; @keyword NODATES
13;
14; @keyword NOTYPE
15;
16; @returns
17;
18; @uses
19;
20; @restrictions
21;
22; @examples
23;
24; @history
25;
26; @version
27; $Id$
28;
29; @todo
30; seb
31;
32;-
33PRO updatewidget, base, NOBOXZOOM=noboxzoom, NODATES=nodates, NOTYPE=notype
34;
35  compile_opt idl2, strictarrsubs
36;
37   widget_control,base, get_uvalue = top_uvalue
38   smallin = extractatt(top_uvalue, 'smallin')
39   numdessinin = smallin[2]-1
40;
41;----------------------------------------------------------------------
42   widget_control, base, update = 0
43;--------------
44; date1 and date2
45;--------------
46   if keyword_set(nodates) then begin
47      date1 = 0
48      date2 = 0
49   ENDIF ELSE BEGIN
50      dates = (extractatt(top_uvalue, 'dates'))[*, numdessinin]
51      date1 = dates[0] & date2 = dates[1]
52   ENDELSE
53;--------------
54; domain
55;--------------
56   boxzoom = (extractatt(top_uvalue, 'domaines'))[*, numdessinin]
57   if total(boxzoom) EQ 0 then boxzoom = -1
58   if keyword_set(noboxzoom) then boxzoom = 0
59;--------------
60; varinfo: filename & namevar
61;--------------
62   varinfo = (extractatt(top_uvalue, 'varinfo'))[*, numdessinin]
63   filename = varinfo[0] & nomvar = varinfo[1]
64;
65   if filename NE '' OR nomvar NE '' THEN BEGIN
66      changefile, base, filename, fieldname = nomvar, BOXZOOM = boxzoom, DATE1 = date1, DATE2 = date2
67   ENDIF ELSE BEGIN
68      if date1 NE 0 then begin
69         date1id = widget_info(base, find_by_uname = 'calendar1')
70         widget_control, date1id, set_value = date1
71      endif
72      if date2 NE 0 then begin
73         date2id = widget_info(base, find_by_uname = 'calendar2')
74         widget_control, date2id, set_value = date2
75      endif
76      if keyword_set(boxzoom) then BEGIN
77         domainid = widget_info(base, find_by_uname = 'domain')
78         widget_control, domainid, set_value = boxzoom
79      endif
80   ENDELSE
81;--------------
82; exextra
83;--------------
84   if n_elements(*((extractatt(top_uvalue, 'exextra'))[numdessinin])) NE 0 then begin
85      exextra = *((extractatt(top_uvalue, 'exextra'))[numdessinin])
86      specifieid = widget_info(base,find_by_uname = 'specifie')
87      widget_control, specifieid, set_value = exextra
88   endif
89;--------------
90; text command
91;--------------
92   txtcmd = (extractatt(top_uvalue,  'txtcmd'))[numdessinin]
93   if txtcmd NE '' then begin
94      txtcmdid = widget_info(base, find_by_uname = 'txtcmd')
95      widget_control, txtcmdid, set_value = txtcmd
96   endif
97;--------------
98; graphtype
99;--------------
100   if NOT keyword_set(notype) then BEGIN
101      graphtype = (extractatt(top_uvalue, 'types'))[numdessinin]
102      if graphtype NE '' then begin
103         actionid = widget_info(base,find_by_uname = 'action')
104         widget_control, actionid, get_value = action_value
105         widget_control, actionid, set_combobox_select = (where(action_value EQ graphtype))[0]
106      endif
107   endif
108;--------------
109   widget_control, base, update = 1
110;--------------
111;----------------------------------------------------------------------
112   return
113end
Note: See TracBrowser for help on using the repository browser.