Ignore:
Timestamp:
05/11/06 12:35:53 (18 years ago)
Author:
smasson
Message:

debug + new xxx

File:
1 moved

Legend:

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

    r68 r69  
    11;********************************************************************* 
    22;********************************************************************* 
    3 FUNCTION cw_miseenpage_event, event 
     3FUNCTION cw_pagelayout_event, event 
    44 
    55   widget_control, event.id, get_uvalue=uval 
     
    4646      createhistory, event.top, smallin 
    4747;          
    48          options = extractatt(top_uvalue, 'options')    
    49          flags = extractatt(top_uvalue, 'optionsflag') 
    50          xlonindex = where(options EQ 'Longitude / x index') 
    51          xlonflag = flags[xlonindex, numdessinin] & xlonflag = xlonflag[0] 
    52          ylatindex = where(options EQ 'Latitude / y index') 
    53          ylatflag = flags[ylatindex, numdessinin] & ylatflag = ylatflag[0] 
     48      options = extractatt(top_uvalue, 'options')    
     49      flags = extractatt(top_uvalue, 'optionsflag') 
     50      flag = flags[*, numdessinin] 
    5451;          
    55       flag = [1, key_portrait, 0, 0, 0, 0] 
    56       flag[xlonindex] = xlonflag 
    57       flag[ylatindex] = ylatflag 
    58 ;          
    59 ; actualisation de la top_uvalue... 
     52; update and reset all values of the top_uvalue... 
    6053; 
    6154      *top_uvalue[1, findline(top_uvalue, 'smallin')] = smallin 
     
    6659      *top_uvalue[1, findline(top_uvalue, 'yenvs')] = replicate(!y, nbredessin) 
    6760; 
    68       old = (extractatt(top_uvalue, 'nameprocedures'))[numdessinin] 
    69       new = strarr(nbredessin) 
    70       new[0] = old 
    71       *top_uvalue[1, findline(top_uvalue, 'nameprocedures')] = new 
    72 ; 
    73       old = (extractatt(top_uvalue, 'types'))[numdessinin] 
    74       new = strarr(nbredessin) 
    75       new[0] = old 
    76       *top_uvalue[1, findline(top_uvalue, 'types')] = new 
    77 ; 
    78       old = (extractatt(top_uvalue,  'champs'))[*, numdessinin] 
    79       new = strarr(2, nbredessin) 
    80       new[*, 0] = old 
    81       *top_uvalue[1, findline(top_uvalue, 'champs')] = new 
    82 ; 
    83       old = (extractatt(top_uvalue, 'domaines'))[*, numdessinin] 
    84       new = fltarr(6, nbredessin) 
    85       new[*, 0] = old 
    86       *top_uvalue[1, findline(top_uvalue, 'domaines')] = new 
    87 ; 
    88       old = (extractatt(top_uvalue, 'dates'))[*, numdessinin] 
    89       new = lonarr(2, nbredessin) 
    90       new[*, 0] = old 
    91       *top_uvalue[1, findline(top_uvalue, 'dates')] = new 
    92 ; 
    93       old = (extractatt(top_uvalue,  'prefixes'))[numdessinin] 
    94       new = strarr(nbredessin) 
    95       new[0] = old 
    96       *top_uvalue[1, findline(top_uvalue, 'prefixes')] = new 
    97 ; 
    98       new = flag#replicate(1, nbredessin) 
    99       *top_uvalue[1, findline(top_uvalue, 'optionsflag')] = new 
     61      *top_uvalue[1, findline(top_uvalue, 'nameprocedures')] = strarr(nbredessin) 
     62      *top_uvalue[1, findline(top_uvalue, 'types')] = strarr(nbredessin) 
     63      *top_uvalue[1, findline(top_uvalue, 'varinfo')] = strarr(2, nbredessin) 
     64      *top_uvalue[1, findline(top_uvalue, 'domaines')] = fltarr(6, nbredessin) 
     65      *top_uvalue[1, findline(top_uvalue, 'dates')] = lonarr(2, nbredessin) 
     66      *top_uvalue[1, findline(top_uvalue, 'txtcmd')] = strarr(nbredessin) 
     67      *top_uvalue[1, findline(top_uvalue, 'optionsflag')] = flag#replicate(1, nbredessin) 
    10068; 
    10169      ptr_free, extractatt(top_uvalue, 'exextra') 
     
    10876end 
    10977;********************************************************************* 
    110 FUNCTION cw_miseenpage, parent, small, UVALUE = uvalue, UNAME = uname, ROW = row, COLUMN = column, UNZOOM = unzoom, _extra = ex 
    111 ; cheking exclusive keywords 
    112    column = keyword_set(column)*(1-keyword_set(row)) 
    113    row = keyword_set(row)*(1-keyword_set(column)) +(keyword_set(row) EQ column) 
     78FUNCTION cw_pagelayout, parent, small, UVALUE = uvalue, UNAME = uname, UNZOOM = unzoom, COLUMN = column, ROW = row, _extra = ex 
    11479;------------------------------------------------ 
    115    if NOT keyword_set(uvalue) then uvalue = '' 
    116    if NOT keyword_set(uname) then uname = '' 
    117    base = widget_base(parent, ROW = row, COLUMN = column  $ 
    118                       , EVENT_FUNC = 'cw_miseenpage_event' $ 
    119                       , FUNC_GET_VALUE='cw_miseenpage_get_value' $ 
    120                       , PRO_SET_VALUE='cw_miseenpage_set_value' $ 
    121                       , UVALUE = uvalue, UNAME = uname, _extra = ex)    
     80  row = keyword_set(row)*(1-keyword_set(column))   
     81  if NOT keyword_set(uvalue) then uvalue = '' 
     82  if NOT keyword_set(uname) then uname = '' 
     83  base = widget_base(parent $ 
     84                     , EVENT_FUNC = 'cw_pagelayout_event' $ 
     85                     , FUNC_GET_VALUE = 'cw_pagelayout_get_value' $ 
     86                     , PRO_SET_VALUE = 'cw_pagelayout_set_value' $ 
     87                     , UVALUE = uvalue, UNAME = uname, space = 0, _extra = ex)    
    12288;------------------------------------------------ 
    123    IF n_elements(small) eq 0 then small = [1, 1, 1] 
    124    basedroplist = widget_base(base, /column, /align_center) 
    125    id=widget_droplist(basedroplist, value=strtrim(indgen(10)+1, 1), title ='column' $ 
    126                         , uvalue ={name:'column'}, uname='column') 
    127    widget_control, id, set_droplist_select = small[0]-1 
    128    id=widget_droplist(basedroplist, value=strtrim(indgen(10)+1, 1), title =' row ' $ 
    129                         , uvalue ={name:'row'}, uname='row') 
    130    widget_control, id, set_droplist_select = small[1]-1 
    131    basebutton = widget_base(base, /column, /align_center) 
    132    rien = widget_button(basebutton, value = 'Clear', uvalue ={name:'clear'}, uname='clear') 
    133    rien = widget_button(basebutton, value = 'Undo', uvalue ={name:'undo'}, uname='undo') 
     89  IF n_elements(small) eq 0 then small = [1, 1, 1] 
     90; 
     91  dummy = widget_label(base, value = 'cln', yoffset = 3) 
     92  id = widget_combobox(base, value = strtrim(indgen(9)+1, 1), uvalue = {name:'column'} $ 
     93                       , uname = 'column', xoffset = 20, xsize = 40) 
     94  widget_control, id, set_combobox_select = small[0]-1 
     95; 
     96  IF keyword_set(row) THEN BEGIN  
     97    xoff = 60 
     98    yoff = 0 
     99  ENDIF ELSE BEGIN  
     100    xoff = 0 
     101    yoff = 20 
     102  ENDELSE  
     103  dummy = widget_label(base, value = 'row', xoffset = xoff, yoffset = yoff+3) 
     104  id = widget_combobox(base, value = strtrim(indgen(9)+1, 1), uvalue = {name:'row'} $ 
     105                       , uname = 'row', xoffset = xoff+20, xsize = 40, yoffset = yoff) 
     106  widget_control, id, set_combobox_select = small[1]-1 
    134107;------------------------------------------------ 
    135108;------------------------------------------------ 
    136    return, base 
     109  return, base 
    137110end 
    138111;********************************************************************* 
Note: See TracChangeset for help on using the changeset viewer.