Ignore:
Timestamp:
08/09/06 12:12:54 (18 years ago)
Author:
navarro
Message:

english and nicer header (3a)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/ToBeReviewed/WIDGET/xxx.pro

    r134 r150  
    1 ;------------------------------------------------------------ 
    2 ;------------------------------------------------------------ 
    3 ;------------------------------------------------------------ 
    4 ;+ 
    5 ; NAME:xxx 
    6 ; 
    7 ; PURPOSE:un maximum de possibilites avec un minimum de clics 
    8 ; 
    9 ; CATEGORY:super widget 
    10 ; 
    11 ; CALLING SEQUENCE:xxx 
    12 ;  
    13 ; INPUTS:none 
    14 ; 
    15 ; KEYWORD PARAMETERS: 
    16 ; 
    17 ;      /SEPARATE: pour separer la partie boutons de la partie dessin 
    18 ;      en 2 fenetres. Utile pour les petits ecrans, mais attention 
    19 ;      peut saturer la memoire video de certains Tx un peu vetustes. 
    20 ; 
    21 ;      RESTORE='toto.dat' ou toto.dat est un fichier cree lors d''une 
    22 ;      precedente utilisation de xxx grace a la commande "Widget" du 
    23 ;      menu "save as". 
    24 ; 
    25 ; OUTPUTS: 
    26 ; 
    27 ; COMMON BLOCKS:common.pro 
    28 ; 
    29 ; SIDE EFFECTS: 
    30 ; 
    31 ; RESTRICTIONS: 
    32 ; 
    33 ; EXAMPLE: 
    34 ; 
    35 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) 
    36 ; 
    37 ;- 
    38 ;------------------------------------------------------------ 
    39 ;------------------------------------------------------------ 
    40 ;------------------------------------------------------------ 
    411 
    422PRO xxx_event, event 
     
    488;------------------------------------------------------------ 
    499;    = widget_info(event.top,find_by_uname = '') 
    50 ; quel est le type d''evenement? 
     10; What is the type of evenment ? 
    5111;   if event.id EQ 622 then help,  event,  /struct 
    5212   widget_control, event.id, get_uvalue=uval 
     
    5515;help,  event, /struct 
    5616;help, uval , /struct 
    57 ; case sur le type d''evenement 
     17; case on the type of evenment 
    5818   widget_control, event.top, get_uvalue = top_uvalue 
    59 ; si on a active le mot cles separate a l''appelle de xxx 
     19; If we activate the keyword separate at the call of xxx 
    6020   if size(top_uvalue, /type) EQ 3 then begin 
    6121      event.top = top_uvalue 
    6222      widget_control, event.top, get_uvalue = top_uvalue 
    6323   endif 
    64 ; on tue le petit widget cree par notice.pro si il existe 
     24; we delete the small widget created by notice.pro if it exists 
    6525   noticebase = extractatt(top_uvalue, 'noticebase') 
    6626   if noticebase NE 0 then BEGIN 
     
    12888;------------------------------------------------------------ 
    12989;------------------------------------------------------------ 
     90;+ 
     91; 
     92; @file_comments 
     93; A maximum of possibilities with a minimum of clics 
     94; 
     95; @categories 
     96; widget 
     97;  
     98; @param DATAFILENAME 
     99; 
     100; 
     101; @param IDLFILE 
     102; 
     103; 
     104; @param ARGSPRO 
     105; 
     106; 
     107; @keyword SEPARATE 
     108; To separate the button part and the drawing part in 2 windows. 
     109; Useful for small screens, but be careful to do not saturate the  
     110; video memory of some antiquated Tx. 
     111; 
     112; @keyword RESTORE 
     113; 'toto.dat' or toto.dat is a file created at the time of a precedent  
     114; use of xxx thanks to the command "Widget" of the menu "save as". 
     115;  
     116; @keyword _EXTRA 
     117; Used to pass your keywords 
     118; 
     119; @uses 
     120; common.pro 
     121; 
     122; @history 
     123; Sebastien Masson (smasson@lodyc.jussieu.fr) 
     124; 
     125; @version 
     126; $Id$ 
     127; 
     128; @todo 
     129; seb: documenter le reste des keywords 
     130; 
     131;- 
     132;------------------------------------------------------------ 
     133;------------------------------------------------------------ 
     134;------------------------------------------------------------ 
     135;------------------------------------------------------------ 
     136;------------------------------------------------------------ 
     137;------------------------------------------------------------ 
    130138PRO xxx, datafilename, idlfile, argspro, CALLERWIDID = CallerWidId $ 
    131139         , REDRAW = redraw, SEPARATE = separate, UVALUE = uvalue $ 
     
    154162;------------------------------------------------------------ 
    155163;------------------------------------------------------------ 
    156 ; liste des fichiers que l''on veut regarder 
     164; list of files we want to look at 
    157165; 
    158166  if keyword_set(uvalue) then BEGIN  
     
    368376;------------------------------------------------------------ 
    369377  if keyword_set(uvalue) then BEGIN ; 
    370 ; on recopie le pointeur uvalue dans top_uvalue. 
    371 ; Attention, il faut completement redefinir top_uvalue a partir des 
    372 ; variables pointees par uvalue. Sinon si on fait simplement 
    373 ; top_uvalue = uvalue, qd on detruit par uvalue et les variables 
    374 ; surlesquelles il pointe on detruit aussi les variables sur 
    375 ; lesquelles pointent top_uvalue. 
     378; We recopy the pointer uvalue in top_uvalue. 
     379; Beware, we have to redefine completely top_value from variables  
     380; pointed by uvalue. Otherwise, if we simply do top_value = uvalue,  
     381; when we delete by uvalue and variables on which it point, we  
     382; also delete variables on which point top_value. 
    376383    case 1 of 
    377384      keyword_set(redraw):BEGIN 
     
    380387; we find homedir 
    381388        homedir = isadirectory(io = homedir, title = 'Bad definition of homedir') 
    382 ; on recupere la liste des instructions 
     389; We recuperae the list of instructions 
    383390        globalcommand = extractatt(top_uvalue, 'globalcommand') 
    384 ; on complete par le premiere et les dernieres lignes du programme 
     391; We complete by first and last lines of the program 
    385392        createpro, globalcommand, filename = myuniquetmpdir + 'xxx2ps.pro' $ 
    386393                   , KWDLIST = ', NOERASE = noerase, POSTSCRIPT = postscript' $ 
     
    395402        wset, win 
    396403        tv, image, /true 
    397 ; etat des widgets 
     404; widgets's state 
    398405        updatewidget, base 
    399 ; menage 
     406;  
    400407      END 
    401408      ELSE:BEGIN 
     
    416423        for i = 0, nbredessin-1 do *(*top_uvalue[1, 28])[i] = *(*uvalue[1, 28])[i]  
    417424        widget_control, base, set_uvalue = top_uvalue 
    418 ; copie l''ecran du widget de uvalue dans celui de top_uvalue 
     425; Copy the screen of the widget of uvalue in top_value's one 
    419426        if keyword_set(CallerWidId)  then begin 
    420427          widget_control, extractatt(uvalue, 'graphid'), get_value = win 
     
    431438    *top_uvalue[1, findline(top_uvalue, 'graphid')] = graphid 
    432439; 
    433   ENDIF ELSE BEGIN 
    434 ; sinon on va definit tous les elements que l''on acroche au widget 
    435 ; grace a la top_uvalue qui est un tableau de pointeurs a 2 colonnes: 
    436 ; les noms et des variables 
    437 ; on initialie tous ces elements. 
    438 ; variables concernant le widget ds sa generalite 
     440ENDIF ELSE BEGIN 
     441; Otherwise we will define all elements we will hook at the widget  
     442; thanks to the top_value which is a pointer array with 2  
     443; columns: names and variables.  
     444; We initialize all these elements. 
     445; Variables concerning the widget in its generality. 
    439446    if NOT keyword_set(ex)  then ex = {nothing:0} 
    440447; variables se rapportant aux differents fichiers que l''on peut lire 
     
    442449;       
    443450     
    444 ; creation du pointeur que l''on va attache au widget. 
     451; creation of the pointer we will hook at the widget. 
    445452    top_uvalue = ptrarr(2, 29, /allocate_heap) 
    446 ; variables se rapportant au widget en general 
     453; variables refering to the widget 
    447454    *top_uvalue[0, 0] = 'options' & *top_uvalue[1, 0] = options 
    448455    *top_uvalue[0, 1] = 'smallin' & *top_uvalue[1, 1] = smallin 
     
    458465    *top_uvalue[0, 11] = 'noticebase' & *top_uvalue[1, 11] = 0l 
    459466    *top_uvalue[0, 12] = 'extra' & *top_uvalue[1, 12] = ex 
    460 ; variables se rapportant aux differents fichiers que l''on peut lire 
     467; variables refering to different files we can read 
    461468    *top_uvalue[0, 13] = 'currentfile' & *top_uvalue[1, 13] = currentfile 
    462469    *top_uvalue[0, 14] = 'filelist' & *top_uvalue[1, 14] = filelist 
     
    464471    *top_uvalue[0, 16] = 'readparameters' & *top_uvalue[1, 16] = readparameters 
    465472    *top_uvalue[0, 17] = 'meshparameters' & *top_uvalue[1, 17] = meshparameters 
    466 ; variables se rapportant aux differents dessins que l''on peut faire 
     473; variables refering to different drawing we can do 
    467474    *top_uvalue[0, 18] = 'penvs' & *top_uvalue[1, 18] = replicate(!p, nbredessin) 
    468475    *top_uvalue[0, 19] = 'xenvs' & *top_uvalue[1, 19] = replicate(!x, nbredessin) 
Note: See TracChangeset for help on using the changeset viewer.