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/COMPOUND_WIDGET
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • 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 
Note: See TracChangeset for help on using the changeset viewer.