[150] | 1 | ;+ |
---|
| 2 | ; @file_comments |
---|
| 3 | ; |
---|
| 4 | ; |
---|
| 5 | ; @categories |
---|
| 6 | ; |
---|
[226] | 7 | ; |
---|
[150] | 8 | ; @param EVENT |
---|
| 9 | ; |
---|
| 10 | ; @returns |
---|
[226] | 11 | ; |
---|
[150] | 12 | ; @uses |
---|
[226] | 13 | ; |
---|
[150] | 14 | ; @restrictions |
---|
[226] | 15 | ; |
---|
[150] | 16 | ; @examples |
---|
[226] | 17 | ; |
---|
[150] | 18 | ; @history |
---|
[226] | 19 | ; |
---|
| 20 | ; @version |
---|
[150] | 21 | ; $Id$ |
---|
| 22 | ; |
---|
[226] | 23 | ; @todo |
---|
[150] | 24 | ; seb |
---|
| 25 | ;- |
---|
[2] | 26 | ;------------------------------------------------ |
---|
| 27 | PRO xxxmenubar_event, event |
---|
[114] | 28 | ; |
---|
| 29 | compile_opt idl2, strictarrsubs |
---|
| 30 | ; |
---|
[2] | 31 | @common |
---|
| 32 | |
---|
| 33 | |
---|
[69] | 34 | case event.value of |
---|
[226] | 35 | 'Open' :begin |
---|
[69] | 36 | oldmeshparams = ccmeshparameters |
---|
| 37 | newfile = selectfile() |
---|
| 38 | if size(newfile, /type) NE 8 then return |
---|
| 39 | widget_control, event.top, /hourglass |
---|
| 40 | widget_control, event.top, update = 0 |
---|
| 41 | widget_control, event.top, get_uvalue = top_uvalue |
---|
[150] | 42 | ; We take care of filelist |
---|
[69] | 43 | filelist = extractatt(top_uvalue, 'filelist') |
---|
| 44 | filelist = [filelist, newfile.fileparameters.filename] |
---|
| 45 | currentfile = n_elements(filelist)-1 |
---|
[150] | 46 | ; We update the widget |
---|
[69] | 47 | filelistid = widget_info(event.top, find_by_uname = 'filelist') |
---|
| 48 | widget_control, filelistid, combobox_additem = file_basename(newfile.fileparameters.filename) |
---|
| 49 | widget_control, filelistid, set_combobox_select = currentfile |
---|
[150] | 50 | ; We update filelist and currentfile's elements of the top_value |
---|
[69] | 51 | *top_uvalue[1, findline(top_uvalue, 'filelist')] = filelist |
---|
| 52 | oldfile = *top_uvalue[1, findline(top_uvalue, 'currentfile')] |
---|
| 53 | *top_uvalue[1, findline(top_uvalue, 'currentfile')] = currentfile |
---|
[150] | 54 | ; We take care of the name of the variable |
---|
[69] | 55 | vlstid = widget_info(event.top, find_by_uname = 'varlist') |
---|
[150] | 56 | ; What is the selected field ? Do we reselect it ? |
---|
[69] | 57 | fieldname = widget_info(vlstid, /combobox_gettext) |
---|
[226] | 58 | index = where(newfile.fileparameters.listvar EQ fieldname) |
---|
[69] | 59 | widget_control, vlstid, set_value = newfile.fileparameters.listvar |
---|
| 60 | widget_control, vlstid, set_combobox_select = 0 > index[0] |
---|
[150] | 61 | ; We take care of the calendar. |
---|
[74] | 62 | key_caltype = newfile.fileparameters.caltype |
---|
[69] | 63 | date1id = widget_info(event.top, find_by_uname = 'calendar1') |
---|
| 64 | widget_control, date1id, get_value = date1 |
---|
| 65 | widget_control, date1id, /destroy |
---|
[74] | 66 | jdate1 = jul2date(date1) |
---|
| 67 | if (where(newfile.fileparameters.time_counter EQ jdate1))[0] EQ -1 $ |
---|
| 68 | then jdate1 = newfile.fileparameters.time_counter[0] |
---|
[69] | 69 | date2id = widget_info(event.top, find_by_uname = 'calendar2') |
---|
| 70 | widget_control, date2id, get_value = date2 |
---|
| 71 | widget_control, date2id, /destroy |
---|
[74] | 72 | jdate2 = jul2date(date2) |
---|
| 73 | if (where(newfile.fileparameters.time_counter EQ jdate2))[0] EQ -1 then jdate2 = jdate1 |
---|
[69] | 74 | basecal = widget_info(event.top, find_by_uname = 'basecal') |
---|
[74] | 75 | fakecal = newfile.fileparameters.fakecal |
---|
| 76 | rien = cw_calendar(basecal, newfile.fileparameters.time_counter, jdate1, uname = 'calendar1' $ |
---|
| 77 | , FAKECAL = fakecal, uvalue = {name:'calendar1'}, /frame) |
---|
| 78 | rien = cw_calendar(basecal, newfile.fileparameters.time_counter, jdate2, uname = 'calendar2' $ |
---|
| 79 | , FAKECAL = fakecal, uvalue = {name:'calendar2'}, /frame) |
---|
[150] | 80 | ; We update fileparameters, readparameters et meshparameters elements of the top_value |
---|
[69] | 81 | newfileparameters = ptrarr(currentfile+1, /allocate_heap) |
---|
| 82 | FOR i = 0, currentfile-1 DO $ |
---|
| 83 | *newfileparameters[i] = *(extractatt(top_uvalue, 'fileparameters'))[i] |
---|
| 84 | *newfileparameters[currentfile] = newfile.fileparameters |
---|
| 85 | ptr_free, extractatt(top_uvalue, 'fileparameters') |
---|
| 86 | *top_uvalue[1, findline(top_uvalue, 'fileparameters')] = newfileparameters |
---|
[2] | 87 | ; |
---|
[69] | 88 | newreadparameters = ptrarr(currentfile+1, /allocate_heap) |
---|
| 89 | FOR i = 0, currentfile-1 DO $ |
---|
| 90 | *newreadparameters[i] = *(extractatt(top_uvalue, 'readparameters'))[i] |
---|
| 91 | *newreadparameters[currentfile] = newfile.readparameters |
---|
| 92 | ptr_free, extractatt(top_uvalue, 'readparameters') |
---|
| 93 | *top_uvalue[1, findline(top_uvalue, 'readparameters')] = newreadparameters |
---|
[2] | 94 | ; |
---|
[69] | 95 | newmeshparameters = ptrarr(currentfile+1, /allocate_heap) |
---|
| 96 | FOR i = 0, currentfile-1 DO $ |
---|
| 97 | *newmeshparameters[i] = *(extractatt(top_uvalue, 'meshparameters'))[i] |
---|
| 98 | *newmeshparameters[currentfile] = newfile.meshparameters |
---|
| 99 | ptr_free, extractatt(top_uvalue, 'meshparameters') |
---|
| 100 | *top_uvalue[1, findline(top_uvalue, 'meshparameters')] = newmeshparameters |
---|
[150] | 101 | ; We update the widget! |
---|
[69] | 102 | if cmpgrid(oldmeshparams) then BEGIN |
---|
| 103 | domainid = widget_info(event.top, find_by_uname = 'domain') |
---|
| 104 | widget_control, domainid, set_value = -1 |
---|
| 105 | endif |
---|
| 106 | widget_control, event.top, update = 1 |
---|
| 107 | end |
---|
| 108 | 'New xxx' :BEGIN |
---|
| 109 | widget_control, event.top, get_uvalue = top_uvalue |
---|
| 110 | extra = extractatt(top_uvalue, 'extra') |
---|
| 111 | xxx, CALLERWIDID = event.top, _extra = extra |
---|
| 112 | end |
---|
[226] | 113 | 'Quit':begin |
---|
[69] | 114 | widget_control, event.top, get_uvalue = top_uvalue |
---|
| 115 | ptr_free, extractatt(top_uvalue, 'exextra') |
---|
| 116 | ptr_free, extractatt(top_uvalue, 'fileparameters') |
---|
| 117 | ptr_free, extractatt(top_uvalue, 'readparameters') |
---|
| 118 | ptr_free, extractatt(top_uvalue, 'meshparameters') |
---|
| 119 | ptr_free, top_uvalue |
---|
[150] | 120 | widget_control, event.top, /destroy ;We shut the widget |
---|
[69] | 121 | end |
---|
| 122 | 'PostScript' :BEGIN |
---|
| 123 | IF lmgr(/demo) EQ 1 THEN BEGIN |
---|
| 124 | dummy = report('impossible to save as postscript in demo mode') |
---|
| 125 | return |
---|
| 126 | ENDIF |
---|
| 127 | widget_control, event.top, get_uvalue = top_uvalue |
---|
[150] | 128 | ; We recuperate the list of instructions |
---|
[69] | 129 | globalcommand = extractatt(top_uvalue, 'globalcommand') |
---|
| 130 | ; for i = 0, n_elements(globalcommand)-1 do print, globalcommand[i] |
---|
[150] | 131 | ; We complete by first and last lines of the program. |
---|
[69] | 132 | createpro, globalcommand, filename = myuniquetmpdir + 'xxx2ps.pro' $ |
---|
| 133 | , KWDLIST = ', NOERASE = noerase, POSTSCRIPT = postscript' $ |
---|
| 134 | +', PORTRAIT = portrait, LANDSCAPE = landscape' $ |
---|
| 135 | +', DATE1IN = date1in, DATE2IN = date2in' $ |
---|
| 136 | , /POSTSCRIPT |
---|
| 137 | END |
---|
[226] | 138 | 'Animated gif' :begin |
---|
[69] | 139 | IF float(strmid(!version.release,0,3)) GE 6.2 THEN xcreateanim, event.top |
---|
| 140 | end |
---|
| 141 | 'Gif' :BEGIN |
---|
| 142 | IF lmgr(/demo) EQ 1 THEN BEGIN |
---|
| 143 | dummy = report('impossible to save as an image in demo mode') |
---|
| 144 | return |
---|
| 145 | ENDIF |
---|
| 146 | widget_control, event.top, get_uvalue = top_uvalue |
---|
| 147 | smallin = extractatt(top_uvalue, 'smallin') |
---|
| 148 | numdessinin = smallin[2]-1 |
---|
| 149 | smallout = extractatt(top_uvalue, 'smallout') |
---|
| 150 | numdessinout = smallout[2]-1 |
---|
| 151 | tracecadre, smallin, /erase |
---|
| 152 | tracecadre, smallout, /erase |
---|
| 153 | filename = xquestion('dans quelle fichier gif voulez vous sauver !C l''ecran de xxx?', 'xxx_image.gif') |
---|
| 154 | if rstrpos(filename, '.gif') NE strlen(filename)-4 then filename = filename+'.gif' |
---|
| 155 | filename = isafile(file = filename, io = imagedir, /new) |
---|
| 156 | saveimage, filename, /quiet |
---|
| 157 | end |
---|
| 158 | 'IDL procedure':BEGIN |
---|
| 159 | IF lmgr(/demo) EQ 1 THEN BEGIN |
---|
| 160 | dummy = report('impossible to save as a idl program file in demo mode') |
---|
| 161 | return |
---|
| 162 | ENDIF |
---|
[150] | 163 | ; We recuperate the name of the file |
---|
[69] | 164 | filename = xquestion('dans quelle procedure IDL voulez vous sauver !C la realisation de ce graph?', 'xxx_figure.pro') |
---|
[150] | 165 | ; We complete it by a .pro |
---|
[69] | 166 | if rstrpos(filename, '.pro') NE strlen(filename)-4 then filename = filename+'.pro' |
---|
| 167 | filename = isafile(file = filename, io = homedir, /new) |
---|
| 168 | widget_control, event.top, get_uvalue = top_uvalue |
---|
[150] | 169 | ; portrait or landscape ??? |
---|
[226] | 170 | options = extractatt(top_uvalue, 'options') |
---|
[69] | 171 | optionsflag = extractatt(top_uvalue, 'optionsflag') |
---|
| 172 | portrait = (optionsflag[where(options EQ 'Portrait/Landscape'), 0])[0] |
---|
[150] | 173 | ; We read commands to do a plot |
---|
[69] | 174 | globalcommand = extractatt(top_uvalue, 'globalcommand') |
---|
[150] | 175 | ; We complete by first and last lines of the program |
---|
[69] | 176 | thisOS = strupcase(strmid(!version.os_family, 0, 3)) |
---|
| 177 | CASE thisOS of |
---|
| 178 | 'MAC':sep = ':' |
---|
| 179 | 'WIN':sep = '\' |
---|
| 180 | ELSE:sep = '/' |
---|
| 181 | ENDCASE |
---|
| 182 | poslastsep = rstrpos(filename, sep) |
---|
| 183 | proname = strmid(filename, poslastsep+1, strlen(filename)-poslastsep-1-4) |
---|
| 184 | globalcommand = ['pro '+proname+', NOERASE = noerase, POSTSCRIPT = postscript, PORTRAIT = portrait, LANDSCAPE = landscape, DATE1IN = date1in, DATE2IN = date2in, _extra = ex' $ |
---|
| 185 | , ' ' $ |
---|
| 186 | , ' '+globalcommand $ |
---|
| 187 | , ' ' $ |
---|
| 188 | , 'return' $ |
---|
| 189 | , 'end'] |
---|
[150] | 190 | ; We write it in a program |
---|
[69] | 191 | putfile, filename, globalcommand |
---|
| 192 | END |
---|
| 193 | 'RESTORE kwd of xxx':BEGIN |
---|
| 194 | IF lmgr(/demo) EQ 1 THEN BEGIN |
---|
| 195 | dummy = report('impossible to save the widget in demo mode') |
---|
| 196 | return |
---|
| 197 | ENDIF |
---|
[150] | 198 | ; We recuperate the name of the file |
---|
[226] | 199 | filename = xquestion('In which binary file do you want to save the widget ?', 'xxx_widget.dat') |
---|
[150] | 200 | ; We complete it by a .dat |
---|
[69] | 201 | if rstrpos(filename, '.dat') NE strlen(filename)-4 then filename = filename+'.dat' |
---|
| 202 | filename = isafile(file = filename, io = homedir, /new) |
---|
[2] | 203 | ; |
---|
[69] | 204 | widget_control, event.top, get_uvalue = uvalue |
---|
| 205 | widget_control, extractatt(uvalue, 'graphid'), get_value = win |
---|
| 206 | wshow, win |
---|
| 207 | wset, win |
---|
| 208 | image = tvrd(/true) |
---|
| 209 | save, uvalue, image, filename = filename |
---|
| 210 | END |
---|
| 211 | 'Print to prompt':BEGIN |
---|
| 212 | commande = getfile(myuniquetmpdir + 'xxx_oneplot.pro') |
---|
| 213 | for i = 0, n_elements(commande)-1 do print, commande[i] |
---|
| 214 | end |
---|
[226] | 215 | 'Portrait/Landscape' :begin |
---|
[69] | 216 | widget_control, event.top, get_uvalue = top_uvalue |
---|
| 217 | options = extractatt(top_uvalue, 'options') |
---|
| 218 | index = where(options EQ 'Portrait/Landscape') & index = index[0] |
---|
| 219 | optionsflag = extractatt(top_uvalue, 'optionsflag') |
---|
| 220 | key_portrait = 1-optionsflag[index, 0] |
---|
| 221 | (*top_uvalue[1, findline(top_uvalue, 'optionsflag')])[index, *] = key_portrait |
---|
[150] | 222 | ; Separated windows or windows stuck to the widget? |
---|
[69] | 223 | if widget_info(event.top, find_by_uname = 'graph') EQ 0 then BEGIN |
---|
[150] | 224 | ; We delete the window |
---|
[69] | 225 | graphid = extractatt(top_uvalue, 'graphid') |
---|
| 226 | widget_control, widget_info(graphid, /parent), /destroy |
---|
[150] | 227 | ; We recreate it. |
---|
[69] | 228 | basegraph = widget_base(title = 'xxx window', group_leader = event.top, uvalue = event.top, uname = 'basegraph') |
---|
| 229 | windsize = givewindowsize() |
---|
| 230 | graphid = widget_draw(basegraph, uname = 'graph' $ |
---|
| 231 | , uvalue = {name:'graph', press:0, click:0, x:[0., 0.], y:[0., 0.]} $ |
---|
| 232 | , /button_events, retain = 2 $ |
---|
| 233 | , xsize = windsize[0], ysize = windsize[1]) |
---|
| 234 | widget_control, basegraph, /realize |
---|
| 235 | xmanager, 'xxx', basegraph, /no_block |
---|
[150] | 236 | ; We redraw what their were into it |
---|
| 237 | ; We recuperate the list of instructions |
---|
[69] | 238 | globalcommand = extractatt(top_uvalue, 'globalcommand') |
---|
[150] | 239 | ; We complete by first and last lines of the program |
---|
[69] | 240 | createpro, globalcommand, filename = myuniquetmpdir + 'xxx2ps.pro' $ |
---|
| 241 | , KWDLIST = ', NOERASE = noerase, POSTSCRIPT = postscript, PORTRAIT = portrait, LANDSCAPE = landscape' $ |
---|
| 242 | , KWDUSED = ', /noerase, PORTRAIT = portrait' |
---|
[150] | 243 | ; We reattribute the graphic element of the top_value |
---|
[69] | 244 | *top_uvalue[1, findline(top_uvalue, 'graphid')] = graphid |
---|
| 245 | ENDIF ELSE BEGIN |
---|
| 246 | extra = extractatt(top_uvalue, 'extra') |
---|
| 247 | xxx, CALLERWIDID = event.top, /redraw, _extra = extra |
---|
[150] | 248 | widget_control, event.top, /destroy ;We shut the widget |
---|
[69] | 249 | ENDELSE |
---|
| 250 | end |
---|
[226] | 251 | 'Overlay' :begin |
---|
[69] | 252 | widget_control, event.top, get_uvalue = top_uvalue |
---|
| 253 | numdessinin = (extractatt(top_uvalue, 'smallin'))[2]-1 |
---|
[226] | 254 | options = extractatt(top_uvalue, 'options') |
---|
[69] | 255 | flags = extractatt(top_uvalue, 'optionsflag') |
---|
| 256 | index = where(options EQ 'Overlay') |
---|
[150] | 257 | ; We change the flag on Longitude / x index |
---|
[69] | 258 | flag = 1-flags[index, numdessinin] & flag = flag[0] |
---|
[150] | 259 | ; We reattribute it |
---|
[69] | 260 | (*top_uvalue[1, findline(top_uvalue, 'optionsflag')])[index, numdessinin] = flag |
---|
| 261 | end |
---|
| 262 | 'Vecteur':BEGIN |
---|
| 263 | widget_control, event.top, get_uvalue = top_uvalue |
---|
| 264 | numdessinin = (extractatt(top_uvalue, 'smallin'))[2]-1 |
---|
[226] | 265 | options = extractatt(top_uvalue, 'options') |
---|
[69] | 266 | flags = extractatt(top_uvalue, 'optionsflag') |
---|
| 267 | index = where(options EQ 'Vecteur') |
---|
[150] | 268 | ; We change the flag on Longitude / x index |
---|
[69] | 269 | flag = 1-flags[index, numdessinin] & flag = flag[0] |
---|
[150] | 270 | ; We reattribute it |
---|
[69] | 271 | (*top_uvalue[1, findline(top_uvalue, 'optionsflag')])[index, numdessinin] = flag |
---|
| 272 | end |
---|
| 273 | 'Longitude / x index':BEGIN |
---|
| 274 | widget_control, event.top, get_uvalue = top_uvalue |
---|
| 275 | numdessinin = (extractatt(top_uvalue, 'smallin'))[2]-1 |
---|
[226] | 276 | options = extractatt(top_uvalue, 'options') |
---|
[69] | 277 | flags = extractatt(top_uvalue, 'optionsflag') |
---|
| 278 | index = where(options EQ 'Longitude / x index') |
---|
[150] | 279 | ; We change the flag on Longitude / x index |
---|
[69] | 280 | flag = 1-flags[index, numdessinin] & flag = flag[0] |
---|
[150] | 281 | ; We reattribute it |
---|
[69] | 282 | (*top_uvalue[1, findline(top_uvalue, 'optionsflag')])[index, numdessinin] = flag |
---|
[150] | 283 | ; Now we will change sliders defining the boxzoom |
---|
[69] | 284 | domainid = widget_info(event.top, find_by_uname = 'domain') |
---|
| 285 | boxzoom = (extractatt(top_uvalue, 'domaines'))[*, numdessinin] |
---|
[150] | 286 | ; We want to find the type of grid which is used |
---|
[69] | 287 | currentfile = extractatt(top_uvalue, 'currentfile') |
---|
| 288 | listgrid = (*(extractatt(top_uvalue, 'fileparameters'))[currentfile]).listgrid |
---|
| 289 | listvar = (*(extractatt(top_uvalue, 'fileparameters'))[currentfile]).listvar |
---|
| 290 | vlstid = widget_info(event.top, find_by_uname = 'varlist') |
---|
| 291 | namevar = widget_info(vlstid, /combobox_gettext) |
---|
| 292 | indexvar = where(listvar EQ namevar) |
---|
| 293 | vargrid = strupcase(listgrid[indexvar]) |
---|
| 294 | if flag EQ 0 then BEGIN ; longitudes |
---|
[150] | 295 | ; We do a domdef to find the lon1 lon2 corresponding to the boxzoom defined on the widget... |
---|
[69] | 296 | domdef, boxzoom, gridtype = vargrid, /xindex $ |
---|
| 297 | , yindex = (flags[where(options EQ 'Latitude / y index'), numdessinin])[0] |
---|
| 298 | widget_control, domainid, set_value = [lon1, lon2, boxzoom[2:3]] |
---|
| 299 | ENDIF ELSE BEGIN ; xindex |
---|
[150] | 300 | ; now we want to find firstx, lastx corresponding to the boxzoom defined on the widget... |
---|
[69] | 301 | domdef, boxzoom, gridtype = vargrid $ |
---|
| 302 | , yindex = (flags[where(options EQ 'Latitude / y index'), numdessinin])[0] |
---|
| 303 | grille, -1, -1, -1, -1, nx, ny, nz, firstx, firsty, firstz, lastx, lasty, lastz |
---|
| 304 | widget_control, domainid, set_value = [firstx, lastx, boxzoom[2:3]] |
---|
| 305 | ENDELSE |
---|
[150] | 306 | ; We update the top_uvalue |
---|
[69] | 307 | widget_control, domainid, get_value = boxzoom |
---|
| 308 | (*top_uvalue[1, findline(top_uvalue, 'domaines')])[*, numdessinin] = boxzoom |
---|
| 309 | end |
---|
[226] | 310 | 'Latitude / y index':begin |
---|
[69] | 311 | widget_control, event.top, get_uvalue = top_uvalue |
---|
| 312 | numdessinin = (extractatt(top_uvalue, 'smallin'))[2]-1 |
---|
[226] | 313 | options = extractatt(top_uvalue, 'options') |
---|
[69] | 314 | flags = extractatt(top_uvalue, 'optionsflag') |
---|
| 315 | index = where(options EQ 'Latitude / y index') |
---|
[150] | 316 | ; We change the flag on Latitude / y index |
---|
[69] | 317 | flag = 1-flags[index, numdessinin] & flag = flag[0] |
---|
[150] | 318 | ; We reattribute it |
---|
[69] | 319 | (*top_uvalue[1, findline(top_uvalue, 'optionsflag')])[index, numdessinin] = flag |
---|
[150] | 320 | ; Now we will change sliders defining the boxzoom |
---|
[69] | 321 | domainid = widget_info(event.top, find_by_uname = 'domain') |
---|
| 322 | boxzoom = (extractatt(top_uvalue, 'domaines'))[*, numdessinin] |
---|
[150] | 323 | ; We want to find the type of grid which is used |
---|
[69] | 324 | currentfile = extractatt(top_uvalue, 'currentfile') |
---|
| 325 | listgrid = (*(extractatt(top_uvalue, 'fileparameters'))[currentfile]).listgrid |
---|
| 326 | listvar = (*(extractatt(top_uvalue, 'fileparameters'))[currentfile]).listvar |
---|
| 327 | vlstid = widget_info(event.top, find_by_uname = 'varlist') |
---|
| 328 | namevar = widget_info(vlstid, /combobox_gettext) |
---|
| 329 | indexvar = where(listvar EQ namevar) |
---|
| 330 | vargrid = strupcase(listgrid[indexvar]) |
---|
| 331 | if flag EQ 0 then BEGIN ; latitudes |
---|
[150] | 332 | ; We do a domdef to find the lat1 lat2 corresponding to the boxzoom defined on the widget... |
---|
[69] | 333 | domdef, boxzoom, gridtype = vargrid, /yindex $ |
---|
| 334 | , xindex = (flags[where(options EQ 'Longitude / x index'), numdessinin])[0] |
---|
| 335 | widget_control, domainid, set_value = [boxzoom[0:1], lat1, lat2] |
---|
| 336 | ENDIF ELSE BEGIN ; yindex |
---|
[150] | 337 | ; now we want to find firsty, lasty corresponding to the boxzoom defined on the widget... |
---|
[69] | 338 | domdef, boxzoom, gridtype = vargrid $ |
---|
| 339 | , xindex = (flags[where(options EQ 'Longitude / x index'), numdessinin])[0] |
---|
| 340 | grille, -1, -1, -1, -1, nx, ny, nz, firstx, firsty, firstz, lastx, lasty, lastz |
---|
| 341 | widget_control, domainid, set_value = [boxzoom[0:1], firsty, lasty] |
---|
| 342 | ENDELSE |
---|
[150] | 343 | ; We update the top_uvalue |
---|
[69] | 344 | widget_control, domainid, get_value = boxzoom |
---|
| 345 | (*top_uvalue[1, findline(top_uvalue, 'domaines')])[*, numdessinin] = boxzoom |
---|
| 346 | END |
---|
| 347 | endcase |
---|
| 348 | return |
---|
[2] | 349 | end |
---|