Changeset 51


Ignore:
Timestamp:
05/09/06 13:04:45 (18 years ago)
Author:
pinsard
Message:

upgrade of COMPOUND_WIDGET according to cerbere.lodyc.jussieu.fr: /usr/home/smasson/SAXO_RD/ : files

Location:
trunk
Files:
1 deleted
11 copied

Legend:

Unmodified
Added
Removed
  • trunk/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_calendar.pro

    r49 r51  
    197197   if n_elements(calendar) GT 1 then begin 
    198198      if total(daycal eq 15) EQ n_elements(calendar) then monthly = 1 
    199    if total(monthcal EQ 6) EQ n_elements(calendar) then BEGIN  & monthly = 1 & yearly = 1 & endif 
     199   if total(monthcal EQ 6) EQ n_elements(calendar) AND n_elements(uniq(daycal, sort(daycal))) EQ 1 then BEGIN  & monthly = 1 & yearly = 1 & endif 
    200200   if total(yearcal EQ 50) EQ n_elements(calendar) then BEGIN  & monthly = 1 & yearly = 1 & centuryly = 1 & ENDIF 
    201201   endif 
  • trunk/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_domain.pro

    r49 r51  
    99;       'set':BEGIN 
    1010;          widget_control, event.id, get_value = value & value = value[0] 
    11 ;          nothing = execute('boite ='+value) 
    12 ;          widget_control, Id, set_value = boite 
     11;          nothing = execute('boxzoom ='+value) 
     12;          widget_control, Id, set_value = boxzoom 
    1313;       END 
    1414;       'get':BEGIN  
     
    4242@common 
    4343;------------------------------------------------ 
    44 ; quel est le type de boite? 
     44; quel est le type de boxzoom? 
    4545   topid = findtopid(id) 
    4646   widget_control, topid, get_uvalue=top_uvalue 
    47    currentplot = (extractatt(top_uvalue, 'petitin'))[2]-1 
     47   currentplot = (extractatt(top_uvalue, 'smallin'))[2]-1 
    4848   options = extractatt(top_uvalue, 'options')    
    4949   flags = extractatt(top_uvalue, 'optionsflag') 
     
    5454    ytype = 'geographic' ELSE ytype = 'index' 
    5555;------------------------------------------------ 
    56 ; comment completer la boite? 
     56; comment completer la boxzoom? 
    5757   IF xtype EQ  'geographic' then begin 
    5858      lonn1 = lon1 
     
    6060      xtitle = 'lon' 
    6161   ENDIF ELSE BEGIN 
    62       lonn1 = premierxt 
    63       lonn2 = dernierxt 
     62      lonn1 = firstxt 
     63      lonn2 = lastxt 
    6464      xtitle = 'x index' 
    6565   ENDELSE 
     
    6969      ytitle = 'lat' 
    7070   ENDIF ELSE BEGIN 
    71       latt1 = premieryt 
    72       latt2 = dernieryt 
     71      latt1 = firstyt 
     72      latt2 = lastyt 
    7373      ytitle = 'y index' 
    7474   ENDELSE 
    7575;------------------------------------------------ 
    76    proff1 = floor(min([gdepw[0], gdept[0]])) 
    77    proff2 = ceil(max([gdepw[0], gdept[0]])) 
     76   vertf1 = floor(min([gdepw[0], gdept[0]])) 
     77   vertf2 = ceil(max([gdepw[0], gdept[0]])) 
    7878;------------------------------------------------ 
    7979   Case N_Elements(Value) OF 
    80       0:boite = [lonn1, lonn2, latt1, latt2, proff1, proff2] 
     80      0:boxzoom = [lonn1, lonn2, latt1, latt2, vertf1, vertf2] 
    8181      1:BEGIN  
    82          if value EQ -1 then boite = [lonn1, lonn2, latt1, latt2, proff1, proff2] $ 
    83          ELSE boite=[lonn1, lonn2, latt1, latt2, 0.,value[0]] 
    84       END 
    85       2:boite=[lonn1, lonn2, latt1, latt2, value[0],value[1]] 
    86       4:boite=[Value] 
    87       5:boite=[Value[0:3], 0, Value[4]] 
    88       6:boite = Value 
     82         if value EQ -1 then boxzoom = [lonn1, lonn2, latt1, latt2, vertf1, vertf2] $ 
     83         ELSE boxzoom=[lonn1, lonn2, latt1, latt2, 0.,value[0]] 
     84      END 
     85      2:boxzoom=[lonn1, lonn2, latt1, latt2, value[0],value[1]] 
     86      4:boxzoom=[Value] 
     87      5:boxzoom=[Value[0:3], 0, Value[4]] 
     88      6:boxzoom = Value 
    8989      Else:BEGIN  
    90          rien = report('Mauvaise Definition de Boite') 
     90         rien = report('Mauvaise Definition de Boxzoom') 
    9191      END 
    9292   ENDCASE 
    9393;------------------------------------------------ 
    94    boite[0] = floor(boite[0]) 
    95    boite[1] = ceil(boite[1]) 
    96    boite[2] = floor(boite[2]) 
    97    boite[3] = ceil(boite[3]) 
    98    if n_elements(boite GE 5) then begin 
    99       boite[4] = floor(boite[4]) 
    100       boite[5] = ceil(boite[5]) 
     94   boxzoom[0] = floor(boxzoom[0]) 
     95   boxzoom[1] = ceil(boxzoom[1]) 
     96   boxzoom[2] = floor(boxzoom[2]) 
     97   boxzoom[3] = ceil(boxzoom[3]) 
     98   if n_elements(boxzoom GE 5) then begin 
     99      boxzoom[4] = floor(boxzoom[4]) 
     100      boxzoom[5] = ceil(boxzoom[5]) 
    101101   endif 
    102102;------------------------------------------------ 
     
    108108; 
    109109; min et max possible 
    110    if xtype EQ 'geographic' then begin 
    111       min = floor(min([glamt,glamu,glamv], max = max)) 
     110   if xtype EQ 'geographic' then BEGIN 
     111      min = floor(min([glamt,glamf], max = max)) 
    112112      max = ceil(max) 
    113113   ENDIF ELSE BEGIN  
     
    127127      widget_control, lon2id, /destroy 
    128128; on reconstruit 
    129       lon1id = cw_slider_pm(lonbase,value=min > boite[0] < ((boite[1] < max)-keyword_set(strict)) $ 
     129      lon1id = cw_slider_pm(lonbase,value=min > boxzoom[0] < ((boxzoom[1] < max)-keyword_set(strict)) $ 
    130130                            , uvalue={name:'lon1', strict:keyword_set(strict)},uname ='lon1' $ 
    131131                            , title = xtitle+'1', minimum = min $ 
    132                             , maximum = (boite[1] < max)-keyword_set(strict)) 
    133       lon2id = cw_slider_pm(lonbase,value=((min > boite[0])+keyword_set(strict)) > boite[1] < max $ 
     132                            , maximum = (boxzoom[1] < max)-keyword_set(strict)) 
     133      lon2id = cw_slider_pm(lonbase,value=((min > boxzoom[0])+keyword_set(strict)) > boxzoom[1] < max $ 
    134134                            , uvalue={name:'lon2', strict:keyword_set(strict)} $ 
    135135                            , uname='lon2', title = xtitle+'2', maximum = max $ 
    136                             , minimum = (min > boite[0])+keyword_set(strict)) 
     136                            , minimum = (min > boxzoom[0])+keyword_set(strict)) 
    137137      widget_control, lonbase, set_uvalue = {name:xtype} 
    138138      widget_control, lonbase, update = 1 
    139139   ENDIF ELSE BEGIN 
    140140; la nouvelle valeur qu''ils vont avoir 
    141       cursorvalue1 = min > boite[0] < ((boite[1] < max)-strict) 
    142       cursorvalue2 = ((min > boite[0])+strict) > boite[1] < max 
     141      cursorvalue1 = min > boxzoom[0] < ((boxzoom[1] < max)-strict) 
     142      cursorvalue2 = ((min > boxzoom[0])+strict) > boxzoom[1] < max 
    143143; on change les bornes des slider 
    144144      widget_control, lon1id, set_value = {slider_min:min, slider_max:cursorvalue2-strict} 
     
    153153; min et max possible 
    154154   if ytype EQ 'geographic' then begin 
    155       min = floor(min([gphit,gphiu,gphiv], max = max)) 
     155      min = floor(min([gphit,gphif], max = max)) 
    156156      max = ceil(max) 
    157157   ENDIF ELSE BEGIN  
     
    168168      widget_control, lat1id, /destroy 
    169169      widget_control, lat2id, /destroy 
    170       lat1id = cw_slider_pm(latbase,value=min > boite[2] < ((boite[3] < max)-keyword_set(strict)) $ 
     170      lat1id = cw_slider_pm(latbase,value=min > boxzoom[2] < ((boxzoom[3] < max)-keyword_set(strict)) $ 
    171171                            , uvalue={name:'lat1', strict:keyword_set(strict)},uname ='lat1' $ 
    172172                            , title = ytitle+'1', minimum =min $ 
    173                             , maximum = ((boite[3] < max)-keyword_set(strict))) 
    174       lat2id = cw_slider_pm(latbase,value=((min > boite[2])+keyword_set(strict)) > boite[3] < max $ 
     173                            , maximum = ((boxzoom[3] < max)-keyword_set(strict))) 
     174      lat2id = cw_slider_pm(latbase,value=((min > boxzoom[2])+keyword_set(strict)) > boxzoom[3] < max $ 
    175175                            , uvalue={name:'lat2', strict:keyword_set(strict)} $ 
    176176                            , uname ='lat2', title = ytitle+'2' ,maximum =  max $ 
    177                             , minimum =(min > boite[2])+keyword_set(strict)) 
     177                            , minimum =(min > boxzoom[2])+keyword_set(strict)) 
    178178      widget_control, latbase, set_uvalue = {name:ytype} 
    179179      widget_control, latbase, update = 1 
    180180   ENDIF ELSE BEGIN 
    181       cursorvalue1 = min > boite[2] < ((boite[3] < max)-strict) 
    182       cursorvalue2 = ((min > boite[2])+strict) > boite[3] < max 
     181      cursorvalue1 = min > boxzoom[2] < ((boxzoom[3] < max)-strict) 
     182      cursorvalue2 = ((min > boxzoom[2])+strict) > boxzoom[3] < max 
    183183      widget_control, lat1id, set_value = {slider_min:min, slider_max:cursorvalue2-strict} 
    184184      widget_control, lat2id, set_value = {slider_min:cursorvalue1+strict, slider_max:max} 
     
    188188; 
    189189; 
    190    if n_elements(boite) EQ 4 then return 
     190   if n_elements(boxzoom) EQ 4 then return 
    191191; 
    192192; la profondeur 
     
    225225; on s''assure que les profs donnees contiennent bien au moins un 
    226226; niveau. 
    227    if boite[4] GT boite[5] then begin 
    228       rien = boite[4] 
    229       boite[4] = boite[5] 
    230       boite[5] = rien 
     227   if boxzoom[4] GT boxzoom[5] then begin 
     228      rien = boxzoom[4] 
     229      boxzoom[4] = boxzoom[5] 
     230      boxzoom[5] = rien 
    231231   endif 
    232232;  
    233    rien = where(gdep1 LT boite[4], indice1) 
     233   rien = where(gdep1 LT boxzoom[4], indice1) 
    234234   indice1 = indice1 < (jpk-1) 
    235    rien = where(gdep2 LE boite[5], indice2) 
     235   rien = where(gdep2 LE boxzoom[5], indice2) 
    236236   indice2 = indice1 > (indice2-1) 
    237237; 
    238238   if indice1 EQ indice2 then BEGIN 
    239       if (where(gdep1 GE boite[4] AND gdep2 LE boite[5]))[0]  EQ -1 then begin 
     239      if (where(gdep1 GE boxzoom[4] AND gdep2 LE boxzoom[5]))[0]  EQ -1 then begin 
    240240         indice1 = 0 > (indice1-(grid_t EQ 1)) 
    241241         indice2 = indice1 
    242242      endif 
    243       boite[4] = gdep1[indice1] 
    244       boite[5] = boite[4]+1 
     243      boxzoom[4] = gdep1[indice1] 
     244      boxzoom[5] = boxzoom[4]+1 
    245245   endif 
    246246; maintenant que les values et les indexes sont definis proprement, 
     
    251251   if indice1 EQ 0 then min1 = 0 ELSE min1 = gdep2[indice1-1] 
    252252   max1 = (min1+1) > gdep1[indice2] 
    253    widget_control, depth1id, set_value = {slider_min:min1, slider_max:max1, value:boite[4]} 
     253   widget_control, depth1id, set_value = {slider_min:min1, slider_max:max1, value:boxzoom[4]} 
    254254   min2 = gdep2[indice1] 
    255255   if indice2 EQ jpk-1 then BEGIN  
     
    258258      max2 = float('1'+strmid(max2, 1))+float(max2) 
    259259   ENDIF ELSE max2 = gdep1[indice2+1] 
    260    widget_control, depth2id, set_value = {slider_min:min2, slider_max:max2, value:boite[5]} 
     260   widget_control, depth2id, set_value = {slider_min:min2, slider_max:max2, value:boxzoom[5]} 
    261261; 
    262262   return 
     
    412412end 
    413413;********************************************************************* 
    414 FUNCTION cw_domain, parent, BOITE = boite, STRICT = strict, UVALUE = uvalue, UNAME = uname, ROW = row, COLUMN = column, UNZOOM = unzoom, _extra = ex 
     414FUNCTION cw_domain, parent, BOXZOOM = boxzoom, STRICT = strict, UVALUE = uvalue, UNAME = uname, ROW = row, COLUMN = column, UNZOOM = unzoom, _extra = ex 
    415415; 
    416416@common 
     
    418418   column = keyword_set(column)*(1-keyword_set(row)) 
    419419   row = keyword_set(row)*(1-keyword_set(column)) +(keyword_set(row) EQ column)  
    420 ; def de la boite 
    421    if NOT keyword_set(boite) then boite = [lon1, lon2, lat1, lat2 $ 
     420; def de la boxzoom 
     421   if NOT keyword_set(boxzoom) then boxzoom = [lon1, lon2, lat1, lat2 $ 
    422422                                           , min([gdepw[0], gdept[0]]), max([gdepw[0], gdept[0]]) ] 
    423    Case N_Elements(Boite) OF 
    424       0:boite = [lon1, lon2, lat1, lat2, prof1, prof2] 
    425       1:boite=[lon1, lon2, lat1, lat2, 0.,boite[0]] 
    426       2:boite=[lon1, lon2, lat1, lat2, boite[0],boite[1]] 
    427       4:boite=[Boite, prof1, prof2] 
    428       5:boite=[Boite[0:3], 0, Boite[4]] 
     423   Case N_Elements(Boxzoom) OF 
     424      0:boxzoom = [lon1, lon2, lat1, lat2, vert1, vert2] 
     425      1:boxzoom=[lon1, lon2, lat1, lat2, 0.,boxzoom[0]] 
     426      2:boxzoom=[lon1, lon2, lat1, lat2, boxzoom[0],boxzoom[1]] 
     427      4:boxzoom=[Boxzoom, vert1, vert2] 
     428      5:boxzoom=[Boxzoom[0:3], 0, Boxzoom[4]] 
    429429      6: 
    430       Else: return, report('Mauvaise Definition de Boite') 
     430      Else: return, report('Mauvaise Definition de Boxzoom') 
    431431   ENDCASE 
    432432; 
    433    boite[0] = floor(boite[0]) 
    434    boite[1] = ceil(boite[1]) 
    435    boite[2] = floor(boite[2]) 
    436    boite[3] = ceil(boite[3]) 
    437    boite[4] = floor(boite[4]) 
    438    boite[5] = ceil(boite[5]) 
     433   boxzoom[0] = floor(boxzoom[0]) 
     434   boxzoom[1] = ceil(boxzoom[1]) 
     435   boxzoom[2] = floor(boxzoom[2]) 
     436   boxzoom[3] = ceil(boxzoom[3]) 
     437   boxzoom[4] = floor(boxzoom[4]) 
     438   boxzoom[5] = ceil(boxzoom[5]) 
    439439;------------------------------------------------ 
    440440   if NOT keyword_set(uvalue) then uvalue = '' 
     
    449449   basehori = widget_base(base, ROW = row, COLUMN = column) 
    450450;-------------longitude--------------------------- 
    451    min = floor(min([glamt,glamu,glamv], max = max)) 
     451   min = floor(min([glamt,glamf], max = max)) 
    452452   max = ceil(max) 
    453453   lonbase = widget_base(basehori, /ROW, space = 1, xpad = 1, ypad = 1, uname = 'lonbase') 
    454    lon1id = cw_slider_pm(lonbase,value=min > boite[0] < ((boite[1] < max)-keyword_set(strict)) $ 
     454   lon1id = cw_slider_pm(lonbase,value=min > boxzoom[0] < ((boxzoom[1] < max)-keyword_set(strict)) $ 
    455455                       , uvalue={name:'lon1', strict:keyword_set(strict)},uname ='lon1' $ 
    456456                       , title = 'lon1', minimum = min $ 
    457                        , maximum = (boite[1] < max)-keyword_set(strict)) 
    458    lon2id = cw_slider_pm(lonbase,value=((min > boite[0])+keyword_set(strict)) > boite[1] < max $ 
     457                       , maximum = (boxzoom[1] < max)-keyword_set(strict)) 
     458   lon2id = cw_slider_pm(lonbase,value=((min > boxzoom[0])+keyword_set(strict)) > boxzoom[1] < max $ 
    459459                       , uvalue={name:'lon2', strict:keyword_set(strict)} $ 
    460460                       , uname='lon2', title = 'lon2', maximum = max $ 
    461                        , minimum = (min > boite[0])+keyword_set(strict)) 
     461                       , minimum = (min > boxzoom[0])+keyword_set(strict)) 
    462462   widget_control, lonbase, set_uvalue = {name:'geographic'} 
    463463;---------------latitude------------------------- 
    464    min = floor(min([gphit,gphiu,gphiv], max = max)) 
     464   min = floor(min([gphit,gphif], max = max)) 
    465465   max = ceil(max) 
    466466   latbase = widget_base(basehori, /ROW, space = 1, xpad = 1, ypad = 1, uname = 'latbase') 
    467    lat1id = cw_slider_pm(latbase,value=min > boite[2] < ((boite[3] < max)-keyword_set(strict)) $ 
     467   lat1id = cw_slider_pm(latbase,value=min > boxzoom[2] < ((boxzoom[3] < max)-keyword_set(strict)) $ 
    468468                       , uvalue={name:'lat1', strict:keyword_set(strict)},uname ='lat1' $ 
    469469                       , title = 'lat1', minimum =min $ 
    470                        , maximum = ((boite[3] < max)-keyword_set(strict))) 
    471    lat2id = cw_slider_pm(latbase,value=((min > boite[2])+keyword_set(strict)) > boite[3] < max $ 
     470                       , maximum = ((boxzoom[3] < max)-keyword_set(strict))) 
     471   lat2id = cw_slider_pm(latbase,value=((min > boxzoom[2])+keyword_set(strict)) > boxzoom[3] < max $ 
    472472                       , uvalue={name:'lat2', strict:keyword_set(strict)} $ 
    473473                       , uname ='lat2', title = 'lat2' ,maximum =  max $ 
    474                        , minimum =(min > boite[2])+keyword_set(strict)) 
     474                       , minimum =(min > boxzoom[2])+keyword_set(strict)) 
    475475   widget_control, latbase, set_uvalue = {name:'geographic'} 
    476476;----------------unzoom------------------------ 
     
    491491; 
    492492   dephtid=cw_droplist_pm(basedepthdrop,value=''+sgdep1, uvalue={name:'depthlev1', value:gdep1, grid_t:strupcase(vargrid) NE 'W'}, uname='depthlev1') 
    493    rien = where(gdep1 LT boite[4], indice1) 
     493   rien = where(gdep1 LT boxzoom[4], indice1) 
    494494   indice1 = indice1 < (jpk-1) 
    495495   widget_control, dephtid, set_value = {droplist_select:indice1} 
    496496; 
    497497   dephtid=cw_droplist_pm(basedepthdrop,value=''+sgdep2, uvalue={name:'depthlev2', value:gdep2, grid_t:strupcase(vargrid) NE 'W'}, uname='depthlev2') 
    498    rien = where(gdep2 LE boite[5], indice2) 
     498   rien = where(gdep2 LE boxzoom[5], indice2) 
    499499   indice2 = indice1 > (indice2-1) 
    500500   widget_control, dephtid, set_value = {droplist_select:indice2} 
     
    504504   if indice1 EQ 0 then min1 = 0 ELSE min1 = gdep2[indice1-1] 
    505505   max1 = (min1+1) > gdep1[indice2] 
    506    rien = cw_slider_pm(basedepthslid, value= min1 > boite[4] < (boite[5] < max1) $ 
     506   rien = cw_slider_pm(basedepthslid, value= min1 > boxzoom[4] < (boxzoom[5] < max1) $ 
    507507                       , uvalue = {name:'depth1'}, uname = 'depth1' $ 
    508508                       , title = 'depth1', minimum = min1, maximum = max1) 
     
    515515   ENDIF ELSE max2 = gdep1[indice2+1] 
    516516   if max2 EQ min2 then max2 = min2+1 
    517    rien = cw_slider_pm(basedepthslid, value= (min2 > boite[4]) > boite[5] < max2 $ 
     517   rien = cw_slider_pm(basedepthslid, value= (min2 > boxzoom[4]) > boxzoom[5] < max2 $ 
    518518                       , uvalue={name:'depth2'}, minimum = min2 $ 
    519519                       , uname = 'depth2', title = 'depth2' ,maximum =  max2) 
  • trunk/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_miseenpage.pro

    r49 r51  
    66   widget_control, event.top, get_uvalue=top_uvalue 
    77; 
    8    petitin = extractatt(top_uvalue, 'petitin') 
    9    numdessinin = petitin[2]-1 
    10    petitout = extractatt(top_uvalue, 'petitout') 
     8   smallin = extractatt(top_uvalue, 'smallin') 
     9   numdessinin = smallin[2]-1 
     10   smallout = extractatt(top_uvalue, 'smallout') 
    1111; 
    1212   if uval.name EQ 'undo' then begin 
     
    1717; si on ne change pas le nombre de colonnes, on sort 
    1818      if uval.name EQ 'column' then $ 
    19        if event.index+1 EQ petitin[0] THEN $ 
     19       if event.index+1 EQ smallin[0] THEN $ 
    2020       return,{ID:event.handler, TOP:event.top, HANDLER:0L} 
    2121; si on ne change pas le nombre de lignes, on sort 
    2222      if uval.name EQ 'row' then $ 
    23        if event.index+1 EQ petitin[1] THEN $ 
     23       if event.index+1 EQ smallin[1] THEN $ 
    2424       return,{ID:event.handler, TOP:event.top, HANDLER:0L} 
    2525; 
     
    3333         'clear': 
    3434         'column':BEGIN  
    35             petitin = [event.index+1, petitin[1], 1] 
    36             petitout = [event.index+1, petitout[1], 1] 
     35            smallin = [event.index+1, smallin[1], 1] 
     36            smallout = [event.index+1, smallout[1], 1] 
    3737         END 
    3838         'row':BEGIN 
    39             petitin = [petitin[0], event.index+1, 1] 
    40             petitout = [petitout[0], event.index+1, 1] 
     39            smallin = [smallin[0], event.index+1, 1] 
     40            smallout = [smallout[0], event.index+1, 1] 
    4141         END 
    4242      endcase 
    43       nbredessin = petitin[0]*petitin[1] 
     43      nbredessin = smallin[0]*smallin[1] 
    4444;          
    4545; on remet tout a 0 en ce qui concerne les postscripts 
    46       createhistory, event.top, petitin 
     46      createhistory, event.top, smallin 
    4747;          
    4848         options = extractatt(top_uvalue, 'options')    
     
    5959; actualisation de la top_uvalue... 
    6060; 
    61       *top_uvalue[1, findline(top_uvalue, 'petitin')] = petitin 
    62       *top_uvalue[1, findline(top_uvalue, 'petitout')] = petitout 
     61      *top_uvalue[1, findline(top_uvalue, 'smallin')] = smallin 
     62      *top_uvalue[1, findline(top_uvalue, 'smallout')] = smallout 
    6363; 
    6464      *top_uvalue[1, findline(top_uvalue, 'penvs')] = replicate(!p, nbredessin) 
     
    108108end 
    109109;********************************************************************* 
    110 FUNCTION cw_miseenpage, parent, petit, UVALUE = uvalue, UNAME = uname, ROW = row, COLUMN = column, UNZOOM = unzoom, _extra = ex 
     110FUNCTION cw_miseenpage, parent, small, UVALUE = uvalue, UNAME = uname, ROW = row, COLUMN = column, UNZOOM = unzoom, _extra = ex 
    111111; cheking exclusive keywords 
    112112   column = keyword_set(column)*(1-keyword_set(row)) 
     
    121121                      , UVALUE = uvalue, UNAME = uname, _extra = ex)    
    122122;------------------------------------------------ 
    123    IF n_elements(petit) eq 0 then petit = [1, 1, 1] 
     123   IF n_elements(small) eq 0 then small = [1, 1, 1] 
    124124   basedroplist = widget_base(base, /column, /align_center) 
    125125   id=widget_droplist(basedroplist, value=strtrim(indgen(10)+1, 1), title ='column' $ 
    126126                        , uvalue ={name:'column'}, uname='column') 
    127    widget_control, id, set_droplist_select = petit[0]-1 
     127   widget_control, id, set_droplist_select = small[0]-1 
    128128   id=widget_droplist(basedroplist, value=strtrim(indgen(10)+1, 1), title =' row ' $ 
    129129                        , uvalue ={name:'row'}, uname='row') 
    130    widget_control, id, set_droplist_select = petit[1]-1 
     130   widget_control, id, set_droplist_select = small[1]-1 
    131131   basebutton = widget_base(base, /column, /align_center) 
    132132   rien = widget_button(basebutton, value = 'Clear', uvalue ={name:'clear'}, uname='clear') 
  • trunk/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slide_slice.pro

    r49 r51  
    33   topid = findtopid(id) 
    44   domainid = widget_info(topid, find_by_uname = 'domain') 
    5    widget_control, domainid, get_value = boite 
    6    if boite[1]-boite[0] LT boite[3]-boite[2] then type = 'y' ELSE type = 'x' 
     5   widget_control, domainid, get_value = boxzoom 
     6   if boxzoom[1]-boxzoom[0] LT boxzoom[3]-boxzoom[2] then type = 'y' ELSE type = 'x' 
    77   thickid  = widget_info(topid, find_by_uname = 'thickness') 
    88   widget_control, thickid, get_uvalue = thicknessuval 
     
    1111   sliderid = widget_info(topid, find_by_uname = 'slider') 
    1212   if type EQ 'y' then BEGIN 
    13       mini = floor(min([glamt, glamu], max = maxi)) 
     13      mini = floor(min([glamt, glamf], max = maxi)) 
    1414      maxi = ceil(maxi)-thickness 
    15       widget_control, sliderid, set_value = {slider_min:mini, slider_max:maxi, value:boite[0]<maxi} 
    16       thickness = boite[1]-boite[0] 
     15      widget_control, sliderid, set_value = {slider_min:mini, slider_max:maxi, value:boxzoom[0]<maxi} 
     16      thickness = boxzoom[1]-boxzoom[0] 
    1717   ENDIF ELSE BEGIN  
    18       mini = floor(min([gphit, gphiv], max = maxi)) 
     18      mini = floor(min([gphit, gphif], max = maxi)) 
    1919      maxi = ceil(maxi)-thickness 
    20       widget_control, sliderid, set_value = {slider_min:mini, slider_max:maxi, value:boite[2]<maxi} 
    21       thickness = boite[3]-boite[2] 
     20      widget_control, sliderid, set_value = {slider_min:mini, slider_max:maxi, value:boxzoom[2]<maxi} 
     21      thickness = boxzoom[3]-boxzoom[2] 
    2222   ENDELSE 
    2323   thicknessval = thicknessuval.choix 
     
    4040   sliderid = widget_info(event.handler, find_by_uname = 'slider') 
    4141;   uniteid  = widget_info(event.handler, find_by_uname = 'unite') 
    42    widget_control, domainid, get_value = boite 
    43    if boite[1]-boite[0] LT boite[3]-boite[2] then type = 'y' ELSE type = 'x' 
     42   widget_control, domainid, get_value = boxzoom 
     43   if boxzoom[1]-boxzoom[0] LT boxzoom[3]-boxzoom[2] then type = 'y' ELSE type = 'x' 
    4444   widget_control, thickid, get_uvalue = thicknessuval 
    4545   widget_control, thickid, get_value = thickness 
     
    4848 
    4949   if uval.name EQ 'thickness' then begin 
    50       if boite[1]-boite[0] LT boite[3]-boite[2] then type = 'y' ELSE type = 'x' 
     50      if boxzoom[1]-boxzoom[0] LT boxzoom[3]-boxzoom[2] then type = 'y' ELSE type = 'x' 
    5151      if type EQ 'y' then BEGIN 
    52          mini = floor(min([glamt, glamu], max = maxi)) 
     52         mini = floor(min([glamt, glamf], max = maxi)) 
    5353         maxi = ceil(maxi)-thickness 
    5454      ENDIF ELSE BEGIN  
    55          mini = floor(min([gphit, gphiv], max = maxi)) 
     55         mini = floor(min([gphit, gphif], max = maxi)) 
    5656         maxi = ceil(maxi)-thickness 
    5757      ENDELSE 
     
    6464; 
    6565;    if uval.name EQ 'unite' then begin 
    66 ;       domdef, boite, grille = 'T' 
     66;       domdef, boxzoom, gridtype = 'T' 
    6767;       if unite EQ 'degre' then BEGIN 
    6868;          if strpos(type,'y') NE -1 then begin 
    69 ;             mini = floor(min([glamt, glamu], max = maxi)) 
     69;             mini = floor(min([glamt, glamf], max = maxi)) 
    7070;             maxi = ceil(maxi) 
    7171; print, lon1, mini, maxi 
    7272;             widget_control, sliderid, set_value = {value:lon1, slider_min_max:[mini, maxi]} 
    7373;          ENDIF ELSE BEGIN  
    74 ;             mini = floor(min([gphit, glamv], max = maxi)) 
     74;             mini = floor(min([gphit, glamf], max = maxi)) 
    7575;             maxi = ceil(maxi) 
    7676;             widget_control, sliderid, set_value = {value:lat1, slider_min_max:[mini, maxi]} 
     
    7878;       ENDIF ELSE BEGIN 
    7979;          if strpos(type,'y') NE -1 then BEGIN 
    80 ; print, 'ds if',premierxt, 0, jpi-1 
    81 ;             widget_control, sliderid, set_value = {value:premierxt, slider_min_max:[0, jpi-1]} 
     80; print, 'ds if',firstxt, 0, jpi-1 
     81;             widget_control, sliderid, set_value = {value:firstxt, slider_min_max:[0, jpi-1]} 
    8282;          ENDIF ELSE BEGIN  
    83 ;             widget_control, sliderid, set_value = {value:premieryt, slider_min_max:[0, jpj-1]} 
     83;             widget_control, sliderid, set_value = {value:firstyt, slider_min_max:[0, jpj-1]} 
    8484;          ENDELSE 
    8585;       ENDELSE 
     
    8888;   if unite EQ 'degre' then BEGIN 
    8989   if type EQ 'y' then begin 
    90       boite[0] = slider &  boite[1] = slider+thickness 
     90      boxzoom[0] = slider &  boxzoom[1] = slider+thickness 
    9191   ENDIF ELSE BEGIN  
    92       boite[2] = slider &  boite[3] = slider+thickness 
     92      boxzoom[2] = slider &  boxzoom[3] = slider+thickness 
    9393   ENDELSE  
    9494;    ENDIF ELSE BEGIN 
    9595;       if strpos(type,'y') NE -1 then begin 
    96 ;          boite[0] = glamt[slider, 0] &  boite[1] = glamu[slider+thickness, 0] 
     96;          boxzoom[0] = glamt[slider, 0] &  boxzoom[1] = glamf[slider+thickness, 0] 
    9797;       ENDIF ELSE BEGIN  
    98 ;          boite[2] = gphit[0, slider] &  boite[3] = gphiv[0, slider+thickness] 
     98;          boxzoom[2] = gphit[0, slider] &  boxzoom[3] = gphif[0, slider+thickness] 
    9999;       ENDELSE  
    100100;    ENDELSE 
    101    widget_control, domainid, set_value = boite 
     101   widget_control, domainid, set_value = boxzoom 
    102102   return, {CW_SLIDE_SLICE, ID:event.handler, TOP:event.top, HANDLER:0L} 
    103103end 
    104104;-------------------------------------------------------------------------------- 
    105 FUNCTION cw_slide_slice, parent, boite = boite, UVALUE = uvalue, UNAME = uname, FRAME = frame, ROW = row, COLUMN = column, _extra = ex 
     105FUNCTION cw_slide_slice, parent, boxzoom = boxzoom, UVALUE = uvalue, UNAME = uname, FRAME = frame, ROW = row, COLUMN = column, _extra = ex 
    106106@common 
    107107;------------------------------------------------ 
     
    119119                      , FRAME = frame, _extra = ex)    
    120120;------------------------------------------------ 
    121    if NOT keyword_set(boite) then boite = [lon1, lon2, lat1, lat2] 
     121   if NOT keyword_set(boxzoom) then boxzoom = [lon1, lon2, lat1, lat2] 
    122122;    rien = cw_bgroup(base, ['degre', 'points'],/exclusive, /column, uname = 'unite', uvalue = {name:'unite'}, /return_name, set_value = 0, /no_release) 
    123123   thicknessval = indgen(21)+1 
     
    126126   droplistid = cw_droplist_pm(base, value = thicknessval, uname = 'thickness', uvalue = {name:'thickness', choix:thicknessval}) 
    127127; 
    128    if boite[1]-boite[0] LT boite[3]-boite[2] then type = 'y' ELSE type = 'x' 
     128   if boxzoom[1]-boxzoom[0] LT boxzoom[3]-boxzoom[2] then type = 'y' ELSE type = 'x' 
    129129   if type EQ 'y' then BEGIN 
    130       mini = floor(min([glamt, glamu], max = maxi)) 
    131       thickness = boite[1]-boite[0] 
     130      mini = floor(min([glamt, glamf], max = maxi)) 
     131      thickness = boxzoom[1]-boxzoom[0] 
    132132      maxi = ceil(maxi)-thickness 
    133133      rien = cw_slider_pm(base, minimum = mini, maximum = (mini+1) > maxi $ 
    134                           , value = mini > boite[0] < maxi, /column, uname = 'slider' $ 
     134                          , value = mini > boxzoom[0] < maxi, /column, uname = 'slider' $ 
    135135                          , uvalue = {name:'slider'}) 
    136136   ENDIF ELSE BEGIN  
    137       mini = floor(min([gphit, gphiv], max = maxi)) 
    138       thickness = boite[3]-boite[2] 
     137      mini = floor(min([gphit, gphif], max = maxi)) 
     138      thickness = boxzoom[3]-boxzoom[2] 
    139139      maxi = ceil(maxi)-thickness 
    140140      rien = cw_slider_pm(base, minimum = mini, maximum =  (mini+1) > maxi $ 
    141                           , value = mini > boite[2] < maxi, /column, uname = 'slider' $ 
     141                          , value = mini > boxzoom[2] < maxi, /column, uname = 'slider' $ 
    142142                          , uvalue = {name:'slider'}) 
    143143   ENDELSE 
     
    152152    
    153153;   if type EQ 'xt' then begin 
    154 ;       mini = floor(min([glamt,glamu,glamv], max = maxi)) 
     154;       mini = floor(min([glamt,glamf], max = maxi)) 
    155155;       maxi = ceil(maxi) 
    156156;    ENDIF ELSE BEGIN  
    157 ;       mini = floor(min([gphit,gphiu,gphiv], max = maxi)) 
     157;       mini = floor(min([gphit,gphif], max = maxi)) 
    158158;       maxi = ceil(maxi) 
    159159;    ENDELSE 
  • trunk/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_specifie.pro

    r49 r51  
    4949   widget_control, event.id, get_uvalue = uval 
    5050   widget_control, event.top, get_uvalue = top_uvalue 
    51    petitin = extractatt(top_uvalue, 'petitin') 
    52    numdessinin = petitin[2]-1 
    53    petitout = extractatt(top_uvalue, 'petitout') 
    54    numdessinout = petitout[2]-1 
     51   smallin = extractatt(top_uvalue, 'smallin') 
     52   numdessinin = smallin[2]-1 
     53   smallout = extractatt(top_uvalue, 'smallout') 
     54   numdessinout = smallout[2]-1 
    5555;------------------------------------------------------------ 
    5656   case uval of 
Note: See TracChangeset for help on using the changeset viewer.