Ignore:
Timestamp:
03/16/07 10:22:26 (17 years ago)
Author:
pinsard
Message:

corrections of some misspellings in some *.pro

Location:
trunk/SRC/ToBeReviewed/WIDGET
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/buildcmd.pro

    r172 r226  
    55; 
    66; @file_comments 
    7 ; This function send back a string which contain the reading command  
     7; This function send back a string which contain the reading command 
    88; and drawing's parameters. 
    99; 
     
    1111; 
    1212; @keyword BOXZOOM 
    13 ; Vector indicating the geographic zone on which we want to cut the map.  
    14 ; If BOXZOOM has :  
     13; Vector indicating the geographic zone on which we want to cut the map. 
     14; If BOXZOOM has : 
    1515;   1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] 
    1616;   2 elements: The extraction is made on [lon1, lon2, lat1, lat2, boxzoom[0],boxzoom[1]] 
    1717;   4 elements: The extraction is made on [Boxzoom, 0, max([gdept, gdepw])] 
    1818;   5 elements: The extraction is made on [Boxzoom[0:3], 0, Boxzoom[4]] 
    19 ;   6 elements: The extraction is made on Boxzoom  
     19;   6 elements: The extraction is made on Boxzoom 
    2020; Where lon1, lon2,lat1,lat2 are global variables defined at the last domdef! 
    2121; 
     
    5454  numdessinout = smallout[2]-1 
    5555; 
    56   options = extractatt(top_uvalue, 'options')    
     56  options = extractatt(top_uvalue, 'options') 
    5757  optionsflag = extractatt(top_uvalue, 'optionsflag') 
    5858  portrait = (strtrim(optionsflag[where(options EQ 'Portrait/Landscape'), 0], 1))[0] 
     
    8383;  Search of options 
    8484; 
    85   options = extractatt(top_uvalue, 'options')    
     85  options = extractatt(top_uvalue, 'options') 
    8686  optionsflag = extractatt(top_uvalue, 'optionsflag') 
    8787  flags = optionsflag[*, numdessinin] 
     
    133133  widcmd =  strtrim(widcmd, 2) 
    134134  IF widcmd[0] EQ '' THEN widcmd = 'zzz' 
    135    
     135 
    136136  cutcmd, widcmd[0], toread, numberofread, prefix, nameexp, ending 
    137137; 
     
    158158; we complet the reading command 
    159159        oldrdcmd = extractatt(top_uvalue, 'currentreadcmd') 
    160         nl = n_elements(oldrdcmd)  
     160        nl = n_elements(oldrdcmd) 
    161161        oldrdcmd[nl-1] = oldrdcmd[nl-1] + ' $' 
    162162        readcmd[i] = prefix + readcmd[i] 
     
    164164      ENDELSE 
    165165; exit if we have to read other fields... 
    166       if alreadyread+1 NE numberofread-1 THEN BEGIN  
     166      if alreadyread+1 NE numberofread-1 THEN BEGIN 
    167167        *top_uvalue[1, findline(top_uvalue, 'currentreadcmd')] = readcmd 
    168168        *top_uvalue[1, findline(top_uvalue, 'alreadyread')] = alreadyread+1 
     
    171171      ENDIF 
    172172; we finalize the reading command 
    173       IF ending NE '' THEN BEGIN  
    174         nl = n_elements(readcmd)  
     173      IF ending NE '' THEN BEGIN 
     174        nl = n_elements(readcmd) 
    175175        readcmd[nl-1] = readcmd[nl-1] + ' $' 
    176176        readcmd = [temporary(readcmd), ending] 
     
    186186      tgnm = strlowcase(tag_names(exextra)) 
    187187      indtmp = where(tgnm EQ 'box' OR tgnm EQ 'boxzoom', cnt) 
    188       IF cnt EQ 1 THEN BEGIN  
     188      IF cnt EQ 1 THEN BEGIN 
    189189        boxextra = exextra.(indtmp[0]) 
    190190        exextra = extractstru(exextra, ['box', 'boxzoom']) 
    191       ENDIF  
     191      ENDIF 
    192192      extra =  mixstru(exextra, extra) 
    193193      sextra = struct2string(extra) 
     
    214214    'vector':BEGIN 
    215215; for the vectors, there is 2 components. we read u when alreadyvector 
    216 ; is a interger and v when alreadyvector is a interger+0.5 
     216; is a integer and v when alreadyvector is a integer+0.5 
    217217      if floor(alreadyvector)+1 EQ 0 then begin 
    218218        if floor(alreadyvector) EQ alreadyvector then begin 
     
    226226      ENDIF ELSE BEGIN 
    227227        oldrdcmd = extractatt(top_uvalue, 'currentreadcmd') 
    228         nl = n_elements(oldrdcmd)  
     228        nl = n_elements(oldrdcmd) 
    229229        oldrdcmd[nl-1] = oldrdcmd[nl-1] + ' $' 
    230230        readcmd[i] = prefix + readcmd[i] 
     
    235235        numberofread-1:BEGIN 
    236236; we finalize the reading command 
    237           IF ending NE '' THEN BEGIN  
    238             nl = n_elements(readcmd)  
     237          IF ending NE '' THEN BEGIN 
     238            nl = n_elements(readcmd) 
    239239            readcmd[nl-1] = readcmd[nl-1] + ' $' 
    240240            readcmd = [temporary(readcmd), ending] 
     
    252252        numberofread-0.5:BEGIN 
    253253; we finalize the reading command 
    254           IF ending NE '' THEN BEGIN  
    255             nl = n_elements(readcmd)  
     254          IF ending NE '' THEN BEGIN 
     255            nl = n_elements(readcmd) 
    256256            readcmd[nl-1] = readcmd[nl-1] + ' $' 
    257257            readcmd = [temporary(readcmd), ending] 
     
    301301      ENDIF ELSE BEGIN 
    302302        oldrdcmd = extractatt(top_uvalue, 'currentreadcmd') 
    303         nl = n_elements(oldrdcmd)  
     303        nl = n_elements(oldrdcmd) 
    304304        oldrdcmd[nl-1] = oldrdcmd[nl-1] + ' $' 
    305305        readcmd[i] = prefix + readcmd[i] 
     
    307307      ENDELSE 
    308308; 
    309       if alreadyover+1 NE numberofread-1 THEN BEGIN  
     309      if alreadyover+1 NE numberofread-1 THEN BEGIN 
    310310; we still need to read some files... 
    311311        *top_uvalue[1, findline(top_uvalue, 'currentreadcmd')] = readcmd 
     
    315315      ENDIF 
    316316; we finalize the reading command 
    317       IF ending NE '' THEN BEGIN  
    318         nl = n_elements(readcmd)  
     317      IF ending NE '' THEN BEGIN 
     318        nl = n_elements(readcmd) 
    319319        readcmd[nl-1] = readcmd[nl-1] + ' $' 
    320320        readcmd = [temporary(readcmd), ending] 
     
    362362; For [plots in z, box must have by default 0,profmax 
    363363  if strpos(type, 'z') NE -1 then BEGIN 
    364 ; If more than 1 level is selected:  
     364; If more than 1 level is selected: 
    365365    widget_control, widget_info(base, find_by_uname = 'dthlv1'), get_value = niv1 
    366366    niv1 = niv1.combobox_index 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/identifyclick.pro

    r150 r226  
    8585; t/3/0 End of the double click 
    8686      thisEvent EQ 'WIDGET_TIMER' AND uval.click EQ 3 AND press EQ 0:uval.click = 0 
    87 ; Imposible case in theory: 
     87; Impossible case in theory: 
    8888      ELSE:BEGIN 
    8989         print, thisEvent, uval.click, press 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/scanfile.pro

    r221 r226  
    55; @categories 
    66; 
    7 ;  
     7; 
    88; @param NAMEFILE 
    99; 
    10 ;  
    1110; @keyword GRID {default='T'}{type=scalar string} 
    1211; Used to specify on which grid type are located the data 
     
    1413; @keyword _EXTRA 
    1514; Used to pass your keywords to isafile and ncdf_getaxis 
    16 ;  
     15; 
    1716; @returns 
    18 ;  
    19 ;  
     17; 
    2018; @uses 
    21 ;  
    22 ;  
     19; 
    2320; @restrictions 
    24 ;  
    25 ;  
     21; 
    2622; @examples 
    27 ;  
    28 ;  
     23; 
    2924; @history 
    30 ;  
    31 ;  
    32 ; @version  
     25; 
     26; @version 
    3327; $Id$ 
    3428; 
    3529; @todo 
    3630; seb : I don't know what to do with that... 
    37 ;  
     31; 
    3832;- 
    3933; 
     
    4943;       dont les noms sont 'x','lon...','xi_...' et 'y','lat...' ou 
    5044;       'eta_...' ou bien en majuscule. 
    51 ;       4) il doit exiter ds ce fichier une unique variable n''ayant 
     45;       4) il doit exister ds ce fichier une unique variable n''ayant 
    5246;       qu''une dimension et etant la dimension temporelle. cette 
    5347;       variable sera prise comme axe des temps. Rq: si plusieurs 
     
    5549;       variable 
    5650;       5) Cette variable axe des temps doit contenir l''attribut 
    57 ;       'units'qui doit etre ecrit suivant la syntaxe: 
    58 ;               "seconds since 0001-01-01 00:00:00"  
    59 ;               "hours since 0001-01-01 00:00:00"  
    60 ;               "days since 1979-01-01 00:59:59"  
    61 ;               "months since 1979-01-01 00:59:59"  
    62 ;               "years since 1979-01-01 00:59:59"  
     51;       'units' qui doit etre ecrit suivant la syntaxe: 
     52;               "seconds since 0001-01-01 00:00:00" 
     53;               "hours since 0001-01-01 00:00:00" 
     54;               "days since 1979-01-01 00:59:59" 
     55;               "months since 1979-01-01 00:59:59" 
     56;               "years since 1979-01-01 00:59:59" 
    6357; 
    6458; je crois que c''est tout! 
     
    9387  namedim = strarr(inside.ndims) 
    9488  for dimiq = 0, inside.ndims-1 do begin 
    95     ncdf_diminq, cdfid, dimiq, tmpname, value  
     89    ncdf_diminq, cdfid, dimiq, tmpname, value 
    9690    namedim[dimiq] = strlowcase(tmpname) 
    9791  ENDFOR 
     
    110104       (inter(invar.dim, dimidy))[0] NE -1 AND $ 
    111105       ((where(invar.dim EQ inside.recdim))[0] NE -1 OR inside.recdim EQ -1) $ 
    112     THEN namevar[varid] = invar.name  
     106    THEN namevar[varid] = invar.name 
    113107  ENDFOR 
    114108  namevar = namevar[where(namevar NE '')] 
     
    135129        tmpnm[0] EQ 'xi_u'   AND tmpnm[1] EQ 'eta_rho':listgrid[i] = 'U' 
    136130        tmpnm[0] EQ 'xi_u'   AND tmpnm[1] EQ 'eta_v'  :listgrid[i] = 'F' 
    137         ELSE:  
    138       ENDCASE  
     131        ELSE: 
     132      ENDCASE 
    139133    ENDFOR 
    140134    empty = where(listgrid EQ '') 
    141     IF empty[0] NE -1 THEN BEGIN    
     135    IF empty[0] NE -1 THEN BEGIN 
    142136; could we define the grid type from the file name?? 
    143137      pattern = ['GRID.', 'GRID_', 'GRID', 'UPID_', '30ID_'] 
     
    153147      ENDFOR 
    154148      listgrid[empty] = vargrid 
    155     ENDIF  
     149    ENDIF 
    156150  ENDIF ELSE listgrid[*] = vargrid 
    157151;------------------------------------------------------------ 
     
    159153;------------------------------------------------------------ 
    160154  date0fk = date2jul(19000101) 
    161   IF inside.recdim EQ -1 THEN BEGIN  
     155  IF inside.recdim EQ -1 THEN BEGIN 
    162156    jpt = 1 
    163157    time = date0fk 
     
    170164    repeat BEGIN 
    171165      IF varid LT inside.nvars THEN BEGIN 
    172         invar = ncdf_varinq(cdfid, varid)  
    173         varid = varid+1         
     166        invar = ncdf_varinq(cdfid, varid) 
     167        varid = varid+1 
    174168      ENDIF ELSE varid = 0 
    175169    endrep until (n_elements(invar.dim) EQ 1 AND invar.dim[0] EQ inside.recdim) OR (varid EQ 0) 
     
    177171; 
    178172    CASE 1 OF 
    179       varid EQ -1:BEGIN  
     173      varid EQ -1:BEGIN 
    180174        dummy = report('the file '+fullname+' has no time axis.!C we create a fake calendar ...') 
    181175        fakecal = 1 
    182176        time = date0fk + lindgen(1>jpt) 
    183177      END 
    184       invar.natts EQ 0:BEGIN  
     178      invar.natts EQ 0:BEGIN 
    185179        dummy = report('the variable '+invar.name+' has no attribut.!C we create a fake calendar ...') 
    186180        fakecal = 1 
     
    197191          fakecal = 1 
    198192          time = date0fk + lindgen(1>jpt) 
    199         ENDIF ELSE BEGIN  
     193        ENDIF ELSE BEGIN 
    200194; we read the time axis 
    201195          ncdf_varget, cdfid, varid, time 
     
    223217            err = 1 
    224218          ENDIF 
    225           IF err GT 0 THEN BEGIN  
     219          IF err GT 0 THEN BEGIN 
    226220            fakecal = 1 
    227221            time = date0fk + lindgen(1>jpt) 
    228           ENDIF ELSE BEGIN  
     222          ENDIF ELSE BEGIN 
    229223            debut = str_sep(mots[2], '-') 
    230224; 
     
    241235                'greg':IF n_elements(key_caltype) EQ 0 THEN key_caltype = 'greg' 
    242236                ELSE:BEGIN 
    243 ;            notused = report('Unknown calendar: '+value+', we use greg calendar.')  
     237;            notused = report('Unknown calendar: '+value+', we use greg calendar.') 
    244238                  key_caltype = 'greg' 
    245239                END 
    246240              ENDCASE 
    247241            ENDIF ELSE BEGIN 
    248 ;        notused = report('Unknown calendar, we use '+key_caltype+' calendar.')  
     242;        notused = report('Unknown calendar, we use '+key_caltype+' calendar.') 
    249243              IF n_elements(key_caltype) EQ 0 THEN key_caltype = 'greg' 
    250244            ENDELSE 
     
    259253              'hour':time = julday(debut[1], debut[2], debut[0])+time/24.d 
    260254              'day':time = julday(debut[1], debut[2], debut[0])+time 
    261               'month':BEGIN  
     255              'month':BEGIN 
    262256                if total(fix(time) NE time) NE 0 then $ ; we switch to days with 30d/m 
    263257                   time = julday(debut[1], debut[2], debut[0])+round(time*30) $ 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/xcreateanim.pro

    r150 r226  
    55; @categories 
    66; 
    7 ;  
    87; @param EVENT 
    98; 
    10 ;  
    119; @returns 
    12 ;  
    13 ;  
     10; 
    1411; @uses 
    15 ;  
    16 ;  
     12; 
    1713; @restrictions 
    18 ;  
    19 ;  
     14; 
    2015; @examples 
    21 ;  
    22 ;  
     16; 
    2317; @history 
    24 ;  
    25 ;  
     18; 
    2619; @version 
    27 ; $Id$  
    28 ;  
     20; $Id$ 
     21; 
    2922; @todo 
    3023; seb 
    3124; 
    3225;- 
    33 pro xcreateanim_event, event  
     26pro xcreateanim_event, event 
    3427; 
    3528  compile_opt idl2, strictarrsubs 
     
    6154  widget_control, widget_info(event.top, find_by_uname = 'debut') $ 
    6255                  , get_value = vdate1 
    63   index1 = where(calendar eq date2jul(vdate1)) & index1 = index1[0]  
     56  index1 = where(calendar eq date2jul(vdate1)) & index1 = index1[0] 
    6457  if index1 EQ -1 then return 
    6558; 
    6659  widget_control, widget_info(event.handler, find_by_uname = 'fin') $ 
    6760                  , get_value = vdate2 
    68   index2 = where(calendar eq date2jul(vdate2)) & index2 = index2[0]  
     61  index2 = where(calendar eq date2jul(vdate2)) & index2 = index2[0] 
    6962  if index2 EQ -1 OR index2 LE index1 then return 
    7063; We delete the widget before create the file .ps 
     
    7366; creation of the routine which will serve us to do the drawing 
    7467; 
    75 ; We recuperate the list of instructions  
     68; We recuperate the list of instructions 
    7669  globalcommand = extractatt(top_uvalue, 'globalcommand') 
    7770; We complete by first and last lines of the program 
     
    113106    green = green[index] 
    114107    blue = blue[index] 
    115   endif             
     108  endif 
    116109; 
    117110  if depth gt 8 then $ 
     
    133126      IF keyword_set(fakecal) THEN date = ind ELSE date = jul2date(calendar[ind]) 
    134127      xxx2ps, /noerase, date1 = date, date2 = date 
    135 ;       
     128; 
    136129      image = tvrd(true = depth GT 8) 
    137130; 
     
    142135      wdelete, !d.window 
    143136    ENDFOR 
    144   ENDIF  
     137  ENDIF 
    145138; We put a last white picture 
    146139  window, /free, /pixmap, xsize = xsize, ysize = ysize 
     
    155148  wdelete, !d.window 
    156149; File's closing. 
    157   write_gif, animdir+nomfic, /close  
    158   widget_control, base, /destroy  
     150  write_gif, animdir+nomfic, /close 
     151  widget_control, base, /destroy 
    159152; Rerock in "normal" mode 
    160153  thisOS = strupcase(strmid(!version.os_family, 0, 3)) 
     
    169162  endif 
    170163; 
    171    
     164 
    172165  return 
    173166end 
     
    179172; @categories 
    180173; 
    181 ;  
     174; 
    182175; @param PARENT 
    183176; 
    184 ;  
     177; 
    185178; @returns 
    186 ;  
    187 ;  
     179; 
     180; 
    188181; @uses 
    189 ;  
    190 ;  
     182; 
    191183; @restrictions 
    192 ;  
    193 ;  
     184; 
    194185; @examples 
    195 ;  
    196 ;  
     186; 
    197187; @history 
    198 ;  
    199 ;  
     188; 
    200189; @version 
    201 ; $Id$  
    202 ;  
     190; $Id$ 
     191; 
    203192; @todo 
    204193; seb 
     
    229218   if strtrim(filenames[0], 1) EQ '' then filenames = filenames[1:n_elements(filenames)-1] 
    230219   indexfile = (where(filelist EQ filenames[0]))[0] 
    231    calendar = (*(extractatt(top_uvalue, 'fileparameters'))[indexfile]).time_counter   
     220   calendar = (*(extractatt(top_uvalue, 'fileparameters'))[indexfile]).time_counter 
    232221   key_caltype = (*(extractatt(top_uvalue, 'fileparameters'))[indexfile]).caltype 
    233222   fakecal = (*(extractatt(top_uvalue, 'fileparameters'))[indexfile]).fakecal 
     
    237226         calendarbis = (*(extractatt(top_uvalue, 'fileparameters'))[indexfilebis]).time_counter 
    238227         if n_elements(calendarbis) NE n_elements(calendar)  then begin 
    239             nothing = report('Les diffrents plots n''utilisent pas le meme calendrier. !C Animation impossible!', /error) 
     228            nothing = report('plots do not use the same calendar. !C Animation impossible!', /error) 
    240229            return 
    241230         ENDIF 
    242231         if total(calendar NE calendarbis) NE 0 then begin 
    243             nothing = report('Les diffrents plots n''utilisent pas le meme calendrier. !C Animation impossible!', /error) 
     232            nothing = report('plots do not use the same calendar. !C Animation impossible!', /error) 
    244233            return 
    245234         endif 
     
    249238; It is possible to do an animation. 
    250239; 
    251    base = widget_base(/column, title = 'animation creation', uvalue = {parent:parent, indexfile:indexfile})    
     240   base = widget_base(/column, title = 'animation creation', uvalue = {parent:parent, indexfile:indexfile}) 
    252241   rien = widget_label(base, value = 'animation name') 
    253242   rien = widget_text(base,value='anim_idl.gif', uname='Filename', /editable) 
     
    266255   widget_control,base,/realize 
    267256   xmanager,'xcreateanim', base, /no_block 
    268     
     257 
    269258   return 
    270259end 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/xxxmenubar_event.pro

    r150 r226  
    55; @categories 
    66; 
    7 ;  
     7; 
    88; @param EVENT 
    99; 
    10 ;  
    1110; @returns 
    12 ;  
    13 ;  
     11; 
    1412; @uses 
    15 ;  
    16 ;  
     13; 
    1714; @restrictions 
    18 ;  
    19 ;  
     15; 
    2016; @examples 
    21 ;  
    22 ;  
     17; 
    2318; @history 
    24 ;  
    25 ;  
    26 ; @version  
     19; 
     20; @version 
    2721; $Id$ 
    2822; 
    29 ; @todo  
     23; @todo 
    3024; seb 
    3125;- 
     
    3933 
    4034  case event.value of 
    41     'Open' :begin  
     35    'Open' :begin 
    4236      oldmeshparams = ccmeshparameters 
    4337      newfile = selectfile() 
     
    6256; What is the selected field ? Do we reselect it ? 
    6357      fieldname = widget_info(vlstid, /combobox_gettext) 
    64       index = where(newfile.fileparameters.listvar EQ fieldname)  
     58      index = where(newfile.fileparameters.listvar EQ fieldname) 
    6559      widget_control, vlstid, set_value = newfile.fileparameters.listvar 
    6660      widget_control, vlstid, set_combobox_select = 0 > index[0] 
     
    117111      xxx, CALLERWIDID = event.top, _extra = extra 
    118112    end 
    119     'Quit':begin  
     113    'Quit':begin 
    120114      widget_control, event.top, get_uvalue = top_uvalue 
    121115      ptr_free, extractatt(top_uvalue, 'exextra') 
     
    142136                 , /POSTSCRIPT 
    143137    END 
    144     'Animated gif' :begin  
     138    'Animated gif' :begin 
    145139      IF float(strmid(!version.release,0,3)) GE 6.2 THEN xcreateanim, event.top 
    146140    end 
     
    174168      widget_control, event.top, get_uvalue = top_uvalue 
    175169; portrait or landscape ??? 
    176       options = extractatt(top_uvalue, 'options')    
     170      options = extractatt(top_uvalue, 'options') 
    177171      optionsflag = extractatt(top_uvalue, 'optionsflag') 
    178172      portrait = (optionsflag[where(options EQ 'Portrait/Landscape'), 0])[0] 
     
    203197      ENDIF 
    204198; We recuperate the name of the file 
    205       filename = xquestion('dans quel fichier bianire voulez vous sauver le widget ?', 'xxx_widget.dat') 
     199      filename = xquestion('In which binary file do you want to save the widget ?', 'xxx_widget.dat') 
    206200; We complete it by a .dat 
    207201      if rstrpos(filename, '.dat') NE strlen(filename)-4 then filename = filename+'.dat' 
     
    219213      for i = 0,  n_elements(commande)-1 do print, commande[i] 
    220214    end 
    221    'Portrait/Landscape' :begin  
     215   'Portrait/Landscape' :begin 
    222216      widget_control, event.top, get_uvalue = top_uvalue 
    223217      options = extractatt(top_uvalue, 'options') 
     
    255249      ENDELSE 
    256250    end 
    257     'Overlay' :begin  
     251    'Overlay' :begin 
    258252      widget_control, event.top, get_uvalue = top_uvalue 
    259253      numdessinin = (extractatt(top_uvalue, 'smallin'))[2]-1 
    260       options = extractatt(top_uvalue, 'options')    
     254      options = extractatt(top_uvalue, 'options') 
    261255      flags = extractatt(top_uvalue, 'optionsflag') 
    262256      index = where(options EQ 'Overlay') 
     
    269263      widget_control, event.top, get_uvalue = top_uvalue 
    270264      numdessinin = (extractatt(top_uvalue, 'smallin'))[2]-1 
    271       options = extractatt(top_uvalue, 'options')    
     265      options = extractatt(top_uvalue, 'options') 
    272266      flags = extractatt(top_uvalue, 'optionsflag') 
    273267      index = where(options EQ 'Vecteur') 
     
    280274      widget_control, event.top, get_uvalue = top_uvalue 
    281275      numdessinin = (extractatt(top_uvalue, 'smallin'))[2]-1 
    282       options = extractatt(top_uvalue, 'options')    
     276      options = extractatt(top_uvalue, 'options') 
    283277      flags = extractatt(top_uvalue, 'optionsflag') 
    284278      index = where(options EQ 'Longitude / x index') 
     
    314308      (*top_uvalue[1, findline(top_uvalue, 'domaines')])[*, numdessinin] = boxzoom 
    315309    end 
    316     'Latitude / y index':begin  
     310    'Latitude / y index':begin 
    317311      widget_control, event.top, get_uvalue = top_uvalue 
    318312      numdessinin = (extractatt(top_uvalue, 'smallin'))[2]-1 
    319       options = extractatt(top_uvalue, 'options')    
     313      options = extractatt(top_uvalue, 'options') 
    320314      flags = extractatt(top_uvalue, 'optionsflag') 
    321315      index = where(options EQ 'Latitude / y index') 
  • trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_calendar.pro

    r157 r226  
    77;    case uval of 
    88;       'done':widget_control, event.top, /destroy 
    9 ;       'set':BEGIN  
     9;       'set':BEGIN 
    1010;          widget_control, event.id, get_value = value 
    1111;          widget_control, ComboboxId, set_value = value 
    1212;       END 
    13 ;       'get':BEGIN  
     13;       'get':BEGIN 
    1414;          widget_control, ComboboxId, get_value = value 
    1515;          help,  value, /struct 
     
    4040; @file_comments 
    4141; 
    42 ; 
    43 ; @categories 
    44 ; Compound widget 
    45 ;  
     42; @categories 
     43; Compound widget 
     44; 
    4645; @param ID 
    4746; 
     
    5150; 
    5251; @returns 
    53 ;  
    54 ;  
    55 ; @uses 
    56 ;  
    57 ;  
    58 ; @restrictions 
    59 ;  
    60 ;  
    61 ; @examples 
    62 ;  
    63 ;  
    64 ; @history 
    65 ;  
    66 ;  
    67 ; @version  
     52; 
     53; @uses 
     54; 
     55; @restrictions 
     56; 
     57; @examples 
     58; 
     59; @history 
     60; 
     61; @version 
    6862; $Id$ 
    6963;- 
     
    7165PRO cw_calendar_set_value, id, value 
    7266; 
    73   compile_opt strictarr, strictarrsubs  
     67  compile_opt strictarr, strictarrsubs 
    7468; 
    7569; 
     
    7973  widget_control, winfo_id, get_uvalue = infowid 
    8074  key_caltype = infowid.caltype 
    81    
     75 
    8276; high freqeuncy calendar 
    8377  IF keyword_set(infowid.fakecal) THEN BEGIN 
    8478    value2 = date2jul(long(value)) - infowid.fakecal 
    85     IF value2 LT n_elements(infowid.calendar) AND value2 GE 0 THEN BEGIN   
     79    IF value2 LT n_elements(infowid.calendar) AND value2 GE 0 THEN BEGIN 
    8680      stepid = widget_info(id, find_by_uname = 'step') 
    8781      widget_control, stepid, set_value = {combobox_select:value2} 
     
    8983      widget_control, winfo_id, set_uvalue = infowid 
    9084    ENDIF 
    91   ENDIF ELSE BEGIN  
     85  ENDIF ELSE BEGIN 
    9286; 
    9387    value = long(value[0]) 
     
    122116; @categories 
    123117; Compound widget 
    124 ;  
     118; 
    125119; @param ID 
    126120; 
    127121; 
    128122; @returns 
    129 ;  
    130 ;  
    131 ; @uses 
    132 ;  
    133 ;  
    134 ; @restrictions 
    135 ;  
    136 ;  
    137 ; @examples 
    138 ;  
    139 ;  
    140 ; @history 
    141 ;  
    142 ;  
    143 ; @version  
     123; 
     124; @uses 
     125; 
     126; @restrictions 
     127; 
     128; @examples 
     129; 
     130; @history 
     131; 
     132; @version 
    144133; $Id$ 
    145134;- 
    146135FUNCTION cw_calendar_get_value, id 
    147136; 
    148   compile_opt strictarr, strictarrsubs  
     137  compile_opt strictarr, strictarrsubs 
    149138; 
    150139  winfo_id = widget_info(id, find_by_uname = 'infocal') 
     
    159148; @categories 
    160149; Compound widget 
    161 ;  
     150; 
    162151; @param ID 
    163152; 
     
    167156; 
    168157; @returns 
    169 ;  
    170 ;  
    171 ; @uses 
    172 ;  
    173 ;  
    174 ; @restrictions 
    175 ;  
    176 ;  
    177 ; @examples 
    178 ;  
    179 ;  
    180 ; @history 
    181 ;  
    182 ;  
    183 ; @version  
    184 ; $Id$ 
    185 ;- 
    186 FUNCTION get_cal_value, id, winfoid  
    187 ; 
    188   compile_opt strictarr, strictarrsubs  
     158; 
     159; @uses 
     160; 
     161; @restrictions 
     162; 
     163; @examples 
     164; 
     165; @history 
     166; 
     167; @version 
     168; $Id$ 
     169;- 
     170FUNCTION get_cal_value, id, winfoid 
     171; 
     172  compile_opt strictarr, strictarrsubs 
    189173; 
    190174  winfo_id = widget_info(id, find_by_uname = 'infocal') 
     
    202186    widget_control, wid_id, get_value = wid_value 
    203187    allmonths = string(format = '(C(CMoA))', 31*(indgen(12))) 
    204     month = (where(allmonths EQ wid_value.combobox_gettext))[0] + 1  
     188    month = (where(allmonths EQ wid_value.combobox_gettext))[0] + 1 
    205189    date = date + 100L * long(month) 
    206190  ENDIF ELSE date = date + (oldate MOD 10000L)/100L*100L 
     
    224208; @categories 
    225209; Compound widget 
    226 ;  
     210; 
    227211; @param EVENT 
    228212; 
     
    235219; 
    236220; @returns 
    237 ;  
    238 ;  
    239 ; @uses 
    240 ;  
    241 ;  
    242 ; @restrictions 
    243 ;  
    244 ;  
    245 ; @examples 
    246 ;  
    247 ;  
    248 ; @history 
    249 ;  
    250 ;  
    251 ; @version  
     221; 
     222; @uses 
     223; 
     224; @restrictions 
     225; 
     226; @examples 
     227; 
     228; @history 
     229; 
     230; @version 
    252231; $Id$ 
    253232;- 
    254233PRO set_cal_combobox, event, casename, date0 
    255234; 
    256   compile_opt strictarr, strictarrsubs  
     235  compile_opt strictarr, strictarrsubs 
    257236; 
    258237; casename: Which widget shall we move: 'day', 'month' or 'year' ? 
     
    269248; index of days/months/years according to date0 
    270249  case casename of 
    271     'day':BEGIN  
     250    'day':BEGIN 
    272251; list of days corresponding to month0 and year0 
    273252      index = where(monthcal EQ month0 AND yearcal EQ year0) 
    274253      current = daycal[index] 
    275254    END 
    276     'month':BEGIN  
     255    'month':BEGIN 
    277256; list of months corresponding to year0 
    278257      index = where(yearcal EQ year0) 
     
    283262      current = current[indexbis] 
    284263    END 
    285     'year':BEGIN  
     264    'year':BEGIN 
    286265; keep only the uniq years 
    287266      index = uniq(yearcal) 
     
    297276  if casename EQ 'month' then begin 
    298277    widget_control, wid_id, set_value = string(format = '(C(CMoA))', 31*(current-1)) 
    299   ENDIF ELSE BEGIN  
     278  ENDIF ELSE BEGIN 
    300279    widget_control, wid_id, set_value = strtrim(current, 1) 
    301280  ENDELSE 
     
    310289    1:selected = 0 
    311290; 2: a new date has been specified... 
    312     2:BEGIN  
     291    2:BEGIN 
    313292      case casename of 
    314293        'day':selected = (where(current EQ day0))[0] 
     
    325304end 
    326305;---------------------------------------------------------------------- 
    327 ; move cyclicly the calendar to the 
     306; move cyclically the calendar to the 
    328307; value 0 if event.out=1 or combobox_number-1 if event.out=-1 
    329308;+ 
     
    333312; @categories 
    334313; Compound widget 
    335 ;  
     314; 
    336315; @param EVENT 
    337316; 
     
    341320; 
    342321; @returns 
    343 ;  
    344 ;  
    345 ; @uses 
    346 ;  
    347 ;  
    348 ; @restrictions 
    349 ;  
    350 ;  
    351 ; @examples 
    352 ;  
    353 ;  
    354 ; @history 
    355 ;  
    356 ;  
    357 ; @version  
     322; 
     323; @uses 
     324; 
     325; @restrictions 
     326; 
     327; @examples 
     328; 
     329; @history 
     330; 
     331; @version 
    358332; $Id$ 
    359333;- 
    360334PRO move, event, casename 
    361335; 
    362   compile_opt strictarr, strictarrsubs  
     336  compile_opt strictarr, strictarrsubs 
    363337; 
    364338   possiblecase = ['day', 'month', 'year', 'impossiblecase'] 
     
    391365; @categories 
    392366; Compound widget 
    393 ;  
     367; 
    394368; @param EVENT 
    395369; 
    396370; 
    397371; @returns 
    398 ;  
    399 ;  
    400 ; @uses 
    401 ;  
    402 ;  
    403 ; @restrictions 
    404 ;  
    405 ;  
    406 ; @examples 
    407 ;  
    408 ;  
    409 ; @history 
    410 ;  
    411 ;  
    412 ; @version  
     372; 
     373; @uses 
     374; 
     375; @restrictions 
     376; 
     377; @examples 
     378; 
     379; @history 
     380; 
     381; @version 
    413382; $Id$ 
    414383;- 
     
    416385; 
    417386@cm_4cal 
    418   compile_opt strictarr, strictarrsubs  
     387  compile_opt strictarr, strictarrsubs 
    419388; 
    420389  winfo_id = widget_info(event.handler, find_by_uname = 'infocal') 
     
    424393  widget_control, event.id, get_uvalue = uval 
    425394; high frequency calendar 
    426   IF uval.name EQ 'step' THEN BEGIN  
     395  IF uval.name EQ 'step' THEN BEGIN 
    427396    infowid.date = jul2date(event.index + infowid.fakecal) 
    428397  ENDIF ELSE BEGIN 
     
    434403; we try to move the combobox just right, with name: possiblecase[whichcase+1] 
    435404      if widget_info(event.handler, find_by_uname = possiblecase[whichcase+1]) EQ 0 then BEGIN 
    436 ; this widget do not exist we set cyclicly the current widget to the 
     405; this widget do not exist we set cyclically the current widget to the 
    437406; value 0 if event.out=1 or combobox_number-1 if event.out=-1 
    438407        widget_control, event.id, get_value = widvalue 
     
    451420; we update the date 
    452421    infowid = get_cal_value(event.handler, winfo_id) 
    453   ENDELSE  
     422  ENDELSE 
    454423; 
    455424  widget_control, winfo_id, set_uvalue = infowid 
     
    465434; @categories 
    466435; Compound widget 
    467 ;  
     436; 
    468437; @param PARENT {in}{required} 
    469438; The widget ID of the parent widget. 
     
    474443; @param JDATE0 
    475444; 
    476 ;  
    477445; @keyword CALTYPE 
    478 ;  
    479 ;  
     446; 
    480447; @keyword FAKECAL 
    481448; 
    482 ;  
     449; 
    483450; @keyword UVALUE 
    484451; 
    485 ;  
    486452; @keyword UNAME 
    487453; 
    488 ;  
     454; 
    489455; @keyword _EXTRA 
    490456; Used to pass your keywords 
    491 ;  
    492 ; @returns 
    493 ;  
    494 ;  
    495 ; @uses 
    496 ;  
    497 ;  
    498 ; @restrictions 
    499 ;  
    500 ;  
    501 ; @examples 
    502 ;  
    503 ;  
    504 ; @history 
    505 ;  
    506 ;  
    507 ; @version  
     457; 
     458; @returns 
     459; 
     460; @uses 
     461; 
     462; @restrictions 
     463; 
     464; @examples 
     465; 
     466; @history 
     467; 
     468; @version 
    508469; $Id$ 
    509470; 
    510471; @todo 
    511472; seb 
    512 ;  
     473; 
    513474;- 
    514475FUNCTION cw_calendar, parent, calendar, jdate0, CALTYPE = CALTYPE, FAKECAL = fakecal, UVALUE = uvalue, UNAME = uname, _extra = ex 
     
    516477@cm_4cal 
    517478; 
    518   compile_opt strictarr, strictarrsubs  
     479  compile_opt strictarr, strictarrsubs 
    519480; 
    520481  if keyword_set(caltype) then key_caltype = caltype 
     
    547508                     , uvalue = {calendar:calendar, date:jul2date(jdate0), fakecal:fakecal, caltype: key_caltype}) 
    548509; 
    549   IF keyword_set(fakecal) THEN BEGIN  
     510  IF keyword_set(fakecal) THEN BEGIN 
    550511    cmbbid = cw_combobox_pm(base, UVALUE = {name:'step'}, UNAME = 'step' $ 
    551512                            , value = strtrim(indgen(n_elements(calendar)), 1)) 
    552513    widget_control, cmbbid, set_value = {combobox_select:(where(calendar EQ jdate0))[0]} 
    553   ENDIF ELSE BEGIN  
     514  ENDIF ELSE BEGIN 
    554515; 
    555516    vallen = widget_info(base, string_size = 'm') 
  • trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_combobox_pm.pro

    r157 r226  
    77;    case uval of 
    88;       'done':widget_control, event.top, /destroy 
    9 ;       'dynamic_resize':BEGIN  
     9;       'dynamic_resize':BEGIN 
    1010;          widget_control, event.id, get_value = value 
    1111;          widget_control, ComboboxId, set_value = {dynamic_resize:value} 
    1212;       END 
    13 ;       'combobox_select':BEGIN  
     13;       'combobox_select':BEGIN 
    1414;          widget_control, event.id, get_value = value 
    1515;          widget_control, ComboboxId, set_value = {combobox_select:value} 
    1616;       END 
    17 ;       'value':BEGIN  
     17;       'value':BEGIN 
    1818;          widget_control, event.id, get_value = value 
    1919;          widget_control, ComboboxId, set_value = value 
    2020;       END 
    21 ;       'get':BEGIN  
     21;       'get':BEGIN 
    2222;          widget_control, ComboboxId, get_value = value 
    2323;          help,  value, /struct 
     
    5252; @categories 
    5353; Compound widget 
    54 ;  
     54; 
    5555; @param ID 
    5656; 
     
    6060; 
    6161; @returns 
    62 ;  
    63 ;  
     62; 
    6463; @uses 
    65 ;  
    66 ;  
     64; 
    6765; @restrictions 
    68 ;  
    69 ;  
     66; 
    7067; @examples 
    71 ;  
    72 ;  
     68; 
    7369; @history 
    74 ;  
    75 ;  
    76 ; @version  
     70; 
     71; @version 
    7772; $Id$ 
    7873;- 
     
    10499; @categories 
    105100; Compound widget 
    106 ;  
     101; 
    107102; @param ID 
    108103; 
    109 ; 
    110104; @returns 
    111 ;  
    112 ;  
     105; 
    113106; @uses 
    114 ;  
    115 ;  
     107; 
    116108; @restrictions 
    117 ;  
    118 ;  
     109; 
    119110; @examples 
    120 ;  
    121 ;  
     111; 
    122112; @history 
    123 ;  
    124 ;  
    125 ; @version  
     113; 
     114; @version 
    126115; $Id$ 
    127116;- 
     
    147136; @categories 
    148137; Compound widget 
    149 ;  
     138; 
    150139; @param EVENT 
    151140; 
    152 ; 
    153141; @returns 
    154 ;  
    155 ;  
     142; 
    156143; @uses 
    157 ;  
    158 ;  
     144; 
    159145; @restrictions 
    160 ;  
    161 ;  
     146; 
    162147; @examples 
    163 ;  
    164 ;  
     148; 
    165149; @history 
    166 ;  
    167 ;  
    168 ; @version  
     150; 
     151; @version 
    169152; $Id$ 
    170153;- 
     
    187170   case uval OF 
    188171      'plus':BEGIN 
    189          if index LT (cmbbnumb - 1) then BEGIN  
     172         if index LT (cmbbnumb - 1) then BEGIN 
    190173           index = index + 1 
    191174           widget_control, ComboboxId, set_combobox_select = index 
     
    193176      END 
    194177      'minus':BEGIN 
    195          if index GT 0 then BEGIN  
     178         if index GT 0 then BEGIN 
    196179           index = index - 1 
    197180           widget_control, ComboboxId, set_combobox_select = index 
     
    212195; @categories 
    213196; Compound widget 
    214 ;  
     197; 
    215198; @param PARENT {in}{required} 
    216199; The widget ID of the parent widget. 
     
    219202; Buttons will be arranged in the number of columns 
    220203; specified by this keyword. 
    221 ;  
     204; 
    222205; @keyword ROW 
    223206; Buttons will be arranged in the number of rows 
    224207; specified by this keyword. 
    225 ;  
     208; 
    226209; @keyword UVALUE 
    227210; The user value to be associated with the widget. 
    228 ;  
     211; 
    229212; @keyword UNAME 
    230213; The user name to be associated with the widget. 
    231 ;  
     214; 
    232215; @keyword VALUE 
    233216; 
     
    258241;   index the array of names originally used to set the widget''s 
    259242;   value 
    260 ;   OUT:It is an integer which can take 3 values:  
     243;   OUT:It is an integer which can take 3 values: 
    261244;       1 : If we press + when the index is already at the max 
    262245;       Comment: In this case, the index stay at the max 
     
    271254;       1) GET_VALUE 
    272255;   widget_control,wid_id,get_value=resultat 
    273 ;   Send back, in the result variable, a structure of 3 elements whose  
     256;   Send back, in the result variable, a structure of 3 elements whose 
    274257;   names are inspired by keywords we can pass at widget_control when 
    275258;   we use WIDGET_COMBOBOX: 
     
    285268;       2) SET_VALUE 
    286269;   widget_control,wid_id,set_value=impose 
    287 ;   Allows to modify the state of the combobox like we can do it for  
    288 ;   WIDGET_COMBOBOX. May impose:  
     270;   Allows to modify the state of the combobox like we can do it for 
     271;   WIDGET_COMBOBOX. May impose: 
    289272;       a) The contents of the list widget (string or string array) 
    290 ;       b) A structure which can have for elements (from 1 to 3):  
     273;       b) A structure which can have for elements (from 1 to 3): 
    291274;            DYNAMIC_RESIZE:Set this keyword to activate (if set to 1) 
    292275;            or deactivate (if set to 0) dynamic resizing of the 
     
    323306   IF (N_PARAMS() NE 1) THEN MESSAGE, 'Incorrect number of arguments' 
    324307   ON_ERROR, 2                  ;return to caller 
    325 ; cheking for row and column keywords 
    326    row = keyword_set(row)*(1-keyword_set(column))  
    327    column = keyword_set(column)*(1-keyword_set(row))+(keyword_set(column) EQ row)  
     308; checking for row and column keywords 
     309   row = keyword_set(row)*(1-keyword_set(column)) 
     310   column = keyword_set(column)*(1-keyword_set(row))+(keyword_set(column) EQ row) 
    328311   if NOT keyword_set(uvalue) then uvalue = '' 
    329312   if NOT keyword_set(uname) then uname = '' 
     
    333316                      , FUNC_GET_VALUE='cw_combobox_pm_get_value' $ 
    334317                      , PRO_SET_VALUE='cw_combobox_pm_set_value' $ 
    335                       , UVALUE = uvalue, UNAME = uname, _extra = ex)    
     318                      , UVALUE = uvalue, UNAME = uname, _extra = ex)  
    336319; 
    337320   vallen = widget_info(base, string_size = 'm') 
    338321   vallen = 35 + (vallen[0]-1)*max(strlen(value)) 
    339    if keyword_set(row) THEN BEGIN  
     322   if keyword_set(row) THEN BEGIN 
    340323     nothing = widget_button(base, value = '-', uvalue = 'minus', xoffset = 0 $ 
    341324                             , yoffset = 5, xsize = 15, ysize = 15) 
     
    345328                             , xoffset = vallen+11, yoffset = 5 $ 
    346329                             , xsize = 15, ysize = 15) 
    347    ENDIF ELSE BEGIN  
     330   ENDIF ELSE BEGIN 
    348331     nothing = widget_combobox(base, VALUE = value, UVALUE = 'Combobox', UNAME = 'Combobox' $ 
    349332                               , xoffset = 0, yoffset = 0, xsize = vallen) 
     
    354337                             , xoffset = vallen/2 $ 
    355338                             , yoffset = 24, xsize = 15, ysize = 15) 
    356    ENDELSE  
     339   ENDELSE 
    357340; 
    358341;   widget_control,base,/realize 
  • trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_domain.pro

    r172 r226  
    1212;          widget_control, Id, set_value = boxzoom 
    1313;       END 
    14 ;       'get':BEGIN  
     14;       'get':BEGIN 
    1515;          widget_control, Id, get_value = value 
    1616;          print,  value 
     
    4545; @categories 
    4646; Compound widget 
    47 ;  
     47; 
    4848; @param ID 
    4949; 
     
    5353; 
    5454; @returns 
    55 ;  
    56 ;  
     55; 
    5756; @uses 
    58 ;  
    59 ;  
     57; 
    6058; @restrictions 
    61 ;  
    62 ;  
     59; 
    6360; @examples 
    64 ;  
    65 ;  
     61; 
    6662; @history 
    67 ;  
    68 ;  
    69 ; @version  
     63; 
     64; @version 
    7065; $Id$ 
    7166;- 
     
    8681; What is the type of boxzoom ? 
    8782   currentplot = (extractatt(top_uvalue, 'smallin'))[2]-1 
    88    options = extractatt(top_uvalue, 'options')    
     83   options = extractatt(top_uvalue, 'options') 
    8984   flags = extractatt(top_uvalue, 'optionsflag') 
    9085   flags = flags[*, currentplot] 
     
    119114   Case N_Elements(Value) OF 
    120115      0:boxzoom = [lonn1, lonn2, latt1, latt2, vertf1, vertf2] 
    121       1:BEGIN  
     116      1:BEGIN 
    122117         if value EQ -1 then boxzoom = [lonn1, lonn2, latt1, latt2, vertf1, vertf2] $ 
    123118         ELSE boxzoom=[lonn1, lonn2, latt1, latt2, 0.,value[0]] 
     
    127122      5:boxzoom=[Value[0:3], 0, Value[4]] 
    128123      6:boxzoom = Value 
    129       Else:BEGIN  
     124      Else:BEGIN 
    130125         rien = report('Wrong Definition of Boxzoom') 
    131126      END 
     
    151146      min = floor(min([glamt,glamf], max = max)) 
    152147      max = ceil(max) 
    153    ENDIF ELSE BEGIN  
     148   ENDIF ELSE BEGIN 
    154149      min = 0 
    155150      max = jpi-1 
     
    195190      min = floor(min([gphit,gphif], max = max)) 
    196191      max = ceil(max) 
    197    ENDIF ELSE BEGIN  
     192   ENDIF ELSE BEGIN 
    198193      min = 0 
    199194      max = jpj-1 
     
    250245      widget_control, dthlv2id, set_value = {value:strtrim(gdep2, 1)} 
    251246   ENDIF ELSE gdep2 = gdep1+1 
    252 ; We make sure that given depthes contain at least one level. 
     247; We make sure that given depths contains at least one level. 
    253248   if boxzoom[4] GT boxzoom[5] then begin 
    254249      rien = boxzoom[4] 
     
    256251      boxzoom[5] = rien 
    257252   endif 
    258 ;  
     253; 
    259254   rien = where(gdep1 LT boxzoom[4], indice1) 
    260255   indice1 = indice1 < (jpk-1) 
     
    279274   widget_control, depth1id, set_value = {slider_min:min1, slider_max:max1, value:boxzoom[4]} 
    280275   min2 = gdep2[indice1] 
    281    if indice2 EQ jpk-1 then BEGIN  
     276   if indice2 EQ jpk-1 then BEGIN 
    282277      max2 = max([gdept, gdepw]) 
    283278      max2 = strtrim(string(max2,format='(e8.0)'), 1) 
     
    295290; @categories 
    296291; Compound widget 
    297 ;  
     292; 
    298293; @param ID 
    299294; 
    300295; 
    301296; @returns 
    302 ;  
    303 ;  
     297; 
    304298; @uses 
    305 ;  
    306 ;  
     299; 
    307300; @restrictions 
    308 ;  
    309 ;  
     301; 
    310302; @examples 
    311 ;  
    312 ;  
     303; 
    313304; @history 
    314 ;  
    315 ;  
    316 ; @version  
     305; 
     306; @version 
    317307; $Id$ 
    318308;- 
     
    337327; @categories 
    338328; Compound widget 
    339 ;  
     329; 
    340330; @param EVENT 
    341331; 
    342332; 
    343333; @returns 
    344 ;  
    345 ;  
     334; 
    346335; @uses 
    347 ;  
    348 ;  
     336; 
    349337; @restrictions 
    350 ;  
    351 ;  
     338; 
    352339; @examples 
    353 ;  
    354 ;  
     340; 
    355341; @history 
    356 ;  
    357 ;  
    358 ; @version  
     342; 
     343; @version 
    359344; $Id$ 
    360345;- 
     
    408393            widget_control, dthlv2id, set_value = {combobox_select:event.index} 
    409394; So we redefine the value and the max of the slider 2 
    410             if event.index EQ jpk-1 then BEGIN  
     395            if event.index EQ jpk-1 then BEGIN 
    411396               max = max([gdept, gdepw]) 
    412397               max = strtrim(string(max,format='(e8.0)'), 1) 
     
    417402; So we redefine the max of the slider 1 
    418403            widget_control, depth1id, set_value = {slider_max:gdep1[event.index]} 
    419          END  
    420 ; We redefine the value and the min of the slider depth1  
     404         END 
     405; We redefine the value and the min of the slider depth1 
    421406         if event.index EQ 0 then min = 0 ELSE min = gdep1[event.index-1]+1 
    422407         widget_control, depth1id, set_value = {slider_min:min, value:gdep1[event.index]} 
     
    443428; Se we redefine the min of the slider 2 
    444429            widget_control, depth2id, set_value = {slider_min:gdep2[event.index]} 
    445          END  
     430         END 
    446431; We redefine the value and the max of the slider depth 2 
    447          if event.index EQ jpk-1 then BEGIN  
     432         if event.index EQ jpk-1 then BEGIN 
    448433            max = max([gdept, gdepw]) 
    449434            max = strtrim(string(max,format='(e8.0)'), 1) 
     
    488473            widget_control, dthlv2id, set_value = {combobox_select:indice} 
    489474; So we redefine the min of the slider 2 
    490             if indice EQ jpk-1 then BEGIN  
     475            if indice EQ jpk-1 then BEGIN 
    491476               max = max([gdept, gdepw]) 
    492477               max = strtrim(string(max,format='(e8.0)'), 1) 
     
    510495; @categories 
    511496; Compound widget 
    512 ;  
     497; 
    513498; @param PARENT {in}{required} 
    514499; The widget ID of the parent widget. 
    515 ;  
     500; 
    516501; @keyword UVALUE 
    517502; The user value to be associated with the widget. 
    518 ;  
     503; 
    519504; @keyword UNAME 
    520505; The user name to be associated with the widget. 
    521 ;  
     506; 
    522507; @keyword STRICT 
    523508; 
     
    527512; 
    528513; @keyword BOXZOOM 
    529 ; Vector indicating the geographic zone on which we want to cut the map.  
    530 ; If BOXZOOM has :  
     514; Vector indicating the geographic zone on which we want to cut the map. 
     515; If BOXZOOM has : 
    531516;   1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] 
    532517;   2 elements: The extraction is made on [lon1, lon2, lat1, lat2, boxzoom[0],boxzoom[1]] 
    533518;   4 elements: The extraction is made on [Boxzoom, 0, max([gdept, gdepw])] 
    534519;   5 elements: The extraction is made on [Boxzoom[0:3], 0, Boxzoom[4]] 
    535 ;   6 elements: The extraction is made on Boxzoom  
     520;   6 elements: The extraction is made on Boxzoom 
    536521; Where lon1, lon2,lat1,lat2 are global variables defined at the last domdef! 
    537522; 
    538523; @keyword _EXTRA 
    539524; Used to pass your keywords 
    540 ;  
     525; 
    541526; @returns 
    542 ;  
    543 ;  
     527; 
    544528; @uses 
    545 ;  
    546 ;  
     529; 
    547530; @restrictions 
    548 ;  
    549 ;  
     531; 
    550532; @examples 
    551 ;  
    552 ;  
     533; 
    553534; @history 
    554 ;  
    555 ;  
    556 ; @version  
     535; 
     536; @version 
    557537; $Id$ 
    558538; 
    559539; @todo 
    560540; seb: Documenter 
    561 ;  
     541; 
    562542;- 
    563543FUNCTION cw_domain, parent, BOXZOOM = boxzoom, STRICT = strict, UVALUE = uvalue, UNAME = uname, UNZOOM = unzoom, _extra = ex 
     
    596576                     , FUNC_GET_VALUE = 'cw_domain_get_value' $ 
    597577                     , PRO_SET_VALUE = 'cw_domain_set_value' $ 
    598                      , UVALUE = uvalue, UNAME = uname, _extra = ex)    
     578                     , UVALUE = uvalue, UNAME = uname, _extra = ex) 
    599579;------------------------------------------------ 
    600580  baseh = widget_base(base, column = 1+keyword_set(unzoom), space = 0) 
  • trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_droplist_pm.pro

    r157 r226  
    66;    case uval of 
    77;       'done':widget_control, event.top, /destroy 
    8 ;       'dynamic_resize':BEGIN  
     8;       'dynamic_resize':BEGIN 
    99;          widget_control, event.id, get_value = value 
    1010;          widget_control, DroplistId, set_value = {dynamic_resize:value} 
    1111;       END 
    12 ;       'droplist_select':BEGIN  
     12;       'droplist_select':BEGIN 
    1313;          widget_control, event.id, get_value = value 
    1414;          widget_control, DroplistId, set_value = {droplist_select:value} 
    1515;       END 
    16 ;       'value':BEGIN  
     16;       'value':BEGIN 
    1717;          widget_control, event.id, get_value = value 
    1818;          widget_control, DroplistId, set_value = value 
    1919;       END 
    20 ;       'get':BEGIN  
     20;       'get':BEGIN 
    2121;          widget_control, DroplistId, get_value = value 
    2222;          help,  value, /struct 
     
    5454; @categories 
    5555; Compound widget 
    56 ;  
     56; 
    5757; @param ID 
    58 ; 
    5958; 
    6059; @param VALUE 
     
    6261; 
    6362; @returns 
    64 ;  
    65 ;  
     63; 
    6664; @uses 
    67 ;  
    68 ;  
     65; 
    6966; @restrictions 
    70 ;  
    71 ;  
     67; 
    7268; @examples 
    73 ;  
    74 ;  
     69; 
    7570; @history 
    76 ;  
    77 ;  
    78 ; @version  
     71; 
     72; @version 
    7973; $Id$ 
    8074;- 
     
    10498; @categories 
    10599; Compound widget 
    106 ;  
     100; 
    107101; @param ID 
    108102; 
    109103; @returns 
    110 ;  
    111 ;  
     104; 
    112105; @uses 
    113 ;  
    114 ;  
     106; 
    115107; @restrictions 
    116 ;  
    117 ;  
     108; 
    118109; @examples 
    119 ;  
    120 ;  
     110; 
    121111; @history 
    122 ;  
    123 ;  
    124 ; @version  
     112; 
     113; @version 
    125114; $Id$ 
    126115;- 
     
    141130; @categories 
    142131; Compound widget 
    143 ;  
     132; 
    144133; @param EVENT 
    145134; 
    146 ; 
    147135; @returns 
    148 ;  
    149 ;  
     136; 
    150137; @uses 
    151 ;  
    152 ;  
     138; 
    153139; @restrictions 
    154 ;  
    155 ;  
     140; 
    156141; @examples 
    157 ;  
    158 ;  
     142; 
    159143; @history 
    160 ;  
    161 ;  
    162 ; @version  
     144; 
     145; @version 
    163146; $Id$ 
    164147;- 
     
    200183; @categories 
    201184; Compound widget 
    202 ;  
     185; 
    203186; @param PARENT {in}{required} 
    204187; The widget ID of the parent widget. 
     
    207190; Buttons will be arranged in the number of columns 
    208191; specified by this keyword. 
    209 ;  
     192; 
    210193; @keyword ROW 
    211194; Buttons will be arranged in the number of rows 
    212195; specified by this keyword. 
    213 ;  
     196; 
    214197; @keyword UVALUE 
    215198; The user value to be associated with the widget. 
    216 ;  
     199; 
    217200; @keyword UNAME 
    218201; The user name to be associated with the widget. 
    219 ;  
     202; 
    220203; @keyword _EXTRA 
    221204; Used to pass your keywords 
     
    243226;   index the array of names originally used to set the widget''s 
    244227;   value 
    245 ;   OUT:It is an integer which can take 3 values:  
     228;   OUT:It is an integer which can take 3 values: 
    246229;       1 : If we press + when the index is already at the max 
    247230;       Comment: In this case, the index stay at the max 
     
    256239;       1) GET_VALUE 
    257240;   widget_control,wid_id,get_value=resultat 
    258 ;   Send back, in the result variable, a structure of 3 elements whose  
     241;   Send back, in the result variable, a structure of 3 elements whose 
    259242;   names are inspired by keywords we can pass at widget_control when 
    260243;   we use WIDGET_COMBOBOX: 
     
    273256;   pour WIDGET_DROPLIST Impose peut etre: 
    274257;       a) The contents of the list widget (string or string array) 
    275 ;       b) A structure which can have for elements (from 1 to 3):  
     258;       b) A structure which can have for elements (from 1 to 3): 
    276259;            DYNAMIC_RESIZE:Set this keyword to activate (if set to 1) 
    277260;            or deactivate (if set to 0) dynamic resizing of the 
     
    308291   IF (N_PARAMS() NE 1) THEN MESSAGE, 'Incorrect number of arguments' 
    309292   ON_ERROR, 2                  ;return to caller 
    310 ; cheking for row and column keywords 
    311    row = keyword_set(row)*(1-keyword_set(column))  
    312    column = keyword_set(column)*(1-keyword_set(row))+(keyword_set(column) EQ row)  
     293; checking for row and column keywords 
     294   row = keyword_set(row)*(1-keyword_set(column)) 
     295   column = keyword_set(column)*(1-keyword_set(row))+(keyword_set(column) EQ row) 
    313296   if NOT keyword_set(uvalue) then uvalue = '' 
    314297   if NOT keyword_set(uname) then uname = '' 
     
    318301                      , FUNC_GET_VALUE='cw_droplist_pm_get_value' $ 
    319302                      , PRO_SET_VALUE='cw_droplist_pm_set_value' $ 
    320                       , UVALUE = uvalue, UNAME = uname, _extra = ex)    
     303                      , UVALUE = uvalue, UNAME = uname, _extra = ex) 
    321304; 
    322305   if keyword_set(row) THEN nothing = widget_button(base,value= '-', uvalue= 'minus') 
  • trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slide_slice.pro

    r157 r226  
    55; @categories 
    66; Compound widget 
    7 ;  
     7; 
    88; @param ID 
    9 ; 
    109; 
    1110; @param VALUE 
     
    1312; 
    1413; @returns 
    15 ;  
    16 ;  
     14; 
    1715; @uses 
    18 ;  
    19 ;  
     16; 
    2017; @restrictions 
    21 ;  
    22 ;  
     18; 
    2319; @examples 
    24 ;  
    25 ;  
     20; 
    2621; @history 
    27 ;  
    28 ;  
    29 ; @version  
     22; 
     23; @version 
    3024; $Id$ 
    3125;- 
     
    4943      widget_control, sliderid, set_value = {slider_min:mini, slider_max:maxi, value:boxzoom[0]<maxi} 
    5044      thickness = boxzoom[1]-boxzoom[0] 
    51    ENDIF ELSE BEGIN  
     45   ENDIF ELSE BEGIN 
    5246      mini = floor(min([gphit, gphif], max = maxi)) 
    5347      maxi = ceil(maxi)-thickness 
     
    5751   thicknessval = thicknessuval.choix 
    5852   index = where(thicknessval EQ thickness) & index = index[0] 
    59    if index EQ -1 then BEGIN  
     53   if index EQ -1 then BEGIN 
    6054      index = 20 
    6155      thicknessval[20] = strtrim(thickness, 1) 
     
    7367; @categories 
    7468; Compound widget 
    75 ;  
     69; 
    7670; @param EVENT 
    7771; 
    78 ; 
    7972; @returns 
    80 ;  
    81 ;  
     73; 
    8274; @uses 
    83 ;  
    84 ;  
     75; 
    8576; @restrictions 
    86 ;  
    87 ;  
     77; 
    8878; @examples 
    89 ;  
    90 ;  
     79; 
    9180; @history 
    92 ;  
    93 ;  
    94 ; @version  
     81; 
     82; @version 
    9583; $Id$ 
    9684;- 
     
    117105         mini = floor(min([glamt, glamf], max = maxi)) 
    118106         maxi = ceil(maxi)-thickness 
    119       ENDIF ELSE BEGIN  
     107      ENDIF ELSE BEGIN 
    120108         mini = floor(min([gphit, gphif], max = maxi)) 
    121109         maxi = ceil(maxi)-thickness 
     
    136124; print, lon1, mini, maxi 
    137125;             widget_control, sliderid, set_value = {value:lon1, slider_min_max:[mini, maxi]} 
    138 ;          ENDIF ELSE BEGIN  
     126;          ENDIF ELSE BEGIN 
    139127;             mini = floor(min([gphit, glamf], max = maxi)) 
    140128;             maxi = ceil(maxi) 
     
    145133; print, 'ds if',firstxt, 0, jpi-1 
    146134;             widget_control, sliderid, set_value = {value:firstxt, slider_min_max:[0, jpi-1]} 
    147 ;          ENDIF ELSE BEGIN  
     135;          ENDIF ELSE BEGIN 
    148136;             widget_control, sliderid, set_value = {value:firstyt, slider_min_max:[0, jpj-1]} 
    149137;          ENDELSE 
     
    154142   if type EQ 'y' then begin 
    155143      boxzoom[0] = slider &  boxzoom[1] = slider+thickness 
    156    ENDIF ELSE BEGIN  
     144   ENDIF ELSE BEGIN 
    157145      boxzoom[2] = slider &  boxzoom[3] = slider+thickness 
    158    ENDELSE  
     146   ENDELSE 
    159147;    ENDIF ELSE BEGIN 
    160148;       if strpos(type,'y') NE -1 then begin 
    161149;          boxzoom[0] = glamt[slider, 0] &  boxzoom[1] = glamf[slider+thickness, 0] 
    162 ;       ENDIF ELSE BEGIN  
     150;       ENDIF ELSE BEGIN 
    163151;          boxzoom[2] = gphit[0, slider] &  boxzoom[3] = gphif[0, slider+thickness] 
    164 ;       ENDELSE  
     152;       ENDELSE 
    165153;    ENDELSE 
    166154   widget_control, domainid, set_value = boxzoom 
     
    179167; 
    180168; @keyword BOXZOOM 
    181 ; Vector indicating the geographic zone on which we want to cut the map.  
    182 ; If BOXZOOM has :  
     169; Vector indicating the geographic zone on which we want to cut the map. 
     170; If BOXZOOM has : 
    183171;   1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] 
    184172;   2 elements: The extraction is made on [lon1, lon2, lat1, lat2, boxzoom[0],boxzoom[1]] 
    185173;   4 elements: The extraction is made on [Boxzoom, 0, max([gdept, gdepw])] 
    186174;   5 elements: The extraction is made on [Boxzoom[0:3], 0, Boxzoom[4]] 
    187 ;   6 elements: The extraction is made on Boxzoom  
     175;   6 elements: The extraction is made on Boxzoom 
    188176; Where lon1, lon2,lat1,lat2 are global variables defined at the last domdef! 
    189177; 
     
    191179; Buttons will be arranged in the number of columns 
    192180; specified by this keyword. 
    193 ;  
     181; 
    194182; @keyword FRAME 
    195183; Specifies the width of the frame to be drawn around the base. 
    196 ;  
     184; 
    197185; @keyword ROW 
    198186; Buttons will be arranged in the number of rows 
    199187; specified by this keyword. 
    200 ;  
     188; 
    201189; @keyword UVALUE 
    202190; The user value to be associated with the widget. 
    203 ;  
     191; 
    204192; @keyword UNAME 
    205193; The user name to be associated with the widget. 
    206 ;  
     194; 
    207195; @keyword _EXTRA 
    208196; Used to pass your keywords 
    209 ;  
     197; 
    210198; @returns 
    211 ;  
    212 ;  
     199; 
    213200; @uses 
    214 ;  
    215 ;  
     201; 
    216202; @restrictions 
    217 ;  
    218 ;  
     203; 
    219204; @examples 
    220 ;  
    221 ;  
     205; 
    222206; @history 
    223 ;  
    224 ;  
    225 ; @version  
     207; 
     208; @version 
    226209; $Id$ 
    227 ;  
     210; 
    228211; @todo 
    229212; seb: documenter 
     
    236219@common 
    237220;------------------------------------------------ 
    238 ; cheking exclusive keywords 
     221; checking exclusive keywords 
    239222   column = keyword_set(column)*(1-keyword_set(row)) 
    240    row = keyword_set(row)*(1-keyword_set(column)) +(keyword_set(row) EQ column)  
     223   row = keyword_set(row)*(1-keyword_set(column)) +(keyword_set(row) EQ column) 
    241224   if NOT keyword_set(uvalue) then uvalue = '' 
    242225   if NOT keyword_set(uname) then uname = '' 
     
    247230                      , PRO_SET_VALUE='cw_slide_slice_set_value' $ 
    248231                      , ROW = row, COLUMN = column, UVALUE = uvalue, UNAME = uname $ 
    249                       , FRAME = frame, _extra = ex)    
     232                      , FRAME = frame, _extra = ex) 
    250233;------------------------------------------------ 
    251234   if NOT keyword_set(boxzoom) then boxzoom = [lon1, lon2, lat1, lat2] 
     
    264247                          , value = mini > boxzoom[0] < maxi, /column, uname = 'slider' $ 
    265248                          , uvalue = {name:'slider'}) 
    266    ENDIF ELSE BEGIN  
     249   ENDIF ELSE BEGIN 
    267250      mini = floor(min([gphit, gphif], max = maxi)) 
    268251      thickness = boxzoom[3]-boxzoom[2] 
     
    273256   ENDELSE 
    274257   index = where(thicknessval EQ thickness) & index = index[0] 
    275    if index EQ -1 then BEGIN  
     258   if index EQ -1 then BEGIN 
    276259      index = 20 
    277260      thicknessval[20] = strtrim(thickness, 1) 
     
    280263   endif 
    281264   widget_control, droplistid, set_value = {droplist_select:index} 
    282     
     265 
    283266;   if type EQ 'xt' then begin 
    284267;       mini = floor(min([glamt,glamf], max = maxi)) 
    285268;       maxi = ceil(maxi) 
    286 ;    ENDIF ELSE BEGIN  
     269;    ENDIF ELSE BEGIN 
    287270;       mini = floor(min([gphit,gphif], max = maxi)) 
    288271;       maxi = ceil(maxi) 
    289272;    ENDELSE 
    290     
     273  
    291274;------------------------------------------------ 
    292275   return, base 
  • trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slider_pm.pro

    r163 r226  
    66;    case uval of 
    77;       'done':widget_control, event.top, /destroy 
    8 ;       'slider_min':BEGIN  
     8;       'slider_min':BEGIN 
    99;          widget_control, event.id, get_value = value 
    1010;          widget_control, SliderBarId, set_value = {slider_min:value} 
    1111;       END 
    12 ;       'slider_max':BEGIN  
     12;       'slider_max':BEGIN 
    1313;          widget_control, event.id, get_value = value 
    1414;          widget_control, SliderBarId, set_value = {slider_max:value} 
    1515;       END 
    16 ;       'slider_value':BEGIN  
     16;       'slider_value':BEGIN 
    1717;          widget_control, event.id, get_value = value 
    1818;          widget_control, SliderBarId, set_value = value 
    1919;       END 
    20 ;       'get':BEGIN  
     20;       'get':BEGIN 
    2121;          widget_control, SliderBarId, get_value = value 
    2222;          help,  value, /struct 
     
    5757; 
    5858; @returns 
    59 ;  
    60 ;  
     59; 
    6160; @uses 
    62 ;  
    63 ;  
    64 ; @restrictions 
    65 ;  
    66 ;  
    67 ; @examples 
    68 ;  
    69 ;  
    70 ; @history 
    71 ;  
    72 ;  
    73 ; @version  
     61; 
     62; @restrictions 
     63; 
     64; @examples 
     65; 
     66; @history 
     67; 
     68; @version 
    7469; $Id$ 
    7570;- 
     
    9388; 
    9489; @returns 
    95 ;  
    96 ;  
     90; 
    9791; @uses 
    98 ;  
    99 ;  
    100 ; @restrictions 
    101 ;  
    102 ;  
    103 ; @examples 
    104 ;  
    105 ;  
    106 ; @history 
    107 ;  
    108 ;  
    109 ; @version  
     92; 
     93; @restrictions 
     94; 
     95; @examples 
     96; 
     97; @history 
     98; 
     99; @version 
    110100; $Id$ 
    111101;- 
     
    124114; @categories 
    125115; Compound widget 
    126 ;  
     116; 
    127117; @param ID 
    128 ; 
    129118; 
    130119; @param VALUE 
     
    132121; 
    133122; @returns 
    134 ;  
    135 ;  
     123; 
    136124; @uses 
    137 ;  
    138 ;  
    139 ; @restrictions 
    140 ;  
    141 ;  
    142 ; @examples 
    143 ;  
    144 ;  
    145 ; @history 
    146 ;  
    147 ;  
    148 ; @version  
     125; 
     126; @restrictions 
     127; 
     128; @examples 
     129; 
     130; @history 
     131; 
     132; @version 
    149133; $Id$ 
    150134;- 
     
    161145      case strtrim(strlowcase(tagnames[tag]), 2) of 
    162146        'slider_min':BEGIN 
    163 ;          IF float(value.slider_min[0]) LT minmax[1] THEN BEGIN  
     147;          IF float(value.slider_min[0]) LT minmax[1] THEN BEGIN 
    164148            minmax[0] = value.slider_min[0] 
    165149            widget_control, sbid, set_slider_min = floor(float(value.slider_min[0])) 
     
    169153              widget_control, dcid, set_value = decvalue(value.slider_min) 
    170154              widget_control, dcid, set_combobox_select = decind(value.slider_min) 
    171             ENDIF  
    172 ;          ENDIF  
     155            ENDIF 
     156;          ENDIF 
    173157        end 
    174158        'slider_max':BEGIN 
    175 ;          IF float(value.slider_max[0]) GT minmax[0] THEN BEGIN  
     159;          IF float(value.slider_max[0]) GT minmax[0] THEN BEGIN 
    176160            minmax[1] = value.slider_max[0] 
    177161            widget_control, sbid, set_slider_max = ceil(float(value.slider_max[0])) 
     
    181165              widget_control, dcid, set_value = decvalue(value.slider_max) 
    182166              widget_control, dcid, set_combobox_select = decind(value.slider_max) 
    183             ENDIF  
    184 ;          ENDIF  
     167            ENDIF 
     168;          ENDIF 
    185169        end 
    186170        'value':IF float(value.value[0]) GE minmax[0] $ 
     
    189173      endcase 
    190174    endfor 
    191   ENDIF ELSE BEGIN  
     175  ENDIF ELSE BEGIN 
    192176    IF float(value[0]) GE minmax[0] $ 
    193177      AND float(value[0]) LE minmax[1] THEN value2 = float(value[0]) 
    194178  ENDELSE 
    195   IF n_elements(value2) NE 0 THEN BEGIN  
     179  IF n_elements(value2) NE 0 THEN BEGIN 
    196180    widget_control, sbid, set_value = fix(value2) 
    197181    widget_control, dcid, set_value = decvalue(value2) 
    198182    widget_control, dcid, set_combobox_select = decind(value2) 
    199   ENDIF  
     183  ENDIF 
    200184  return 
    201185end 
     
    206190; 
    207191; @categories 
    208 ; Compound widget  
    209 ;  
     192; Compound widget 
     193; 
    210194; @param ID 
    211195; 
    212 ; 
    213 ; @returns 
    214 ;  
    215 ;  
     196; @returns 
     197; 
    216198; @uses 
    217 ;  
    218 ;  
    219 ; @restrictions 
    220 ;  
    221 ;  
    222 ; @examples 
    223 ;  
    224 ;  
    225 ; @history 
    226 ;  
    227 ;  
    228 ; @version  
     199; 
     200; @restrictions 
     201; 
     202; @examples 
     203; 
     204; @history 
     205; 
     206; @version 
    229207; $Id$ 
    230208;- 
     
    246224; @categories 
    247225; Compound widget 
    248 ;  
     226; 
    249227; @param EVENT 
    250 ;  
    251 ; 
    252 ; @returns 
    253 ;  
    254 ;  
     228; 
     229; @returns 
     230; 
    255231; @uses 
    256 ;  
    257 ;  
    258 ; @restrictions 
    259 ;  
    260 ;  
    261 ; @examples 
    262 ;  
    263 ;  
    264 ; @history 
    265 ;  
    266 ;  
    267 ; @version  
     232; 
     233; @restrictions 
     234; 
     235; @examples 
     236; 
     237; @history 
     238; 
     239; @version 
    268240; $Id$ 
    269241;- 
     
    284256    'minus':if (value - 1) GE minmax[0] then value2 = value - 1 ELSE out = -1 
    285257    'SliderBar':if (event.value + value - floor(value)) LE minmax[1] THEN value2 = event.value + value - floor(value) 
    286     'decimal':BEGIN  
     258    'decimal':BEGIN 
    287259      CASE 1 OF 
    288260        value GT minmax[1]: value2 = minmax[1] 
     
    313285; @categories 
    314286; Compound widget 
    315 ;  
     287; 
    316288; @param PARENT {in}{required} 
    317289; The widget ID of the parent widget. 
     
    319291; @keyword UVALUE 
    320292; The user value to be associated with the widget. 
    321 ;  
     293; 
    322294; @keyword UNAME 
    323295; The user name to be associated with the widget. 
    324 ;  
     296; 
    325297; @keyword VALUE 
    326298; 
    327 ; 
    328299; @keyword MAXIMUM 
    329 ;  
    330 ;  
     300; 
    331301; @keyword MINIMUM 
    332302; 
    333 ;  
     303; 
    334304; @keyword STRMINLEN 
    335305; 
     
    365335;  computationally expensive operations until the user releases the 
    366336;  slider. 
    367 ;  OUT:It is an integer which can take 3 values:  
     337;  OUT:It is an integer which can take 3 values: 
    368338;       1 : If we press + when the index is already at the max 
    369339;       Comment: In this case, the index stay at the max 
     
    378348;       1) GET_VALUE 
    379349;   widget_control,wid_id,get_value=resultat 
    380 ;   Send back in the result variable a structure of 2 elements whose name  
    381 ;   are inspired from keywords we can pass at  
     350;   Send back in the result variable a structure of 2 elements whose name 
     351;   are inspired from keywords we can pass at 
    382352;   widget_control when we use WIDGET_SLIDER: 
    383353;            VALUE:the value setting of the widget 
     
    386356;       2) SET_VALUE 
    387357;   widget_control,wid_id,set_value=impose 
    388 ;   Allows to modify the state of the combobox like we can do it for  
    389 ;   WIDGET_COMBOBOX. May impose:   
     358;   Allows to modify the state of the combobox like we can do it for 
     359;   WIDGET_COMBOBOX. May impose: 
    390360;       a) a integer: give the new position of the slider. 
    391 ;       b) A structure which can have for elements (from 1 to 3):  
     361;       b) A structure which can have for elements (from 1 to 3): 
    392362;            VALUE: an integer which give the new position of the slider 
    393363;            SLIDER_MIN:Set to a new minimum value for the specified 
     
    428398  if NOT keyword_set(title) then title = '    ' 
    429399; 
    430 ; cheking exclusive keywords 
     400; checking exclusive keywords 
    431401  column = (keyword_set(column)*(1-keyword_set(row))+keyword_set(vertical)) < 1 
    432   row = keyword_set(row)*(1-keyword_set(column)) +(keyword_set(row) EQ column)  
     402  row = keyword_set(row)*(1-keyword_set(column)) +(keyword_set(row) EQ column) 
    433403  if NOT keyword_set(uvalue) then uvalue = '' 
    434404  if NOT keyword_set(uname) then uname = '' 
     
    437407                     , FUNC_GET_VALUE = 'cw_slider_pm_get_value' $ 
    438408                     , PRO_SET_VALUE = 'cw_slider_pm_set_value' $ 
    439                      , space = 0, UVALUE = uvalue, UNAME = uname, _extra = ex)    
     409                     , space = 0, UVALUE = uvalue, UNAME = uname, _extra = ex) 
    440410; 
    441411  mlen = (widget_info(base, string_size = 'm'))[0] 
  • trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_specifie.pro

    r157 r226  
    66; @categories 
    77; Compound widget 
    8 ;  
     8; 
    99; @param ID 
    10 ; 
    1110; 
    1211; @param VALUE 
     
    1413; 
    1514; @returns 
    16 ;  
    17 ;  
    18 ; @uses 
    19 ;  
    20 ;  
    21 ; @restrictions 
    22 ;  
    23 ;  
    24 ; @examples 
    25 ;  
    26 ;  
    27 ; @history 
    28 ;  
    29 ;  
    30 ; @version  
    31 ; $Id$ 
    32 ;- 
    33 ;***************************************************** 
     15; 
     16; @uses 
     17; 
     18; @restrictions 
     19; 
     20; @examples 
     21; 
     22; @history 
     23; 
     24; @version 
     25; $Id$ 
     26;- 
    3427PRO cw_specifie_set_value, id, value 
    3528; 
     
    4336   widget_control, widget_info(id,find_by_uname='palnum'), set_value = strtrim(value.lct, 2) 
    4437   autres = extractstru(value, ['min', 'max', 'inter', 'lct', 'nothing', 'xindex', 'yindex']) 
    45    if size(autres, /type) EQ 8 then BEGIN  
     38   if size(autres, /type) EQ 8 then BEGIN 
    4639      autresid = widget_info(id,find_by_uname='autres') 
    4740      widget_control, widget_info(id, find_by_uname = 'autres'), get_value = autresautres 
     
    6457; @categories 
    6558; Compound widget 
    66 ;  
     59; 
    6760; @param ID 
    6861; 
    69 ; 
    70 ; @returns 
    71 ;  
    72 ;  
    73 ; @uses 
    74 ;  
    75 ;  
    76 ; @restrictions 
    77 ;  
    78 ;  
    79 ; @examples 
    80 ;  
    81 ;  
    82 ; @history 
    83 ;  
    84 ;  
    85 ; @version  
    86 ; $Id$ 
    87 ;- 
    88 ;***************************************************** 
     62; @returns 
     63; 
     64; @uses 
     65; 
     66; @restrictions 
     67; 
     68; @examples 
     69; 
     70; @history 
     71; 
     72; @version 
     73; $Id$ 
     74;- 
    8975FUNCTION cw_specifie_get_value, id 
    9076; 
     
    118104; @categories 
    119105; Compound widget 
    120 ;  
     106; 
    121107; @param EVENT 
    122108; 
    123 ; 
    124 ; @returns 
    125 ;  
    126 ;  
    127 ; @uses 
    128 ;  
    129 ;  
    130 ; @restrictions 
    131 ;  
    132 ;  
    133 ; @examples 
    134 ;  
    135 ;  
    136 ; @history 
    137 ;  
    138 ;  
    139 ; @version  
    140 ; $Id$ 
    141 ;- 
    142 ;***************************************************** 
     109; @returns 
     110; 
     111; @uses 
     112; 
     113; @restrictions 
     114; 
     115; @examples 
     116; 
     117; @history 
     118; 
     119; @version 
     120; $Id$ 
     121;- 
    143122FUNCTION cw_specifie_event, event 
    144123;------------------------------------------------------------ 
    145 ; on recuper les ID des differents widgets  
     124; on recupere les ID des differents widgets 
    146125;------------------------------------------------------------ 
    147126;------------------------------------------------------------ 
     
    157136;------------------------------------------------------------ 
    158137  case uval of 
    159     'default':BEGIN  
     138    'default':BEGIN 
    160139;--------------- 
    161 ; We find the name of the variable:  
     140; We find the name of the variable: 
    162141      vlstid = widget_info(event.top, find_by_uname = 'varlist') 
    163142      fieldname = widget_info(vlstid, /combobox_gettext) 
     
    170149      widget_control, widget_info(event.handler, find_by_uname = 'autres'), set_value = '' 
    171150    END 
    172     'palcol':BEGIN  
     151    'palcol':BEGIN 
    173152      ind = fix(strmid(event.value, 0, strpos(event.value, '-'))) 
    174153      widget_control, widget_info(event.handler, find_by_uname = 'palnum'), set_value = strtrim(ind, 1) 
     
    186165; @categories 
    187166; Compound widget 
    188 ;  
     167; 
    189168; @param PARENT {in}{required} 
    190169; The widget ID of the parent widget. 
     
    193172; Buttons will be arranged in the number of columns 
    194173; specified by this keyword. 
    195 ;  
     174; 
    196175; @keyword ROW 
    197176; Buttons will be arranged in the number of rows 
    198177; specified by this keyword. 
    199 ;  
     178; 
    200179; @keyword UVALUE 
    201180; The user value to be associated with the widget. 
    202 ;  
     181; 
    203182; @keyword UNAME 
    204183; The user name to be associated with the widget. 
     
    206185; @keyword FRAME 
    207186; 
    208 ; 
    209187; @keyword FORXXX 
    210188; 
    211 ;  
    212189; @keyword _EXTRA 
    213190; Used to pass your keywords 
    214191; 
    215 ;  
    216 ; @returns 
    217 ;  
    218 ;  
    219 ; @uses 
    220 ;  
    221 ;  
    222 ; @restrictions 
    223 ;  
    224 ;  
    225 ; @examples 
    226 ;  
    227 ;  
    228 ; @history 
    229 ;  
    230 ;  
    231 ; @version  
    232 ; $ID$ 
     192; @returns 
     193; 
     194; @uses 
     195; 
     196; @restrictions 
     197; 
     198; @examples 
     199; 
     200; @history 
     201; 
     202; @version 
     203; $Id$ 
    233204; 
    234205; @todo 
    235206; seb: documenter 
    236 ;  
     207; 
    237208;- 
    238209FUNCTION cw_specifie, parent, ROW = row, COLUMN = column, UVALUE = uvalue, UNAME = uname, FRAME = frame, FORXXX = forxxx, _extra = ex 
    239 ; cheking exclusive keywords 
     210; checking exclusive keywords 
    240211; 
    241212  compile_opt idl2, strictarrsubs 
    242213; 
    243214   column = keyword_set(column)*(1-keyword_set(row)) 
    244    row = keyword_set(row)*(1-keyword_set(column)) +(keyword_set(row) EQ column)  
     215   row = keyword_set(row)*(1-keyword_set(column)) +(keyword_set(row) EQ column) 
    245216;------------------------------------------------ 
    246217   if NOT keyword_set(uvalue) then uvalue = '' 
     
    250221                      , FUNC_GET_VALUE='cw_specifie_get_value' $ 
    251222                      , PRO_SET_VALUE='cw_specifie_set_value' $ 
    252                       , UVALUE = uvalue, UNAME = uname, _extra = ex)    
    253 ; base1  
     223                      , UVALUE = uvalue, UNAME = uname, _extra = ex) 
     224; base1 
    254225   base1 = widget_base(base) 
    255226   rien = widget_label(base1, value = 'Min', xoffset =  85, yoffset = 15) 
     
    277248 
    278249 
    279 ; widget text containig other keywords pass into top_uvalue.exextra 
     250; widget text containing other keywords pass into top_uvalue.exextra 
    280251; Does it remain some? If yes, we have to put them as string 
    281     
     252 
    282253   rien = widget_text(base, value = '  ', /editable, uname = 'autres', uvalue = 'autres', xsize = 54, ysize = 3, yoffset = 65, /wrap, /no_newline) 
    283254 
  • trunk/SRC/ToBeReviewed/WIDGET/xnotice.pro

    r163 r226  
    99; @categories 
    1010; Information 
    11 ;  
     11; 
    1212; @param TEXT {in}{required}{type=string vector or scalar} 
    13 ; it is a string or a vector of string. If it is a scalar, we  
     13; it is a string or a vector of string. If it is a scalar, we 
    1414; look for the line separator !C to create a text with several lines. 
    1515; 
    1616; @keyword CHKWIDGET 
    17 ; Force to verify that they are some active widget to create a widget,  
     17; Force to verify that they are some active widget to create a widget, 
    1818; otherwise print at the prompt 
    1919; 
     
    2121; The identity of the created widget 
    2222; 
    23 ; @restrictions  
    24 ; It do not call xmanager -> It do not create any event!  
    25 ; We have to delete this widget manuelly: 
     23; @restrictions 
     24; It do not call xmanager -> It do not create any event! 
     25; We have to delete this widget manually: 
    2626; widget_control, widgetid, /destroy 
    2727; 
  • trunk/SRC/ToBeReviewed/WIDGET/xxx.pro

    r192 r226  
    55; @categories 
    66; 
    7 ;  
    87; @param EVENT 
    98; 
    109; 
    1110; @returns 
    12 ;  
    13 ;  
     11; 
    1412; @uses 
    15 ;  
    16 ;  
     13; 
    1714; @restrictions 
    18 ;  
    19 ;  
     15; 
    2016; @examples 
    21 ;  
    22 ;  
     17; 
    2318; @history 
    24 ;  
    25 ;  
    26 ; @version  
     19; 
     20; @version 
    2721; $Id$ 
    2822;- 
     
    3529;------------------------------------------------------------ 
    3630;    = widget_info(event.top,find_by_uname = '') 
    37 ; What is the type of evenment ? 
     31; What is the type of event ? 
    3832;   if event.id EQ 622 then help,  event,  /struct 
    3933   widget_control, event.id, get_uvalue=uval 
     
    4236;help,  event, /struct 
    4337;help, uval , /struct 
    44 ; case on the type of evenment 
     38; case on the type of event 
    4539   widget_control, event.top, get_uvalue = top_uvalue 
    4640; If we activate the keyword separate at the call of xxx 
     
    122116; @categories 
    123117; Widget 
    124 ;  
     118; 
    125119; @param DATAFILENAME 
    126120; 
     
    134128; @keyword SEPARATE 
    135129; To separate the button part and the drawing part in 2 windows. 
    136 ; Useful for small screens, but be careful to do not saturate the  
     130; Useful for small screens, but be careful to do not saturate the 
    137131; video memory of some antiquated Tx. 
    138132; 
    139133; @keyword RESTORE 
    140 ; 'toto.dat' or toto.dat is a file created at the time of a precedent  
     134; 'toto.dat' or toto.dat is a file created at the time of a precedent 
    141135; use of xxx thanks to the command "Widget" of the menu "save as". 
    142 ;  
     136; 
    143137; @keyword _EXTRA 
    144138; Used to pass your keywords 
     
    148142; 
    149143; @keyword REDRAW 
    150 ;  
     144; 
    151145; 
    152146; @keyword SEPARATE 
    153147; 
    154148; 
    155 ; @keyword UVALUE  
     149; @keyword UVALUE 
    156150; The user value to be associated with the widget. 
    157151; 
     
    191185  if keyword_set(restore) then BEGIN 
    192186    restore = isafile(filename = restore, iodir = homedir, _extra = ex) 
    193     if size(restore, /type) NE 7 then restore = 0 ELSE BEGIN  
     187    if size(restore, /type) NE 7 then restore = 0 ELSE BEGIN 
    194188      restore, isafile(file = restore, iodir = homedir, _extra = ex) 
    195189      newgrid = *(extractatt(uvalue, 'meshparameters'))[0] 
    196190      change = changegrid(newgrid) 
    197     ENDELSE  
     191    ENDELSE 
    198192  endif 
    199193  if n_elements(CallerWidId) NE 0 THEN $ 
     
    203197; list of files we want to look at 
    204198; 
    205   if keyword_set(uvalue) then BEGIN  
     199  if keyword_set(uvalue) then BEGIN 
    206200    currentfile = extractatt(uvalue, 'currentfile') 
    207201    filelist = extractatt(uvalue, 'filelist') 
     
    222216  ENDELSE 
    223217; 
    224   if keyword_set(uvalue) THEN BEGIN  
     218  if keyword_set(uvalue) THEN BEGIN 
    225219    smallin = extractatt(uvalue, 'smallin') 
    226220    smallout = extractatt(uvalue, 'smallout') 
    227   ENDIF ELSE BEGIN  
     221  ENDIF ELSE BEGIN 
    228222    smallin = [1, 1, 1] 
    229223    smallout = [1, 1, 1] 
    230   ENDELSE  
     224  ENDELSE 
    231225  nbredessin = smallin[0]*smallin[1] 
    232226  numdessinin = smallin[2]-1 
    233227; warning flg definition must be consistent with cw_pdmenu argument 
    234228; see also flag definition in cw_pagelayout 
    235   if keyword_set(uvalue) then BEGIN  
     229  if keyword_set(uvalue) then BEGIN 
    236230    flag = extractatt(uvalue, 'optionsflag') 
    237231    key_portrait = flag[0, numdessinin] 
     
    252246; The top base 
    253247;------------------------------------------------------------ 
    254   IF xxxsize[0] LE scrsize[0] AND xxxsize[1] LE scrsize[1] THEN BEGIN  
     248  IF xxxsize[0] LE scrsize[0] AND xxxsize[1] LE scrsize[1] THEN BEGIN 
    255249    base = widget_base(title = 'xxx', GROUP_LEADER = group, /tracking_events $ 
    256250                       , uname = 'base', space = 0) 
    257   ENDIF ELSE BEGIN  
     251  ENDIF ELSE BEGIN 
    258252    base = widget_base(title = 'xxx', GROUP_LEADER = group, /tracking_events $ 
    259253                       , uname = 'base', space = 0 $ 
     
    278272    selectact = (extractatt(uvalue, 'types'))[numdessinin] 
    279273    selectact = (where(pltlst EQ selectact))[0] 
    280     widget_control, actid, set_combobox_select = 0 > selectact  
     274    widget_control, actid, set_combobox_select = 0 > selectact 
    281275  ENDIF ELSE selectfile = 0 
    282276 
     
    316310  yoff = yoff + 37 
    317311  xoff = 5 
    318 ; boutton 'OK' 
     312; button 'OK' 
    319313  baseok = widget_button(base, value = ' OK ', uvalue = {name:'ok'}, uname = 'ok button' $ 
    320314                         , /frame, xoffset = xoff, yoffset = yoff) 
     
    337331    selectvar = (extractatt(uvalue, 'varinfo'))[1, numdessinin] 
    338332    selectvar = (where(currentlistvar EQ selectvar))[0] 
    339     widget_control, vlstid, set_combobox_select = 0 > selectvar  
     333    widget_control, vlstid, set_combobox_select = 0 > selectvar 
    340334  ENDIF ELSE selectvar = 0 
    341335;------------------------------------------------------------ 
     
    348342    selectfile = (extractatt(uvalue, 'varinfo'))[0, numdessinin] 
    349343    selectfile = (where(file_basename(filelist) EQ selectfile))[0] 
    350     widget_control, flstid, set_combobox_select = 0 > selectfile  
     344    widget_control, flstid, set_combobox_select = 0 > selectfile 
    351345  ENDIF ELSE selectfile = 0 
    352346;------------------------------------------------------------ 
     
    375369  dummyid = cw_calendar(basecalid, currentcalendar, date2, FAKECAL = fakecal, uname = 'calendar2', uvalue = {name:'calendar2'}, /frame) 
    376370;------------------------------------------------------------ 
    377 ; Domain  
     371; Domain 
    378372;------------------------------------------------------------ 
    379373  yoff = yoff + 60 
     
    399393     basegraph = widget_base(title = 'xxx window',  group_leader = base, uvalue = base) $ 
    400394  ELSE basegraph = base 
    401    
     395 
    402396  graphid = widget_draw(basegraph, uname = 'graph', /button_events, retain = 2 $ 
    403397                        , uvalue = {name:'graph', press:0, click:0, x:[0., 0.], y:[0., 0.]} $ 
     
    416410  if keyword_set(uvalue) then BEGIN ; 
    417411; We recopy the pointer uvalue in top_uvalue. 
    418 ; Beware, we have to redefine completely top_value from variables  
    419 ; pointed by uvalue. Otherwise, if we simply do top_value = uvalue,  
    420 ; when we delete by uvalue and variables on which it point, we  
     412; Beware, we have to redefine completely top_value from variables 
     413; pointed by uvalue. Otherwise, if we simply do top_value = uvalue, 
     414; when we delete by uvalue and variables on which it point, we 
    421415; also delete variables on which point top_value. 
    422416    case 1 of 
     
    443437; widgets's state 
    444438        updatewidget, base 
    445 ;  
     439; 
    446440      END 
    447441      ELSE:BEGIN 
     
    450444        FOR i =  0, 14 do *top_uvalue[1, i] = *uvalue[1, i] 
    451445        FOR i = 18, 27 do *top_uvalue[1, i] = *uvalue[1, i] 
    452         numfile = n_elements(extractatt(uvalue, 'filelist'))  
     446        numfile = n_elements(extractatt(uvalue, 'filelist')) 
    453447        *top_uvalue[1, 15] = ptrarr(numfile, /allocate_heap) 
    454448        *top_uvalue[1, 16] = ptrarr(numfile, /allocate_heap) 
    455449        *top_uvalue[1, 17] = ptrarr(numfile, /allocate_heap) 
    456450        for i = 0, numfile-1 do begin 
    457           *(*top_uvalue[1, 15])[i] = *(*uvalue[1, 15])[i]  
    458           *(*top_uvalue[1, 16])[i] = *(*uvalue[1, 16])[i]  
    459           *(*top_uvalue[1, 17])[i] = *(*uvalue[1, 17])[i]  
     451          *(*top_uvalue[1, 15])[i] = *(*uvalue[1, 15])[i] 
     452          *(*top_uvalue[1, 16])[i] = *(*uvalue[1, 16])[i] 
     453          *(*top_uvalue[1, 17])[i] = *(*uvalue[1, 17])[i] 
    460454        endfor 
    461455        *top_uvalue[1, 28] = ptrarr(nbredessin, /allocate_heap) 
    462         for i = 0, nbredessin-1 do *(*top_uvalue[1, 28])[i] = *(*uvalue[1, 28])[i]  
     456        for i = 0, nbredessin-1 do *(*top_uvalue[1, 28])[i] = *(*uvalue[1, 28])[i] 
    463457        widget_control, base, set_uvalue = top_uvalue 
    464458; Copy the screen of the widget of uvalue in top_value's one 
     
    478472; 
    479473ENDIF ELSE BEGIN 
    480 ; Otherwise we will define all elements we will hook at the widget  
    481 ; thanks to the top_value which is a pointer array with 2  
    482 ; columns: names and variables.  
     474; Otherwise we will define all elements we will hook at the widget 
     475; thanks to the top_value which is a pointer array with 2 
     476; columns: names and variables. 
    483477; We initialize all these elements. 
    484478; Variables concerning the widget in its generality. 
     
    486480; variables se rapportant aux differents fichiers que l''on peut lire 
    487481; variables specifiques a chaque dessin 
    488 ;       
    489      
     482; 
     483 
    490484; creation of the pointer we will hook at the widget. 
    491485    top_uvalue = ptrarr(2, 29, /allocate_heap) 
     
    516510    *top_uvalue[0, 21] = 'nameprocedures' & *top_uvalue[1, 21] = strarr(nbredessin) 
    517511    *top_uvalue[0, 22] = 'types' & *top_uvalue[1, 22] = strarr(nbredessin) 
    518     *top_uvalue[0, 23] = 'varinfo' & *top_uvalue[1, 23] = strarr(2, nbredessin)     
     512    *top_uvalue[0, 23] = 'varinfo' & *top_uvalue[1, 23] = strarr(2, nbredessin) 
    519513    *top_uvalue[0, 24] = 'domaines' & *top_uvalue[1, 24] = fltarr(6, nbredessin) 
    520514    *top_uvalue[0, 25] = 'dates' & *top_uvalue[1, 25] = lonarr(2, nbredessin) 
     
    526520    createhistory, base, smallin 
    527521; 
    528   ENDELSE  
    529 ;------------------------------------------------------------ 
    530   xmanager, 'xxx', base, /no_block  
     522  ENDELSE 
     523;------------------------------------------------------------ 
     524  xmanager, 'xxx', base, /no_block 
    531525;------------------------------------------------------------ 
    532526;------------------------------------------------------------ 
Note: See TracChangeset for help on using the changeset viewer.