PRO longclickaction, event widget_control, event.id, get_uvalue=uval widget_control,event.top, get_uvalue = top_uvalue ; quel est le dessin selectionne?? petitout = extractatt(top_uvalue, 'petitout') petitin = extractatt(top_uvalue, 'petitin') petit = petitin x = (convert_coord(uval.x[0],uval.y[0], /device, /to_normal))[0] y = (convert_coord(uval.x[0],uval.y[0], /device, /to_normal))[1] numcolonne = n_elements(where(findgen(petit[0])/petit[0] lt x))-1 numligne = n_elements(where(findgen(petit[1])/petit[1] lt 1-y))-1 numdessin = numcolonne+numligne*petit[0] ; on met ce cadrant en leader tracecadre, petitin, /erase if total(petitin EQ petitout) EQ 3 then $ tracecadre, petitout, /out petitin = [petitin[0:1], numdessin+1] *top_uvalue[1, findline(top_uvalue, 'petitin')] = petitin tracecadre, petitin !p = (extractatt(top_uvalue, 'penvs'))[numdessin] !x = (extractatt(top_uvalue, 'xenvs'))[numdessin] !y = (extractatt(top_uvalue, 'yenvs'))[numdessin] ; ;------------------------------------------------------------ ; changement de domaine: ;------------------------------------------------------------ coor = (convert_coord(uval.x,uval.y, /device, /to_data)) x = [coor[0, 0],coor[0, 1]] y = [coor[1, 0],coor[1, 1]] domainid = widget_info(event.top,find_by_uname = 'domain') boite = [x, y] ; faut-il passer la boite en indexes ??? currentplot = (extractatt(top_uvalue, 'petitin'))[2]-1 options = extractatt(top_uvalue, 'options') flags = extractatt(top_uvalue, 'optionsflag') flags = flags[*, currentplot] changex = (flags[where(options EQ 'Longitude / x index')])[0] EQ 1 changey = (flags[where(options EQ 'Latitude / y index')])[0] EQ 1 if changex OR changey then begin ; on veut retrouver le type de grille qui est utilisee currentfile = extractatt(top_uvalue, 'currentfile') listgrid = (*(extractatt(top_uvalue, 'fileparameters'))[currentfile]).listgrid indexvar = widget_info(widget_info(event.top, find_by_uname = 'champ'), /droplist_select) vargrid = strupcase(listgrid[indexvar]) domdef, boite, grille = vargrid grille, mask,glam,gphi,gdep,nx,ny,nz,premierx,premiery,premierz,dernierx,derniery,dernierz if changex then boite[0:1] = [premierx, dernierx] if changey then boite[2:3] = [premiery, derniery] endif ; widget_control, domainid, set_value = boite ; ;------------------------------------------------------------ graphtypeid = widget_info(event.top, find_by_uname = 'action') widget_control,graphtypeid, get_uvalue = graphtype_uvalue type = graphtype_uvalue.choix[widget_info(graphtypeid, /droplist_select)] case uval.press of 1:BEGIN nodates = (type EQ 'xt' OR type EQ 'yt' OR type EQ 'zt' OR type EQ 't') updatewidget, event.top, /noboite, nodates = nodates, notype = type NE 'plt' forplth = type EQ 'plt' letsdraw, event.top, forplth = forplth END 2:BEGIN updatewidget, event.top, /noboite forpltz = type EQ 'plt' letsdraw, event.top, forpltz = forpltz END 4:BEGIN updatewidget, event.top, /noboite, /nodates forpltt = type EQ 'plt' letsdraw, event.top, forpltt = forpltt END endcase ;------------------------------------------------------------ return end