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

english and nicer header (3a)

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

Legend:

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

    r134 r150  
    33;------------------------------------------------------------ 
    44;+ 
    5 ; NAME:buildcmd 
    6 ; 
    7 ; PURPOSE:cette fonction reourne un string qui contient la commande de 
    8 ; lecture et les parametres du trace. 
    9 ; 
    10 ; CATEGORY: 
    11 ; 
    12 ; CALLING SEQUENCE: 
    13 ;  
    14 ; INPUTS: 
    15 ; 
    16 ; KEYWORD PARAMETERS: 
    17 ; 
    18 ; OUTPUTS: 
    19 ; 
    20 ; COMMON BLOCKS: 
    21 ; 
    22 ; SIDE EFFECTS: 
    23 ; 
    24 ; RESTRICTIONS: 
    25 ; 
    26 ; EXAMPLE: 
    27 ; 
    28 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) 
     5; 
     6; @file_comments 
     7; This function send back a string which contain the reading command  
     8; and drawing's parameters. 
     9; 
     10; @param BASE {in}{required} 
     11; 
     12; @keyword BOXZOOM 
     13; Vector indicating the geographic zone on which we want to cut the map.  
     14; If BOXZOOM has :  
     15;   1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] 
     16;   2 elements: The extraction is made on [lon1, lon2, lat1, lat2, boxzoom[0],boxzoom[1]] 
     17;   4 elements: The extraction is made on [Boxzoom, 0, max([gdept, gdepw])] 
     18;   5 elements: The extraction is made on [Boxzoom[0:3], 0, Boxzoom[4]] 
     19;   6 elements: The extraction is made on Boxzoom  
     20; Where lon1, lon2,lat1,lat2 are global variables defined at the last domdef! 
     21; 
     22; @keyword FORCETYPE 
     23; 
     24; @history 
     25; Sebastien Masson (smasson@lodyc.jussieu.fr) 
     26; 
     27; @version 
     28; $Id$ 
     29; 
     30; @todo 
     31; seb: documenter le param BASE et le keyword FORCETYPE 
    2932; 
    3033;- 
     
    5659;------------------------------------------------------------ 
    5760;--------------- 
    58 ; on determine quelle procedure on va etre appele pour faire le dessin 
    59 ; et le type 
     61; We determinate which procedure we will call to do the drawing and the type 
    6062;--------------- 
    6163  IF keyword_set(forcetype) THEN type = forcetype $ 
     
    8183  endcase 
    8284; 
    83 recherche des options 
     85Search of options 
    8486; 
    8587  options = extractatt(top_uvalue, 'options')    
     
    9496  alreadyvector = extractatt(top_uvalue, 'alreadyvector') 
    9597  alreadyover = extractatt(top_uvalue, 'alreadyoer') 
    96 ; que devons-nous lire ? 
     98; What must we read ? 
    9799  case 1 of 
    98100    alreadyover NE -1:BEGIN 
     
    340342;----------------------- 
    341343;--------------- 
    342 ; determination du nom de la boxzoom  
    343 ;--------------- 
     344; determination of the boxzoom's name. 
    344345  if NOT keyword_set(boxzoom) then widget_control, domainid, get_value = boxzoom 
    345 ; ecriture de celle-ci sous forme d''un string 
     346; Writting of this one as a string 
    346347  box = '['+strtrim(boxzoom[0], 1) 
    347348  for i = 1, (n_elements(boxzoom)-1) < (3+2*(strpos(type, 'z') EQ -1)) do $ 
    348349    box = box+', '+strtrim(boxzoom[i], 1) 
    349 ; pour les [plots en z, box doit avoir par defaut 0,profmax 
     350; For [plots in z, box must have by default 0,profmax 
    350351  if strpos(type, 'z') NE -1 then BEGIN 
    351 ; si + de 1 niveau est selectionne: 
     352; If more than 1 level is selected:  
    352353    widget_control, widget_info(base, find_by_uname = 'dthlv1'), get_value = niv1 
    353354    niv1 = niv1.combobox_index 
     
    372373  ENDIF 
    373374;--------------- 
    374 ; on determine typein 
     375; We determinate typein 
    375376;--------------- 
    376377    IF strpos(type, ' diag ') NE -1 THEN typein = ''''+strmid(type, 0, 4)+'''' $ 
     
    378379;--------------- 
    379380;--------------- 
    380 ; determination de small 
     381; determination of small 
    381382;--------------- 
    382383  ssmall = tostr(smallout) 
    383384;------------------------------------------------------------ 
    384 ; on va definir le string qui contiendra la commande a executer par widgetdessine.pro 
     385; We will define the string which will contain the command to be executed by widgetdessine.pro 
    385386;------------------------------------------------------------ 
    386387  Cmd = [readCmd, procedure+ ', field $' $ 
     
    395396;    print, '---------------' 
    396397;--------------- 
    397 ; on complete et/ou actualise la structure top_uvalue... 
     398; We complete and/or update the structure top_uvalue... 
    398399;--------------- 
    399400  (*top_uvalue[1, findline(top_uvalue, 'nameprocedures')])[numdessinout] = procedure 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/buildreadcmd.pro

    r148 r150  
    1 ;------------------------------------------------------------ 
    2 ;------------------------------------------------------------ 
    3 ;------------------------------------------------------------ 
    41;+ 
    5 ; NAME:buildreadcmd 
     2;  
     3; @param BASE {in}{required}  
     4; The id of the widget where apply the drawing. 
    65; 
    7 ; PURPOSE: 
     6; @param SNAMEEXP {in}{required} 
    87; 
    9 ; CATEGORY: 
    108; 
    11 ; CALLING SEQUENCE: 
     9; @param PROCEDURE {in}{required} 
     10; 
     11; 
     12; @param TYPE {in}{required} 
     13; 
    1214;  
    13 ; INPUTS: 
     15; @keyword BOXZOOM 
     16; Vector indicating the geographic zone on which we want to cut the map.  
     17; If BOXZOOM has :  
     18;   1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] 
     19;   2 elements: The extraction is made on [lon1, lon2, lat1, lat2, boxzoom[0],boxzoom[1]] 
     20;   4 elements: The extraction is made on [Boxzoom, 0, max([gdept, gdepw])] 
     21;   5 elements: The extraction is made on [Boxzoom[0:3], 0, Boxzoom[4]] 
     22;   6 elements: The extraction is made on Boxzoom  
     23; Where lon1, lon2,lat1,lat2 are global variables defined at the last domdef! 
    1424; 
    15 ; KEYWORD PARAMETERS: 
     25; @keyword COMPLETE 
    1626; 
    17 ; OUTPUTS: 
     27 
     28; @keyword NAMEFIELD 
    1829; 
    19 ; COMMON BLOCKS:common.pro 
    2030; 
    21 ; SIDE EFFECTS: 
     31; @uses 
     32; common.pro 
     33;  
     34; @history 
     35; Sebastien Masson (smasson@lodyc.jussieu.fr) 
     36;  
     37; @version  
     38; $Id$ 
    2239; 
    23 ; RESTRICTIONS: 
    24 ; 
    25 ; EXAMPLE: 
    26 ; 
    27 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) 
     40; @todo 
     41; seb: documenter les param et les keyword qui ne le sont pas. 
    2842; 
    2943;- 
    30 ;------------------------------------------------------------ 
    31 ;------------------------------------------------------------ 
    32 ;------------------------------------------------------------ 
    3344FUNCTION buildreadcmd, base, snameexp, procedure, type, BOXZOOM = boxzoom $ 
    3445                       , COMPLETE = complete, NAMEFIELD = namefield 
     
    135146;------------------------------------------------------------ 
    136147;------------------------------------------------------------ 
    137 ; on va definir le string qui contiendra la commande a executer pour 
    138 ; la lecture 
     148; We will define the string which will contain the command to be executed for the reading. 
    139149;------------------------------------------------------------ 
    140150    Cmd = ['; Definition of extra structure:', 'extra = '+sextra $ 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/changefield.pro

    r134 r150  
     1;+ 
     2; @file_comments 
     3; 
     4; 
     5; @categories 
     6; 
     7;  
     8; @param BASE {in}{required} 
     9; The id of the widget where apply the drawing. 
     10; 
     11; @param NEWFIELDNAME 
     12; 
     13;  
     14; @keyword BOXZOOM 
     15; Vector indicating the geographic zone on which we want to cut the map.  
     16; If BOXZOOM has :  
     17;   1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] 
     18;   2 elements: The extraction is made on [lon1, lon2, lat1, lat2, boxzoom[0],boxzoom[1]] 
     19;   4 elements: The extraction is made on [Boxzoom, 0, max([gdept, gdepw])] 
     20;   5 elements: The extraction is made on [Boxzoom[0:3], 0, Boxzoom[4]] 
     21;   6 elements: The extraction is made on Boxzoom  
     22; Where lon1, lon2,lat1,lat2 are global variables defined at the last domdef! 
     23;  
     24; @returns 
     25;  
     26;  
     27; @uses 
     28;  
     29;  
     30; @restrictions 
     31;  
     32;  
     33; @examples 
     34;  
     35;  
     36; @history 
     37;  
     38;  
     39; @version  
     40; $Id$ 
     41; 
     42; @todo 
     43; seb 
     44; 
     45;- 
    146PRO changefield, base, newfieldname, BOXZOOM = boxzoom 
    247; 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/changefile.pro

    r134 r150  
     1;+ 
     2; @file_comments 
     3; 
     4; 
     5; @categories 
     6; 
     7;  
     8; @param BASE {in}{required} 
     9; The id of the widget where apply the drawing. 
     10; 
     11; @param NEWFILENAME 
     12; 
     13;  
     14; @keyword BOXZOOM 
     15; Vector indicating the geographic zone on which we want to cut the map.  
     16; If BOXZOOM has :  
     17;   1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] 
     18;   2 elements: The extraction is made on [lon1, lon2, lat1, lat2, boxzoom[0],boxzoom[1]] 
     19;   4 elements: The extraction is made on [Boxzoom, 0, max([gdept, gdepw])] 
     20;   5 elements: The extraction is made on [Boxzoom[0:3], 0, Boxzoom[4]] 
     21;   6 elements: The extraction is made on Boxzoom  
     22; Where lon1, lon2,lat1,lat2 are global variables defined at the last domdef! 
     23;  
     24; @keyword DATE1 
     25;  
     26; @keyword DATE2 
     27; 
     28; @keyword FIELDNAME 
     29;  
     30;  
     31; @returns 
     32;  
     33;  
     34; @uses 
     35;  
     36;  
     37; @restrictions 
     38;  
     39;  
     40; @examples 
     41;  
     42;  
     43; @history 
     44;  
     45;  
     46; @version  
     47; $Id$ 
     48; 
     49; @todo 
     50; seb 
     51; 
     52;- 
    153PRO changefile, base, newfilename, BOXZOOM = boxzoom, DATE1 = date1, DATE2 = date2, FIELDNAME = fieldname 
    254; 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/createhistory.pro

    r134 r150  
     1;+ 
     2; @file_comments 
     3; 
     4; 
     5; @categories 
     6; 
     7;  
     8; @param BASE {in}{required} 
     9; The id of the widget where apply the drawing. 
     10; 
     11; @param SMALL 
     12; Vector composed of 3 or 4 elements, applyed to make a drawing on a small  
     13; portion of a page or screen. It delimit the zone where the drawing will  
     14; be done. If there is 4 elements: then is constituated of coordinates (expressed  
     15; in cm located from the up and left corner of the page or the window (in portrait  
     16; like in lanscape)) of the bottom and left corner and of the up and right corner  
     17; of the drawing zone. If there is 3 elements: in this case, we divide the page or  
     18; the screen in small[0] columns and in small[1] lines the drawing made in the box  
     19; numbered small[2]. The numerotation starting up and left by the number 1 and then,  
     20; following the writing direction. By default, we make the largest drawing we can do,  
     21; conserving the aspect rapport (exept when REMPLI is activated). 
     22;  
     23; @returns 
     24;  
     25;  
     26; @uses 
     27;  
     28;  
     29; @restrictions 
     30;  
     31;  
     32; @examples 
     33;  
     34;  
     35; @history 
     36;  
     37;  
     38; @version  
     39; $Id$ 
     40; 
     41; @todo 
     42; seb: je ne suis pas sur pour les param, 
     43; documenter le reste. 
     44; 
     45;- 
    146PRO createhistory, base, small 
    247; 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/cutcmd.pro

    r134 r150  
     1;+ 
     2; @file_comments 
     3; 
     4; 
     5; @categories 
     6; 
     7;  
     8; @param WIDCMD 
     9; 
     10; 
     11; @param TOREAD 
     12; 
     13; 
     14; @param NUMBEROFREAD 
     15; 
     16; 
     17; @param PREFIX 
     18; 
     19; 
     20; @param NAMEEXP 
     21; 
     22; 
     23; @param ENDING 
     24; 
     25;  
     26; @returns 
     27;  
     28;  
     29; @uses 
     30;  
     31;  
     32; @restrictions 
     33;  
     34;  
     35; @examples 
     36;  
     37;  
     38; @history 
     39;  
     40;  
     41; @version  
     42; $Id$ 
     43;  
     44; @todo 
     45; seb 
     46; 
     47;- 
    148PRO cutcmd, widcmd, toread, numberofread, prefix, nameexp, ending 
    249; 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/definedefaultextra.pro

    r134 r150  
     1;+ 
     2; @file_comments 
     3; 
     4; 
     5; @categories 
     6; 
     7;  
     8; @param NOMVARIABLE 
     9; 
     10;  
     11; @returns 
     12;  
     13;  
     14; @uses 
     15;  
     16;  
     17; @restrictions 
     18;  
     19;  
     20; @examples 
     21;  
     22;  
     23; @history 
     24;  
     25;  
     26; @version 
     27; $Id$  
     28;  
     29; @todo 
     30; seb 
     31; 
     32;- 
    133FUNCTION definedefaultextra, nomvariable 
    234; 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/doubleclickaction.pro

    r134 r150  
     1;+ 
     2; @file_comments 
     3; 
     4; 
     5; @categories 
     6; 
     7;  
     8; @param EVENT 
     9; 
     10;  
     11; @returns 
     12;  
     13;  
     14; @uses 
     15;  
     16;  
     17; @restrictions 
     18;  
     19;  
     20; @examples 
     21;  
     22;  
     23; @history 
     24;  
     25;  
     26; @version 
     27; $Id$  
     28;  
     29; @todo 
     30; seb 
     31; 
     32;- 
    133PRO doubleclickaction, event 
    234;------------------------------------------------------------ 
     
    638   widget_control, event.id , get_uvalue = uval 
    739   widget_control, event.top, get_uvalue = top_uvalue 
    8 ; on active la bonne fenetre  
     40; We activate the right window 
    941   widget_control, event.id, get_value = win 
    1042   wset, win 
    11 ; quel est le dessin selectionne?? 
     43; What is the selected drawing? 
    1244   smallin = extractatt(top_uvalue, 'smallin') 
    1345   smallout = extractatt(top_uvalue, 'smallout') 
     
    1749   numligne = n_elements(where(findgen(smallin[1])/smallin[1] lt 1-y))-1 
    1850   numdessin = numcolonne+numligne*smallin[0]+1 
    19 ; choix du type d''action 
     51; Choice of the type of action. 
    2052   case uval.press of 
    2153      1:BEGIN 
     
    4678         inserthistory, event.top, ';', '; beginning of '+strtrim(numdessin, 2) $ 
    4779          , '; end of '+strtrim(numdessin, 2) 
    48 ; remise a 0 des attributs de la uvalue concernant ce dessin: 
     80; Putting at 0 of attributes of the value concerning the drawing:  
    4981 
    5082         numdessin = numdessin-1 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/extractatt.pro

    r134 r150  
     1;+ 
     2; @file_comments 
     3; 
     4; 
     5; @categories 
     6; 
     7;  
     8; @param TOP_UVALUE 
     9; 
     10; 
     11; @param NAME 
     12; 
     13;  
     14; @returns 
     15;  
     16;  
     17; @uses 
     18;  
     19;  
     20; @restrictions 
     21;  
     22;  
     23; @examples 
     24;  
     25;  
     26; @history 
     27;  
     28;  
     29; @version  
     30; $Id$ 
     31;  
     32; @todo 
     33; seb 
     34; 
     35;- 
    136FUNCTION extractatt, top_uvalue, name 
    237; 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/findline.pro

    r134 r150  
     1;+ 
     2; @file_comments 
     3; 
     4; 
     5; @categories 
     6; 
     7;  
     8; @param TOP_UVALUE 
     9; 
     10; 
     11; @param NAME 
     12; 
     13;  
     14; @returns 
     15;  
     16;  
     17; @uses 
     18;  
     19;  
     20; @restrictions 
     21;  
     22;  
     23; @examples 
     24;  
     25;  
     26; @history 
     27;  
     28;  
     29; @version  
     30; $Id$ 
     31;  
     32; @todo 
     33; seb 
     34; 
     35;- 
    136FUNCTION findline, top_uvalue, name 
    237; 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/identifyclick.pro

    r134 r150  
     1;+ 
     2; @file_comments 
     3; 
     4; 
     5; @categories 
     6; 
     7;  
     8; @param EVENT 
     9; 
     10;  
     11; @returns 
     12;  
     13;  
     14; @uses 
     15;  
     16;  
     17; @restrictions 
     18;  
     19;  
     20; @examples 
     21;  
     22;  
     23; @history 
     24;  
     25;  
     26; @version 
     27; $Id$  
     28;  
     29; @todo 
     30; seb 
     31; 
     32;- 
    133FUNCTION identifyclick, event 
    234; 
     
    739   if thisEvent EQ 'WIDGET_TIMER' then press = 0 ELSE press = event.press 
    840; 
    9 ;  d/0/>1 -------->t/1/0--------->**d/2/0**       long click 
    10 ;         -------->d/1/0--------->**t/2/0**  click normal 
     41;  d/0/>1 -------->t/1/0--------->**d/2/0**    long click 
     42;         -------->d/1/0--------->**t/2/0**  normal click 
    1143;                       --------->**d/2/>1**-------->d/3/0----->t/0/0  double click 
    1244;                                           -------->t/3/0----->d/0/0  double click 
    1345   type = 'inutile' 
    1446   case 1 OF 
    15 ; d/0/0 1er remonte 
     47; d/0/0 1er reascending 
    1648      thisEvent EQ 'WIDGET_DRAW' AND uval.click EQ 0 AND press EQ 0: 
    17 ; d/0/>1 1er appuie de la serie 
     49; d/0/>1 1er click of the series 
    1850      thisEvent EQ 'WIDGET_DRAW' AND uval.click EQ 0 AND press ge 1:BEGIN 
    1951         uval.x = [event.x, 0] 
     
    2355         widget_control, event.id, timer = .3 
    2456      END 
    25 ; d/1/0 1er remonte 
     57; d/1/0 1er reascending 
    2658      thisEvent EQ 'WIDGET_DRAW' AND uval.click EQ 1 AND press EQ 0:uval.click = 2 
    27 ; d/2/0 fin long click 
     59; d/2/0 End of the long click 
    2860      thisEvent EQ 'WIDGET_DRAW' AND uval.click EQ 2 AND press EQ 0:BEGIN 
    2961         type = 'long' 
     
    3971         uval.click = 3 
    4072      END 
    41 ; d/3/0 remonte et fin de double click 
     73; d/3/0 reascending and end of the double click 
    4274      thisEvent EQ 'WIDGET_DRAW' AND uval.click EQ 3 AND press EQ 0:uval.click = 0 
    43 ; t/0/0 fin de double click 
     75; t/0/0 End of the double click 
    4476      thisEvent EQ 'WIDGET_TIMER' AND uval.click EQ 0 AND press EQ 0: 
    4577; t/1/0 long click 
    4678      thisEvent EQ 'WIDGET_TIMER' AND uval.click EQ 1 AND press EQ 0:uval.click = 2 
    47 ; t/2/0 click normal 
     79; t/2/0 normal click 
    4880      thisEvent EQ 'WIDGET_TIMER' AND uval.click EQ 2 AND press EQ 0:BEGIN  
    4981         type = 'single' 
     
    5183         uval.click = 0 
    5284      END 
    53 ; t/3/0 fin de double click 
     85; t/3/0 End of the double click 
    5486      thisEvent EQ 'WIDGET_TIMER' AND uval.click EQ 3 AND press EQ 0:uval.click = 0 
    55 ; cas normalement impossible: 
     87; Imposible case in theory: 
    5688      ELSE:BEGIN 
    5789         print, thisEvent, uval.click, press 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/inserthistory.pro

    r134 r150  
     1;+ 
     2; @file_comments 
     3; 
     4; 
     5; @categories 
     6; 
     7;  
     8; @param BASE 
     9; 
     10; 
     11; @param TEXT 
     12; 
     13; 
     14; @param LINE1 
     15; 
     16; 
     17; @param LINE2 
     18; 
     19;  
     20; @returns 
     21;  
     22;  
     23; @uses 
     24;  
     25;  
     26; @restrictions 
     27;  
     28;  
     29; @examples 
     30;  
     31;  
     32; @history 
     33;  
     34;  
     35; @version 
     36; $Id$  
     37;  
     38; @todo 
     39; seb 
     40; 
     41;- 
     42;------------------------------------------------------------- 
    143PRO inserthistory,  base, text, line1, line2 
    2 ;------------------------------------------------------------- 
    344; 
    445  compile_opt idl2, strictarrsubs 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/letsdraw.pro

    r134 r150  
    1 ;------------------------------------------------------------ 
    2 ;------------------------------------------------------------ 
    3 ;------------------------------------------------------------ 
    41;+ 
    5 ; NAME:widgetdessine 
     2; @file_comments  
     3; It si the procedure lauching the drawing.  
     4; If we do not give the command to it, it call  
     5; construitcommande to know what to trace. 
    66; 
    7 ; PURPOSE: c'est la procedure qui lance le dessin. Si on ne le lui 
    8 ; donne pas de commande, elle appelle construitcommande pour savoir 
    9 ; quoi tracer. 
     7; @categories 
    108; 
    11 ; CATEGORY: 
     9;  
     10; @param BASE {in}{required} 
     11; The id of the widget where apply the drawing. 
     12;  
     13; @keyword COMMANDE 
     14; A string of the style: read_data('sst'...),... 
    1215; 
    13 ; CALLING SEQUENCE:widgetdessine, base 
     16; @keyword _EXTRA 
     17; Used to pass your keywords  
    1418;  
    15 ; INPUTS:base: l''id du widget ou appliquer le dessin 
    16 ; 
    17 ; KEYWORD PARAMETERS: 
    18 ;       COMMANDE: un string du style: read_data('sst'...),.... 
    19 ; 
    20 ; OUTPUTS: 
    21 ; 
    22 ; COMMON BLOCKS:common.pro 
    23 ; 
    24 ; SIDE EFFECTS: 
    25 ; 
    26 ; RESTRICTIONS: 
    27 ; 
    28 ; EXAMPLE: 
    29 ; 
    30 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) 
    31 ; 
     19; @uses 
     20; common.pro  
     21;  
     22; @history 
     23; Sebastien Masson (smasson@lodyc.jussieu.fr) 
     24;  
     25; @version  
     26; $Id$ 
     27;  
    3228;- 
    33 ;------------------------------------------------------------ 
    34 ;------------------------------------------------------------ 
    35 ;------------------------------------------------------------ 
    36  
    3729PRO letsdraw, base, COMMANDE = commande, _extra = ex 
    3830; 
     
    4032; 
    4133@common 
    42 ; on recupere la uvalue de base 
     34; we recuperate the uvalue of base 
    4335; widget_control,base, get_uvalue = top_uvalue 
    4436; print, '*****************' 
     
    6153; 
    6254; 
    63 ; on recuperel''id de la fenetre graphique associee au widget d''id base 
     55; we recuperate the id of the graphic associated to the widget of id base. 
    6456   graphid = extractatt(top_uvalue, 'graphid') 
    6557   widget_control, graphid, get_value = win 
    66 ; on la selectionne (c''est a elle que sera passe toutes les commandes 
    67 ; concernant une fenetre) 
     58; We select it (we will pass to it all commands concerning the window) 
    6859   wset, win 
    69 ;   erase, 255                       ; on netoie la fenetre 
    70 ; on s''assure que si on travaille avec un ecran codant les couleurs 
    71 ; sur 24 bits la couleur de fond specifiee!p.background est bien 
    72 ; appliquee 
     60;   erase, 255                       ; we clean the window 
     61; We make sure that, if we work with a screen coding colors on 24 bits, the specified background color !p.background is the one applied. 
    7362;    if !d.n_colors gt 256 then begin 
    7463;       device, decomposed=1 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/loadgrid.pro

    r134 r150  
     1;+ 
     2; @file_comments 
     3; 
     4; 
     5; @categories 
     6; 
     7;  
     8; @param MESHFILEIN 
     9; 
     10;  
     11; @keyword _EXTRA 
     12; Used to pass your keywords 
     13;  
     14; @returns 
     15;  
     16;  
     17; @uses 
     18;  
     19;  
     20; @restrictions 
     21;  
     22;  
     23; @examples 
     24;  
     25;  
     26; @history 
     27;  
     28;  
     29; @version  
     30; $Id$ 
     31; 
     32; @todo 
     33; seb 
     34; 
     35;- 
    136PRO loadgrid, meshfilein, _extra = ex 
    237; 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/longclickaction.pro

    r134 r150  
     1;+ 
     2; @file_comments 
     3; 
     4; 
     5; @categories 
     6; 
     7;  
     8; @param EVENT 
     9; 
     10;  
     11; @returns 
     12;  
     13;  
     14; @uses 
     15;  
     16;  
     17; @restrictions 
     18;  
     19;  
     20; @examples 
     21;  
     22;  
     23; @history 
     24;  
     25;  
     26; @version 
     27; $Id$  
     28;  
     29; @todo 
     30; seb 
     31; 
     32;- 
    133PRO longclickaction, event 
    234; 
     
    537  widget_control, event.id, get_uvalue = uval 
    638  widget_control, event.top, get_uvalue = top_uvalue 
    7 ; quel est le dessin selectionne?? 
     39; What is the selected drawing? 
    840  smallout = extractatt(top_uvalue, 'smallout') 
    941  smallin = extractatt(top_uvalue, 'smallin') 
     
    3264  domainid = widget_info(event.top, find_by_uname = 'domain') 
    3365  boxzoom = [x, y] 
    34 ; faut-il passer la boxzoom en indexes ??? 
     66; Do we have to pass the boxzoom in indexes ??? 
    3567  currentplot = (extractatt(top_uvalue, 'smallin'))[2]-1 
    3668  options = extractatt(top_uvalue, 'options')    
     
    4072  changey = (flags[where(options EQ 'Latitude / y index')])[0] EQ 1 
    4173  if changex OR changey then begin 
    42 ; on veut retrouver le type de grille qui est utilisee 
     74; We want to find the type of grid which is used 
    4375    currentfile = extractatt(top_uvalue, 'currentfile') 
    4476    listgrid = (*(extractatt(top_uvalue, 'fileparameters'))[currentfile]).listgrid 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/read_vermair.pro

    r134 r150  
     1;+ 
     2; @file_comments 
     3; 
     4; 
     5; @categories 
     6; 
     7;  
     8; @param NAME 
     9; 
     10; 
     11; @param DEBUT 
     12; 
     13; 
     14; @param FIN 
     15; 
     16; 
     17; @param NOMEXP 
     18; 
     19; 
     20; @keyword PARENT 
     21; same as DIALOG_PARENT de dialog_message.pro 
     22; 
     23; @keyword BOXZOOM 
     24; Vector indicating the geographic zone on which we want to cut the map.  
     25; If BOXZOOM has :  
     26;   1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] 
     27;   2 elements: The extraction is made on [lon1, lon2, lat1, lat2, boxzoom[0],boxzoom[1]] 
     28;   4 elements: The extraction is made on [Boxzoom, 0, max([gdept, gdepw])] 
     29;   5 elements: The extraction is made on [Boxzoom[0:3], 0, Boxzoom[4]] 
     30;   6 elements: The extraction is made on Boxzoom  
     31; Where lon1, lon2,lat1,lat2 are global variables defined at the last domdef! 
     32; 
     33; @keyword _EXTRA 
     34; Used to pass your keywords  
     35;  
     36; @returns 
     37;  
     38;  
     39; @uses 
     40;  
     41;  
     42; @restrictions 
     43;  
     44;  
     45; @examples 
     46;  
     47;  
     48; @history 
     49;  
     50;  
     51; @version  
     52; $Id$ 
     53; 
     54; @todo 
     55; seb 
     56;  
     57;- 
    158FUNCTION read_vermair, name, debut, fin, nomexp, PARENT = parent, BOXZOOM=boxzoom, _EXTRA = ex 
    259; 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/scanfile.pro

    r134 r150  
     1;+ 
     2; @file_comments 
     3; 
     4; 
     5; @categories 
     6; 
     7;  
     8; @param NAMEFILE 
     9; 
     10;  
     11; @keyword GRID 
     12; 
     13; 
     14; @keyword _EXTRA 
     15; Used to pass your keywords 
     16;  
     17; @returns 
     18;  
     19;  
     20; @uses 
     21;  
     22;  
     23; @restrictions 
     24;  
     25;  
     26; @examples 
     27;  
     28;  
     29; @history 
     30;  
     31;  
     32; @version  
     33; $Id$ 
     34; 
     35; @todo 
     36; seb : I don't know what to do with that... 
     37;  
     38;- 
    139; 
    240;  liste des presupposes: 
     
    145183          time = date0fk + lindgen(jpt) 
    146184        ENDIF ELSE BEGIN  
    147 ; on lit l''axe des temps 
     185; we read the time axis 
    148186          ncdf_varget, cdfid, varid, time 
    149187          time = double(time) 
     
    180218          ENDELSE 
    181219; 
    182 ; ATTENTION il faut recuperer l''attribut calendar et ajuster time en 
    183 ; consequense... 
    184 ; 
    185 ; 
    186 ; on passe time en jour julien d''idl  
     220; BEWARE we have to recuperate the calendar attribute and ajust TIME by consequence... 
     221; 
     222; 
     223; We pass TIME in IDL julian days 
    187224; 
    188225          unite = strlowcase(unite) 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/selectfile.pro

    r134 r150  
    144144end 
    145145;********************************************************************* 
     146;+ 
     147; @file_comments 
     148; 
     149; 
     150; @categories 
     151; 
     152;  
     153; @param DATAFILENAME 
     154; 
     155; 
     156; @param IDLFILE 
     157; 
     158; 
     159; @param ARGSPRO 
     160; 
     161;  
     162; @keyword _EXTRA 
     163; Used to pass your keywords 
     164;  
     165; @returns 
     166;  
     167;  
     168; @uses 
     169;  
     170;  
     171; @restrictions 
     172;  
     173;  
     174; @examples 
     175;  
     176;  
     177; @history 
     178;  
     179;  
     180; @version  
     181; $Id$ 
     182;  
     183; @todo 
     184; seb: documenter les params 
     185;  
     186;- 
    146187FUNCTION selectfile, datafilename, idlfile, argspro, _extra = ex 
    147188; 
     
    153194;------------------------------------------------------------ 
    154195; 
    155 ; pour recuperer les reponses possees lors de l''utilisation de ce 
    156 ; widget on cree un pointeur que l''on place dans la uvalue. Comme ca 
    157 ; une fois que le widget est detruit dans la procedure ...event.pro, 
    158 ; la variable surlaquelle pointait le pointeur (contenue ds la uvalue 
    159 ; du widget) n''est pas detruite est on peut recuperer le resultat! 
     196; We create a pointer in the uvalue to recuperate answers at setted  
     197; questions atthe time of the use of this widget. So when the widget  
     198; is deleted in the procedure ...event.pro, the variable on which the  
     199; pointer pointed (contained in the uvalue of the widget) is not  
     200; deleted and we can recuperate the result! 
    160201; 
    161202  messenger = ptr_new(/allocate_heap) 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/singleclickaction.pro

    r134 r150  
     1;+ 
     2; @file_comments 
     3; 
     4; 
     5; @categories 
     6; 
     7;  
     8; @param EVENT 
     9; 
     10;  
     11; @returns 
     12;  
     13;  
     14; @uses 
     15;  
     16;  
     17; @restrictions 
     18;  
     19;  
     20; @examples 
     21;  
     22;  
     23; @history 
     24;  
     25;  
     26; @version 
     27; $Id$  
     28;  
     29; @todo 
     30; seb 
     31; 
     32;- 
    133PRO singleclickaction, event 
    234; 
     
    1446  type = widget_info(actionid, /combobox_gettext) 
    1547  IF type NE 'plt' THEN return 
    16 ; on active la bonne fenetre  
     48; We activate the right window 
    1749  widget_control, event.id, get_value = win 
    1850  wset, win 
    19 ; choix du type d''action 
     51; choice of the type of action 
    2052  case uval.press of 
    2153    1:BEGIN 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/tracecadre.pro

    r134 r150  
     1;+ 
     2; @file_comments 
     3; 
     4; 
     5; @categories 
     6; 
     7;  
     8; @param SMALL 
     9; 
     10;  
     11; @keyword OUT 
     12; 
     13; 
     14; @keyword ERASE 
     15; 
     16; 
     17; @keyword FILL 
     18;  
     19;  
     20; @returns 
     21;  
     22;  
     23; @uses 
     24;  
     25;  
     26; @restrictions 
     27;  
     28;  
     29; @examples 
     30;  
     31;  
     32; @history 
     33;  
     34;  
     35; @version 
     36; $Id$  
     37;  
     38; @todo 
     39; seb 
     40; 
     41;- 
    142PRO tracecadre, small, out = out, erase = erase, fill = fill 
    243;------------------------------------------------------------ 
    3 ; determination de la colonne et de la ligne correspondant au small en 
    4 ; entree 
     44; determination of the column and of the line corresponding in input to small 
    545; 
    646  compile_opt idl2, strictarrsubs 
     
    949   numligne = numdessin/small[0] 
    1050   numcolonne = numdessin-numligne*small[0] 
    11 ; determination de poscadre 
     51; determination of poscadre 
    1252   largeurcolonne = 1./small[0] 
    1353   largeurligne = 1./small[1] 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/updatewidget.pro

    r134 r150  
     1;+ 
     2; @file_comments 
     3; 
     4; 
     5; @categories 
     6; 
     7;  
     8; @param BASE {in}{required} 
     9; The id of the widget where apply the drawing. 
     10;  
     11; @keyword NOBOXZOOM 
     12; 
     13; 
     14; @keyword NODATES 
     15; 
     16; 
     17; @keyword NOTYPE 
     18;  
     19;  
     20; @returns 
     21;  
     22;  
     23; @uses 
     24;  
     25;  
     26; @restrictions 
     27;  
     28;  
     29; @examples 
     30;  
     31;  
     32; @history 
     33;  
     34;  
     35; @version 
     36; $Id$  
     37;  
     38; @todo 
     39; seb 
     40; 
     41;- 
    142PRO updatewidget, base, NOBOXZOOM = noboxzoom, NODATES = nodates, NOTYPE = notype 
    243;---------------------------------------------------------------------- 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/xcreateanim.pro

    r134 r150  
     1;+ 
     2; @file_comments 
     3; 
     4; 
     5; @categories 
     6; 
     7;  
     8; @param EVENT 
     9; 
     10;  
     11; @returns 
     12;  
     13;  
     14; @uses 
     15;  
     16;  
     17; @restrictions 
     18;  
     19;  
     20; @examples 
     21;  
     22;  
     23; @history 
     24;  
     25;  
     26; @version 
     27; $Id$  
     28;  
     29; @todo 
     30; seb 
     31; 
     32;- 
    133pro xcreateanim_event, event  
    234; 
     
    436; 
    537@common 
    6 ; on recupere les aguments contenus ds le widget 
     38; We recuperate arguments contained in the widget 
    739  if tag_names(event, /structure_name) NE 'WIDGET_BUTTON' then return 
    840  widget_control, event.id, get_uvalue = uval 
     
    1244    return 
    1345  ENDIF 
    14 ; on va ecrire l''animation! 
     46; We will write the animation! 
    1547; 
    1648  widget_control, event.top, get_uvalue = local_uvalue 
     
    3668  index2 = where(calendar eq date2jul(vdate2)) & index2 = index2[0]  
    3769  if index2 EQ -1 OR index2 LE index1 then return 
    38 ; on detruit le widget avant de creer le fichier .ps 
     70; We delete the widget before create the file .ps 
    3971  widget_control, event.top, /destroy 
    4072; 
    41 ; creation de la routine qui nous serviera pour faire le dessin 
    42 ; 
    43 ; on recupere la liste des instructions 
     73; creation of the routine which will serve us to do the drawing 
     74; 
     75; We recuperate the list of instructions  
    4476  globalcommand = extractatt(top_uvalue, 'globalcommand') 
    45 ; on complete par le premiere et les dernieres lignes du programme 
     77; We complete by first and last lines of the program 
    4678  createpro, globalcommand, filename = myuniquetmpdir + 'xxx2ps.pro' $ 
    4779             , KWDLIST = ', NOERASE = noerase, POSTSCRIPT = postscript, DATE1IN = date1in, DATE2IN = date2in' 
    4880; 
    49 ;--------creation du fichier---------- 
    50 ; 
    51 recupere le nombre d'octets surlequel on code la palette 
     81;--------creation of the file--------- 
     82; 
     83we recuperate the number of octets on which we code the palette. 
    5284  device, get_visual_depth = depth 
    53 ; taille de l''image (en nombre de pixel: 
     85; Picture's size (in number of pixels): 
    5486  xsize = !d.x_size 
    5587  ysize = !d.y_size 
    5688; 
    57 ; on verifie que le nom du fichier termine bien par .gif 
     89; We check that the file's name end by .gif 
    5890  if strpos(nomfic, '.gif') EQ -1 then nomfic = nomfic+'.gif' 
    5991 
     
    6294 
    6395 
    64 ; indication du numero de l''image que l''on est en train de creer 
     96; indication of the number of the picture we are creating 
    6597  base = widget_base() 
    6698  sliderid = widget_slider(base, minimum = 1, maximum = index2-index1+1, value = 1 $ 
     
    68100  widget_control, base, /realize 
    69101; 
    70 ; commencement du fichier gif. ecriture d''une image vide  
     102; Beginning of the gif file. Writting of an empty  picture. 
    71103  IF keyword_set(fakecal) THEN date = index1 ELSE date = jul2date(calendar[index1]) 
    72104  xxx2ps, /noerase, date1in = date, date2in = date 
     
    91123  wdelete, !d.window 
    92124; 
    93 ; boucle de creation et d''ecriture ds le fichier. 
     125; Creation and writting loop in the file. 
    94126; 
    95127  IF index2 GT index1 THEN BEGIN 
    96128    FOR ind = index1+1, index2 do BEGIN 
    97129; 
    98       widget_control, sliderid, set_value = ind-index1+1 ; on bouge le slider 
     130      widget_control, sliderid, set_value = ind-index1+1 ; We move the slider. 
    99131; 
    100132      window, /free, /pixmap, xsize = xsize, ysize = ysize 
     
    111143    ENDFOR 
    112144  ENDIF  
    113 ; on met une derniere image blanche 
     145; We put a last white picture 
    114146  window, /free, /pixmap, xsize = xsize, ysize = ysize 
    115147  reinitplt 
     
    122154  write_gif, animdir+nomfic, image, red, green, blue, /multiple 
    123155  wdelete, !d.window 
    124 ; fermeture du fichier 
     156; File's closing. 
    125157  write_gif, animdir+nomfic, /close  
    126158  widget_control, base, /destroy  
    127 ; rebascule en mode "normal" 
     159; Rerock in "normal" mode 
    128160  thisOS = strupcase(strmid(!version.os_family, 0, 3)) 
    129161; 
    130162  wset, current_window 
    131163 
    132 ; si on est sous x on essaie de lancer xanim... 
     164; If we are under x, we try to lauch xanim... 
    133165 
    134166  if thisOS NE 'MAC' AND thisOS NE 'WIN' then begin 
     
    141173end 
    142174;---------------------------------------------------------------- 
     175;+ 
     176; @file_comments 
     177; 
     178; 
     179; @categories 
     180; 
     181;  
     182; @param PARENT 
     183; 
     184;  
     185; @returns 
     186;  
     187;  
     188; @uses 
     189;  
     190;  
     191; @restrictions 
     192;  
     193;  
     194; @examples 
     195;  
     196;  
     197; @history 
     198;  
     199;  
     200; @version 
     201; $Id$  
     202;  
     203; @todo 
     204; seb 
     205; 
     206;- 
    143207PRO xcreateanim, parent 
    144208; 
     
    149213   widget_control, parent, get_uvalue = top_uvalue 
    150214; 
    151 ; on va s''assurer que toutes les procedures de sont pas pltt 
     215; We will make sure that all procedure are not in pltt 
    152216; 
    153217   procedures = extractatt(top_uvalue, 'nameprocedures') 
     
    157221   ENDIF 
    158222; 
    159 ; on va s''assurer que toutes les figures ont le meme calendrier  
     223; We will make sure that all figure have the same calendar 
    160224; 
    161225   filelist = extractatt(top_uvalue,  'filelist') 
     
    183247   endif 
    184248; 
    185 ; c''est possible de faire une animation   
     249; It is possible to do an animation. 
    186250; 
    187251   base = widget_base(/column, title = 'animation creation', uvalue = {parent:parent, indexfile:indexfile})    
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/xxxmenubar_event.pro

    r134 r150  
     1;+ 
     2; @file_comments 
     3; 
     4; 
     5; @categories 
     6; 
     7;  
     8; @param EVENT 
     9; 
     10;  
     11; @returns 
     12;  
     13;  
     14; @uses 
     15;  
     16;  
     17; @restrictions 
     18;  
     19;  
     20; @examples 
     21;  
     22;  
     23; @history 
     24;  
     25;  
     26; @version  
     27; $Id$ 
     28; 
     29; @todo  
     30; seb 
     31;- 
    132;------------------------------------------------ 
    233PRO xxxmenubar_event, event 
     
    1546      widget_control, event.top, update = 0 
    1647      widget_control, event.top, get_uvalue = top_uvalue 
    17 ; on s''occupe de filelist 
     48; We take care of filelist 
    1849      filelist = extractatt(top_uvalue, 'filelist') 
    1950      filelist = [filelist, newfile.fileparameters.filename] 
    2051      currentfile = n_elements(filelist)-1 
    21 ; on update le widget 
     52; We update the widget 
    2253      filelistid = widget_info(event.top, find_by_uname = 'filelist') 
    2354      widget_control, filelistid, combobox_additem = file_basename(newfile.fileparameters.filename) 
    2455      widget_control, filelistid, set_combobox_select = currentfile 
    25 ; on update les elements filelist et currentfile de la top_uvalue 
     56; We update filelist and currentfile's elements of the top_value 
    2657      *top_uvalue[1, findline(top_uvalue, 'filelist')] = filelist 
    2758      oldfile = *top_uvalue[1, findline(top_uvalue, 'currentfile')] 
    2859      *top_uvalue[1, findline(top_uvalue, 'currentfile')] = currentfile 
    29 ; on s''occupe du nom de la variable 
     60; We take care of the name of the variable 
    3061      vlstid = widget_info(event.top, find_by_uname = 'varlist') 
    31 ; quel etait le champ selectionne ? on le reselectionne ? 
     62; What is the selected field ? Do we reselect it ? 
    3263      fieldname = widget_info(vlstid, /combobox_gettext) 
    3364      index = where(newfile.fileparameters.listvar EQ fieldname)  
    3465      widget_control, vlstid, set_value = newfile.fileparameters.listvar 
    3566      widget_control, vlstid, set_combobox_select = 0 > index[0] 
    36 ; on s''occupe du calendrier 
     67; We take care of the calendar. 
    3768      key_caltype = newfile.fileparameters.caltype 
    3869      date1id = widget_info(event.top, find_by_uname = 'calendar1') 
     
    5384      rien = cw_calendar(basecal, newfile.fileparameters.time_counter, jdate2, uname = 'calendar2' $ 
    5485                         , FAKECAL = fakecal, uvalue = {name:'calendar2'}, /frame) 
    55 ; on update les elements fileparameters, readparameters et meshparameters de la top_uvalue 
     86; We update fileparameters, readparameters et meshparameters elements of the top_value 
    5687      newfileparameters = ptrarr(currentfile+1, /allocate_heap) 
    5788      FOR i = 0, currentfile-1 DO $ 
     
    74105      ptr_free, extractatt(top_uvalue, 'meshparameters') 
    75106      *top_uvalue[1, findline(top_uvalue, 'meshparameters')] = newmeshparameters 
    76 ; on actualise le widget! 
     107; We update the widget! 
    77108      if cmpgrid(oldmeshparams) then BEGIN 
    78109        domainid = widget_info(event.top, find_by_uname = 'domain') 
     
    93124      ptr_free, extractatt(top_uvalue, 'meshparameters') 
    94125      ptr_free, top_uvalue 
    95       widget_control, event.top, /destroy ;on ferme le widget 
     126      widget_control, event.top, /destroy ;We shut the widget 
    96127    end 
    97128    'PostScript' :BEGIN 
     
    101132      ENDIF 
    102133      widget_control, event.top, get_uvalue = top_uvalue 
    103 ; on recupere la liste des instructions 
     134; We recuperate the list of instructions 
    104135      globalcommand = extractatt(top_uvalue, 'globalcommand') 
    105136;      for i = 0, n_elements(globalcommand)-1 do print, globalcommand[i] 
    106 ; on complete par le premiere et les dernieres lignes du programme 
     137; We complete by first and last lines of the program. 
    107138      createpro, globalcommand, filename = myuniquetmpdir + 'xxx2ps.pro' $ 
    108139                 , KWDLIST = ', NOERASE = noerase, POSTSCRIPT = postscript' $ 
     
    136167        return 
    137168      ENDIF 
    138 ; on recupere le nom du fichier 
     169; We recuperate the name of the file 
    139170      filename = xquestion('dans quelle procedure IDL voulez vous sauver !C la realisation de ce graph?', 'xxx_figure.pro') 
    140 ; on le complete par un .pro 
     171; We complete it by a .pro 
    141172      if rstrpos(filename, '.pro') NE strlen(filename)-4 then filename = filename+'.pro' 
    142173      filename = isafile(file = filename, io = homedir, /new) 
    143174      widget_control, event.top, get_uvalue = top_uvalue 
    144 ; portrait ou landscape ??? 
     175; portrait or landscape ??? 
    145176      options = extractatt(top_uvalue, 'options')    
    146177      optionsflag = extractatt(top_uvalue, 'optionsflag') 
    147178      portrait = (optionsflag[where(options EQ 'Portrait/Landscape'), 0])[0] 
    148 ; on lit les commandes pour faire un plot 
     179; We read commands to do a plot 
    149180      globalcommand = extractatt(top_uvalue, 'globalcommand') 
    150 ; on complete par le premiere et les dernieres lignes du programme 
     181; We complete by first and last lines of the program 
    151182      thisOS = strupcase(strmid(!version.os_family, 0, 3)) 
    152183      CASE thisOS of 
     
    163194                       , 'return' $ 
    164195                       , 'end'] 
    165 ; on les ecrit dans un programme 
     196; We write it in a program 
    166197      putfile, filename, globalcommand 
    167198    END 
     
    171202        return 
    172203      ENDIF 
    173 ; on recupere le nom du fichier 
     204; We recuperate the name of the file 
    174205      filename = xquestion('dans quel fichier bianire voulez vous sauver le widget ?', 'xxx_widget.dat') 
    175 ; on le complete par un .dat 
     206; We complete it by a .dat 
    176207      if rstrpos(filename, '.dat') NE strlen(filename)-4 then filename = filename+'.dat' 
    177208      filename = isafile(file = filename, io = homedir, /new) 
     
    195226      key_portrait = 1-optionsflag[index, 0] 
    196227      (*top_uvalue[1, findline(top_uvalue, 'optionsflag')])[index, *] = key_portrait 
    197 ; fenetre separee ou fenetre collee au widget ? 
     228; Separated windows or windows stuck to the widget? 
    198229      if widget_info(event.top, find_by_uname = 'graph') EQ 0 then BEGIN 
    199 ; on tue la fenetre 
     230; We delete the window 
    200231        graphid = extractatt(top_uvalue, 'graphid') 
    201232        widget_control, widget_info(graphid, /parent), /destroy 
    202 ; on la recree 
     233; We recreate it. 
    203234        basegraph = widget_base(title = 'xxx window',  group_leader = event.top, uvalue = event.top,  uname = 'basegraph') 
    204235        windsize = givewindowsize() 
     
    209240        widget_control, basegraph, /realize 
    210241        xmanager, 'xxx', basegraph, /no_block 
    211 ; on redessine ce qu''il y avait dedans 
    212 ; on recupere la liste des instructions 
     242; We redraw what their were into it 
     243; We recuperate the list of instructions 
    213244        globalcommand = extractatt(top_uvalue, 'globalcommand') 
    214 ; on complete par le premiere et les dernieres lignes du programme 
     245; We complete by first and last lines of the program 
    215246        createpro, globalcommand, filename = myuniquetmpdir + 'xxx2ps.pro' $ 
    216247                   , KWDLIST = ', NOERASE = noerase, POSTSCRIPT = postscript, PORTRAIT = portrait, LANDSCAPE = landscape' $ 
    217248                   , KWDUSED = ', /noerase, PORTRAIT = portrait' 
    218 ; on reattribue l''element graphid de la top_uvalue 
     249; We reattribute the graphic element of the top_value 
    219250        *top_uvalue[1, findline(top_uvalue, 'graphid')] = graphid 
    220251      ENDIF ELSE BEGIN 
    221252        extra = extractatt(top_uvalue, 'extra') 
    222253        xxx, CALLERWIDID = event.top, /redraw, _extra = extra 
    223         widget_control, event.top, /destroy ;on ferme le widget 
     254        widget_control, event.top, /destroy ;We shut the widget 
    224255      ENDELSE 
    225256    end 
     
    230261      flags = extractatt(top_uvalue, 'optionsflag') 
    231262      index = where(options EQ 'Overlay') 
    232 ; on change le flag sur Longitude / x index 
     263; We change the flag on Longitude / x index 
    233264      flag = 1-flags[index, numdessinin] & flag = flag[0] 
    234 ; on le reeatribue 
     265; We reattribute it 
    235266      (*top_uvalue[1, findline(top_uvalue, 'optionsflag')])[index, numdessinin] = flag 
    236267    end 
     
    241272      flags = extractatt(top_uvalue, 'optionsflag') 
    242273      index = where(options EQ 'Vecteur') 
    243 ; on change le flag sur Longitude / x index 
     274; We change the flag on Longitude / x index 
    244275      flag = 1-flags[index, numdessinin] & flag = flag[0] 
    245 ; on le reeatribue 
     276; We reattribute it 
    246277      (*top_uvalue[1, findline(top_uvalue, 'optionsflag')])[index, numdessinin] = flag 
    247278    end 
     
    252283      flags = extractatt(top_uvalue, 'optionsflag') 
    253284      index = where(options EQ 'Longitude / x index') 
    254 ; on change le flag sur Longitude / x index 
     285; We change the flag on Longitude / x index 
    255286      flag = 1-flags[index, numdessinin] & flag = flag[0] 
    256 ; on le reeatribue 
     287; We reattribute it 
    257288      (*top_uvalue[1, findline(top_uvalue, 'optionsflag')])[index, numdessinin] = flag 
    258 ; maintenant on va changer les sliders definissant la boxzoom 
     289; Now we will change sliders defining the boxzoom 
    259290      domainid = widget_info(event.top, find_by_uname = 'domain') 
    260291      boxzoom = (extractatt(top_uvalue, 'domaines'))[*, numdessinin] 
    261 ; on veut retrouver le type de grille qui est utilisee 
     292; We want to find the type of grid which is used 
    262293      currentfile = extractatt(top_uvalue, 'currentfile') 
    263294      listgrid = (*(extractatt(top_uvalue, 'fileparameters'))[currentfile]).listgrid 
     
    268299      vargrid = strupcase(listgrid[indexvar]) 
    269300      if flag EQ 0 then BEGIN   ; longitudes 
    270 ; on fait un domdef pour retrouver le lon1 lon2 correspondant a la 
    271 ; boxzoom definie sur le widget...  
     301; We do a domdef to find the lon1 lon2 corresponding to the boxzoom defined on the widget... 
    272302        domdef, boxzoom, gridtype = vargrid, /xindex $ 
    273303                , yindex = (flags[where(options EQ 'Latitude / y index'), numdessinin])[0] 
    274304        widget_control, domainid, set_value = [lon1, lon2, boxzoom[2:3]] 
    275305      ENDIF ELSE BEGIN          ; xindex 
    276 ; maintenant ion veut retrouver firstx, lastx correspondant a la 
    277 ; boxzoom definie sur le widget... 
     306; now we want to find firstx, lastx corresponding to the boxzoom defined on the widget... 
    278307        domdef, boxzoom, gridtype = vargrid $ 
    279308                , yindex = (flags[where(options EQ 'Latitude / y index'), numdessinin])[0] 
     
    281310        widget_control, domainid, set_value = [firstx, lastx, boxzoom[2:3]] 
    282311      ENDELSE 
    283 ; on met a jour la top_uvalue 
     312; We update the top_uvalue 
    284313      widget_control, domainid, get_value = boxzoom 
    285314      (*top_uvalue[1, findline(top_uvalue, 'domaines')])[*, numdessinin] = boxzoom 
     
    291320      flags = extractatt(top_uvalue, 'optionsflag') 
    292321      index = where(options EQ 'Latitude / y index') 
    293 ; on change le flag sur Latitude / y index 
     322; We change the flag on Latitude / y index 
    294323      flag = 1-flags[index, numdessinin] & flag = flag[0] 
    295 ; on le reeatribue 
     324; We reattribute it 
    296325      (*top_uvalue[1, findline(top_uvalue, 'optionsflag')])[index, numdessinin] = flag 
    297 ; maintenant on va changer les sliders definissant la boxzoom 
     326; Now we will change sliders defining the boxzoom 
    298327      domainid = widget_info(event.top, find_by_uname = 'domain') 
    299328      boxzoom = (extractatt(top_uvalue, 'domaines'))[*, numdessinin] 
    300 ; on veut retrouver le type de grille qui est utilisee 
     329; We want to find the type of grid which is used 
    301330      currentfile = extractatt(top_uvalue, 'currentfile') 
    302331      listgrid = (*(extractatt(top_uvalue, 'fileparameters'))[currentfile]).listgrid 
     
    307336      vargrid = strupcase(listgrid[indexvar]) 
    308337      if flag EQ 0 then BEGIN   ; latitudes 
    309 ; on fait un domdef pour retrouver le lat1 lat2 correspondant a la 
    310 ; boxzoom definie sur le widget...  
     338; We do a domdef to find the lat1 lat2 corresponding to the boxzoom defined on the widget... 
    311339        domdef, boxzoom, gridtype = vargrid, /yindex $ 
    312340                , xindex = (flags[where(options EQ 'Longitude / x index'), numdessinin])[0] 
    313341        widget_control, domainid, set_value = [boxzoom[0:1], lat1, lat2] 
    314342      ENDIF ELSE BEGIN          ; yindex 
    315 ; maintenant ion veut retrouver firsty, lasty correspondant a la 
    316 ; boxzoom definie sur le widget... 
     343; now we want to find firsty, lasty corresponding to the boxzoom defined on the widget... 
    317344        domdef, boxzoom, gridtype = vargrid $ 
    318345                , xindex = (flags[where(options EQ 'Longitude / x index'), numdessinin])[0] 
     
    320347        widget_control, domainid, set_value = [boxzoom[0:1], firsty, lasty] 
    321348      ENDELSE 
    322 ; on met a jour la top_uvalue 
     349; We update the top_uvalue 
    323350      widget_control, domainid, get_value = boxzoom 
    324351      (*top_uvalue[1, findline(top_uvalue, 'domaines')])[*, numdessinin] = boxzoom 
  • trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_bgroup.pro

    r134 r150  
    1 ; $Id$ 
    2 ; 
    3 ; Copyright (c) 1992-2005, Research Systems, Inc.  All rights reserved. 
    4 ;   Unauthorized reproduction prohibited. 
    5 ;+ 
    6 ; NAME: 
    7 ;   CW_BGROUP 
    8 ; 
    9 ; PURPOSE: 
    10 ;   CW_BGROUP is a compound widget that simplifies creating 
    11 ;   a base of buttons. It handles the details of creating the 
    12 ;   proper base (standard, exclusive, or non-exclusive) and filling 
    13 ;   in the desired buttons. Events for the individual buttons are 
    14 ;   handled transparently, and a CW_BGROUP event returned. This 
    15 ;   event can return any one of the following: 
    16 ;       - The Index of the button within the base. 
    17 ;       - The widget ID of the button. 
    18 ;       - The name of the button. 
    19 ;       - An arbitrary value taken from an array of User values. 
    20 ; 
    21 ; CATEGORY: 
    22 ;   Compound widgets. 
    23 ; 
    24 ; CALLING SEQUENCE: 
    25 ;       Widget = CW_BGROUP(Parent, Names) 
    26 ; 
    27 ;   To get or set the value of a CW_BGROUP, use the GET_VALUE and 
    28 ;   SET_VALUE keywords to WIDGET_CONTROL. The value of a CW_BGROUP 
    29 ;   is: 
    30 ; 
    31 ;       ----------------------------------------------- 
    32 ;       Type        Value 
    33 ;       ----------------------------------------------- 
    34 ;       normal      None 
    35 ;       exclusive       Index of currently set button 
    36 ;       non-exclusive   Vector indicating the position 
    37 ;               of each button (1-set, 0-unset) 
    38 ;       ----------------------------------------------- 
    39 ; 
    40 ; 
    41 ; INPUTS: 
    42 ;       Parent:     The ID of the parent widget. 
    43 ;   Names:      A string array, containing one string per button, 
    44 ;           giving the name of each button. 
    45 ; 
    46 ; KEYWORD PARAMETERS: 
    47 ; 
    48 ;   BUTTON_UVALUE:  An array of user values to be associated with 
    49 ;           each button and returned in the event structure. 
    50 ;   COLUMN:     Buttons will be arranged in the number of columns 
    51 ;           specified by this keyword. 
    52 ;   EVENT_FUNCT:    The name of an optional user-supplied event function 
    53 ;           for buttons. This function is called with the return 
    54 ;           value structure whenever a button is pressed, and 
    55 ;           follows the conventions for user-written event 
    56 ;           functions. 
    57 ;   EXCLUSIVE:  Buttons will be placed in an exclusive base, with 
    58 ;           only one button allowed to be selected at a time. 
    59 ;   FONT:       The name of the font to be used for the button 
    60 ;           titles. If this keyword is not specified, the default 
    61 ;           font is used. 
    62 ;   FRAME:      Specifies the width of the frame to be drawn around 
    63 ;           the base. 
    64 ;   IDS:        A named variable into which the button IDs will be 
    65 ;           stored, as a longword vector. 
    66 ;   LABEL_LEFT: Creates a text label to the left of the buttons. 
    67 ;   LABEL_TOP:  Creates a text label above the buttons. 
    68 ;   MAP:        If set, the base will be mapped when the widget 
    69 ;           is realized (the default). 
    70 ;   NONEXCLUSIVE:   Buttons will be placed in an non-exclusive base. 
    71 ;           The buttons will be independent. 
    72 ;   NO_RELEASE: If set, button release events will not be returned. 
    73 ;   RETURN_ID:  If set, the VALUE field of returned events will be 
    74 ;           the widget ID of the button. 
    75 ;   RETURN_INDEX:   If set, the VALUE field of returned events will be 
    76 ;           the zero-based index of the button within the base. 
    77 ;           THIS IS THE DEFAULT. 
    78 ;   RETURN_NAME:    If set, the VALUE field of returned events will be 
    79 ;           the name of the button within the base. 
    80 ;   ROW:        Buttons will be arranged in the number of rows 
    81 ;           specified by this keyword. 
    82 ;   SCROLL:     If set, the base will include scroll bars to allow 
    83 ;           viewing a large base through a smaller viewport. 
    84 ;   SET_VALUE:  The initial value of the buttons. This is equivalent 
    85 ;           to the later statement: 
    86 ; 
    87 ;           WIDGET_CONTROL, widget, set_value=value 
    88 ; 
    89 ;   SPACE:      The space, in pixels, to be left around the edges 
    90 ;           of a row or column major base. This keyword is 
    91 ;           ignored if EXCLUSIVE or NONEXCLUSIVE are specified. 
    92 ;   UVALUE:     The user value to be associated with the widget. 
    93 ;   UNAME:      The user name to be associated with the widget. 
    94 ;   XOFFSET:    The X offset of the widget relative to its parent. 
    95 ;   XPAD:       The horizontal space, in pixels, between children 
    96 ;           of a row or column major base. Ignored if EXCLUSIVE 
    97 ;           or NONEXCLUSIVE are specified. 
    98 ;   XSIZE:      The width of the base. 
    99 ;   X_SCROLL_SIZE:  The width of the viewport if SCROLL is specified. 
    100 ;   YOFFSET:    The Y offset of the widget relative to its parent. 
    101 ;   YPAD:       The vertical space, in pixels, between children of 
    102 ;           a row or column major base. Ignored if EXCLUSIVE 
    103 ;           or NONEXCLUSIVE are specified. 
    104 ;   YSIZE:      The height of the base. 
    105 ;   Y_SCROLL_SIZE:  The height of the viewport if SCROLL is specified. 
    106 ; 
    107 ; OUTPUTS: 
    108 ;       The ID of the created widget is returned. 
    109 ; 
    110 ; SIDE EFFECTS: 
    111 ;   This widget generates event structures with the following definition: 
    112 ; 
    113 ;       event = { ID:0L, TOP:0L, HANDLER:0L, SELECT:0, VALUE:0 } 
    114 ; 
    115 ;   The SELECT field is passed through from the button event. VALUE is 
    116 ;   either the INDEX, ID, NAME, or BUTTON_UVALUE of the button, 
    117 ;   depending on how the widget was created. 
    118 ; 
    119 ; RESTRICTIONS: 
    120 ;   Only buttons with textual names are handled by this widget. 
    121 ;   Bitmaps are not understood. 
    122 ; 
    123 ; MODIFICATION HISTORY: 
    124 ;   15 June 1992, AB 
    125 ;   7 April 1993, AB, Removed state caching. 
    126 ;   6 Oct. 1994, KDB, Font keyword is not applied to the label. 
    127 ;       10 FEB 1995, DJC  fixed bad bug in event procedure, getting 
    128 ;                         id of stash widget. 
    129 ;   11 April 1995, AB Removed Motif special cases. 
    130 ;- 
    131  
    132  
    1331pro CW_BGROUP_SETV, id, value 
    1342  compile_opt hidden, idl2, strictarrsubs 
     
    22492 
    22593 
     94 
     95 
     96; 
     97;+ 
     98; @file_comments 
     99; CW_BGROUP is a compound widget that simplifies creating 
     100; a base of buttons. It handles the details of creating the 
     101; proper base (standard, exclusive, or non-exclusive) and filling 
     102; in the desired buttons. Events for the individual buttons are 
     103; handled transparently, and a CW_BGROUP event returned. This 
     104; event can return any one of the following: 
     105;      - The Index of the button within the base. 
     106;      - The widget ID of the button. 
     107;      - The name of the button. 
     108;      - An arbitrary value taken from an array of User values. 
     109; 
     110; @categories 
     111; Compound widgets. 
     112; 
     113; @param PARENT {in}{required} 
     114; The ID of the parent widget. 
     115;  
     116; @param NAMES 
     117; A string array, containing one string per button, 
     118; giving the name of each button. 
     119; 
     120; @keyword BUTTON_UVALUE 
     121; An array of user values to be associated with 
     122; each button and returned in the event structure. 
     123;  
     124; @keyword COLUMN 
     125; Buttons will be arranged in the number of columns 
     126; specified by this keyword. 
     127;  
     128; @keyword EVENT_FUNCT 
     129; The name of an optional user-supplied event function 
     130; for buttons. This function is called with the return 
     131; value structure whenever a button is pressed, and 
     132; follows the conventions for user-written event functions. 
     133;  
     134; @keyword EXCLUSIVE 
     135; Buttons will be placed in an exclusive base, with 
     136; only one button allowed to be selected at a time. 
     137;  
     138; @keyword FONT 
     139; The name of the font to be used for the button 
     140; titles. If this keyword is not specified, the default 
     141; font is used. 
     142;  
     143; @keyword FRAME 
     144; Specifies the width of the frame to be drawn around the base. 
     145;  
     146; @keyword IDS 
     147; A named variable into which the button IDs will be 
     148; stored, as a longword vector. 
     149;  
     150; @keyword LABEL_LEFT 
     151; Creates a text label to the left of the buttons. 
     152;  
     153; @keyword LABEL_TOP 
     154; Creates a text label above the buttons. 
     155;  
     156; @keyword MAP 
     157; If set, the base will be mapped when the widget 
     158; is realized (the default). 
     159;  
     160; @keyword NONEXCLUSIVE 
     161; Buttons will be placed in an non-exclusive base. 
     162; The buttons will be independent. 
     163;  
     164; @keyword NO_RELEASE 
     165; If set, button release events will not be returned. 
     166;  
     167; @keyword RETURN_ID 
     168; If set, the VALUE field of returned events will be 
     169; the widget ID of the button. 
     170;  
     171; @keyword RETURN_INDEX 
     172; If set, the VALUE field of returned events will be 
     173; the zero-based index of the button within the base. 
     174; THIS IS THE DEFAULT. 
     175;  
     176; @keyword RETURN_NAME 
     177; If set, the VALUE field of returned events will be 
     178; the name of the button within the base. 
     179;  
     180; @keyword ROW 
     181; Buttons will be arranged in the number of rows 
     182; specified by this keyword. 
     183;  
     184; @keyword SCROLL 
     185; If set, the base will include scroll bars to allow 
     186; viewing a large base through a smaller viewport. 
     187;  
     188; @keyword SET_VALUE 
     189; The initial value of the buttons. This is equivalent 
     190; to the later statement: 
     191; 
     192; WIDGET_CONTROL, widget, set_value=value 
     193; 
     194; @keyword SPACE 
     195; The space, in pixels, to be left around the edges 
     196; of a row or column major base. This keyword is 
     197; ignored if EXCLUSIVE or NONEXCLUSIVE are specified. 
     198;  
     199; @keyword UVALUE 
     200; The user value to be associated with the widget. 
     201;  
     202; @keyword UNAME 
     203; The user name to be associated with the widget. 
     204;  
     205; @keyword XOFFSET 
     206; The X offset of the widget relative to its parent. 
     207;  
     208; @keyword XPAD 
     209; The horizontal space, in pixels, between children 
     210; of a row or column major base. Ignored if EXCLUSIVE 
     211; or NONEXCLUSIVE are specified. 
     212;  
     213; @keyword XSIZE 
     214; The width of the base. 
     215; @keyword X_SCROLL_SIZE 
     216; The width of the viewport if SCROLL is specified. 
     217;  
     218; @keyword YOFFSET 
     219; The Y offset of the widget relative to its parent. 
     220;  
     221; @keyword YPAD 
     222; The vertical space, in pixels, between children of 
     223; a row or column major base. Ignored if EXCLUSIVE 
     224; or NONEXCLUSIVE are specified. 
     225;  
     226; @keyword YSIZE 
     227; The height of the base. 
     228;  
     229; @keyword Y_SCROLL_SIZE 
     230; The height of the viewport if SCROLL is specified. 
     231; 
     232; @returns 
     233; The ID of the created widget is returned. 
     234; 
     235; @restrictions 
     236; This widget generates event structures with the following definition: 
     237; 
     238;       event = { ID:0L, TOP:0L, HANDLER:0L, SELECT:0, VALUE:0 } 
     239; 
     240; The SELECT field is passed through from the button event. VALUE is 
     241; either the INDEX, ID, NAME, or BUTTON_UVALUE of the button, 
     242; depending on how the widget was created. 
     243; 
     244; @restrictions 
     245; Only buttons with textual names are handled by this widget. 
     246; Bitmaps are not understood. 
     247; 
     248; @history 
     249; 15 June 1992, AB 
     250; 7 April 1993, AB, Removed state caching. 
     251; 6 Oct. 1994, KDB, Font keyword is not applied to the label. 
     252; 10 FEB 1995, DJC  fixed bad bug in event procedure, getting 
     253;                         id of stash widget. 
     254; 11 April 1995, AB Removed Motif special cases. 
     255; 
     256; Copyright (c) 1992-2005, Research Systems, Inc.  All rights reserved. 
     257;   Unauthorized reproduction prohibited. 
     258; 
     259; @version 
     260; $Id$ 
     261; 
     262;- 
    226263 
    227264 
  • trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_calendar.pro

    r146 r150  
    276276;---------------------------------------------------------------------- 
    277277;---------------------------------------------------------------------- 
     278;+ 
     279; @file_comments 
     280; 
     281; 
     282; @categories 
     283; 
     284;  
     285; @param PARENT {in}{required} 
     286; The widget ID of the parent widget. 
     287; 
     288; @param CALENDAR 
     289; 
     290; 
     291; @param JDATE0 
     292; 
     293;  
     294; @keyword CALTYPE 
     295;  
     296;  
     297; @keyword FAKECAL 
     298; 
     299;  
     300; @keyword UVALUE 
     301; 
     302;  
     303; @keyword UNAME 
     304; 
     305;  
     306; @keyword _EXTRA 
     307; Used to pass your keywords 
     308;  
     309; @returns 
     310;  
     311;  
     312; @uses 
     313;  
     314;  
     315; @restrictions 
     316;  
     317;  
     318; @examples 
     319;  
     320;  
     321; @history 
     322;  
     323;  
     324; @version  
     325; $Id$ 
     326; 
     327; @todo 
     328; seb 
     329;  
     330;- 
    278331FUNCTION cw_calendar, parent, calendar, jdate0, CALTYPE = CALTYPE, FAKECAL = fakecal, UVALUE = uvalue, UNAME = uname, _extra = ex 
    279332; 
  • trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_combobox_pm.pro

    r134 r150  
    1 ;------------------------------------------------------------ 
    2 ;------------------------------------------------------------ 
    3 ;------------------------------------------------------------ 
    4 ;+ 
    5 ; NAME: cw_combobox_pm 
    6 ; 
    7 ; PURPOSE: widget equivalent a WIDGET_COMBOBOX sauf qu'en plus on 
    8 ; dispose de 2 bouttons + et - pour deplacer le widget de +/- 1. 
    9 ; 
    10 ; CATEGORY: compound widget (aide a l''ecriture des widgets) 
    11 ; 
    12 ; CALLING SEQUENCE: id=cw_combobox_pm(parent) 
    13 ;  
    14 ; INPUTS: 
    15 ;         Parent: The widget ID of the parent widget. 
    16 ; 
    17 ; KEYWORD PARAMETERS:tous ceux de WIDGET_COMBOBOX 
    18 ; 
    19 ; OUTPUTS: 
    20 ;         The returned value of this function is the widget ID of the 
    21 ;         newly-created animation widget. 
    22 ; 
    23 ; COMMON BLOCKS: none 
    24 ; 
    25 ; SIDE EFFECTS: 
    26 ; 
    27 ;     Widget Events Returned by Combobox Widgets 
    28 ; 
    29 ;   Pressing the mouse button while the mouse cursor is over an 
    30 ;   element of a combobox widget causes the widget to change the label 
    31 ;   on the combobox button and to generate an event. The appearance of 
    32 ;   any previously selected element is restored to normal at the same 
    33 ;   time. The event structure returned by the WIDGET_EVENT function is 
    34 ;   defined by the following statement: 
    35 ; 
    36 ;   { CW_COMBOBOX_PM, ID:0L, TOP:0L, HANDLER:0L, INDEX:0L, OUT:0 } 
    37 ; 
    38 ;   The first three fields are the standard fields found in every 
    39 ;   widget event. 
    40 ;   INDEX returns the index of the selected item. This can be used to 
    41 ;   index the array of names originally used to set the widget''s 
    42 ;   value 
    43 ;   OUT:c''est un entier qui peut prendre 3 valeurs: 
    44 ;       1 : si on appuie sur + alors que l''index est deja aux max. rq: 
    45 ;       ds ce cas l''index reste au max 
    46 ;       -1: si on appuie sur - alors que l''index est deja aux min. rq: 
    47 ;       ds ce cas l''index reste au min 
    48 ;       0 : ds les autres cas! 
    49 ; 
    50 ;   Keywords to WIDGET_CONTROL 
    51 ; 
    52 ;   A number of keywords to the WIDGET_CONTROL procedure affect the 
    53 ;   behavior of cw_slider_pm widget: GET_VALUE and SET_VALUE. 
    54 ;       1) GET_VALUE 
    55 ;   widget_control,wid_id,get_value=resultat 
    56 ;   retourne ds la variable resultat une structure de 3 elements dont 
    57 ;   les noms sont inspires des mots cles que l''on peut passer a 
    58 ;   widget_control qd on utilise WIDGET_COMBOBOX: 
    59 ;            COMBOBOX_NUMBER: the number of elements currently 
    60 ;            contained in the specified combobox widget. 
    61 ;            COMBOBOX_SELECT: the zero-based number of the 
    62 ;            currently-selected element (i.e., the currently-displayed 
    63 ;            element) in the specified combobox widget. 
    64 ;            DYNAMIC_RESIZE: a True value (1) if the widget specified 
    65 ;            by Widget_ID is a button, combobox, or label widget that 
    66 ;            has had its DYNAMIC_RESIZE attribute set. Otherwise, 
    67 ;            False (0) is returned. 
    68 ;       2) SET_VALUE 
    69 ;   widget_control,wid_id,set_value=impose 
    70 ;   permet de modifier l''etat de la combobox comme on peut le faire 
    71 ;   pour WIDGET_COMBOBOX Impose peut etre: 
    72 ;       a) The contents of the list widget (string or string array) 
    73 ;       b) une structure qui peut avoir comme elements (de 1 a 3): 
    74 ;            DYNAMIC_RESIZE:Set this keyword to activate (if set to 1) 
    75 ;            or deactivate (if set to 0) dynamic resizing of the 
    76 ;            specified CW_COMBOBOX_PM widget (see the documentation 
    77 ;            for the DYNAMIC_RESIZE keyword to WIDGET_COMBOBOX 
    78 ;            procedure for more information about dynamic widget 
    79 ;            resizing). 
    80 ;            COMBOBOX_SELECT:Set this keyword to return the zero-based 
    81 ;            number of the currently-selected element (i.e., the 
    82 ;            currently-displayed element) in the specified combobox 
    83 ;            widget. 
    84 ;            VALUE: The contents of the list widget (string or string 
    85 ;            array) 
    86 ; 
    87 ; RESTRICTIONS: 
    88 ; 
    89 ; EXAMPLE: cf utiliser le programme founit i-dessous: testwid et la 
    90 ; procedure associee, testwid_event. 
    91 ; 
    92 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) 
    93 ;                      6/9/1999 
    94 ; 
    95 ;- 
    96 ;------------------------------------------------------------ 
    97 ;------------------------------------------------------------ 
    98 ;------------------------------------------------------------ 
    991; testwid, value=strtrim(indgen(10),2) 
    1002; PRO testwid_event, event 
     
    212114                  , INDEX:index, STR:cmbbtxt, OUT:out} 
    213115end 
    214 ;---------------------------------------------------------------------- 
     116;------------------------------------------------------------ 
     117;------------------------------------------------------------ 
     118;------------------------------------------------------------ 
     119;+ 
     120; 
     121; @file_comments 
     122; Like WIDGET_COMBOBOX but here, their are 2 buttons + and - to move the widget from +/- 1 
     123; 
     124; @categories 
     125; compound widget 
     126;  
     127; @param PARENT {in}{required} 
     128; The widget ID of the parent widget. 
     129; 
     130; @keyword COLUMN 
     131; Buttons will be arranged in the number of columns 
     132; specified by this keyword. 
     133;  
     134; @keyword ROW 
     135; Buttons will be arranged in the number of rows 
     136; specified by this keyword. 
     137;  
     138; @keyword UVALUE 
     139; The user value to be associated with the widget. 
     140;  
     141; @keyword UNAME 
     142; The user name to be associated with the widget. 
     143;  
     144; @keyword VALUE 
     145; 
     146; 
     147; @keyword _EXTRA 
     148; Used to pass your keywords 
     149; 
     150; @returns 
     151; The returned value of this function is the widget ID of the 
     152; newly-created animation widget. 
     153; 
     154; @restrictions 
     155; 
     156;     Widget Events Returned by Combobox Widgets 
     157; 
     158;   Pressing the mouse button while the mouse cursor is over an 
     159;   element of a combobox widget causes the widget to change the label 
     160;   on the combobox button and to generate an event. The appearance of 
     161;   any previously selected element is restored to normal at the same 
     162;   time. The event structure returned by the WIDGET_EVENT function is 
     163;   defined by the following statement: 
     164; 
     165;   { CW_COMBOBOX_PM, ID:0L, TOP:0L, HANDLER:0L, INDEX:0L, OUT:0 } 
     166; 
     167;   The first three fields are the standard fields found in every 
     168;   widget event. 
     169;   INDEX returns the index of the selected item. This can be used to 
     170;   index the array of names originally used to set the widget''s 
     171;   value 
     172;   OUT:It is an integer which can take 3 values:  
     173;       1 : If we press + when the index is already at the max 
     174;       Comment: In this case, the index stay at the max 
     175;       -1: If we press - when the index is already at the min 
     176;       Comment: In this case, the index stay at the min 
     177;       0 : In other cases 
     178; 
     179;   Keywords to WIDGET_CONTROL 
     180; 
     181;   A number of keywords to the WIDGET_CONTROL procedure affect the 
     182;   behavior of cw_slider_pm widget: GET_VALUE and SET_VALUE. 
     183;       1) GET_VALUE 
     184;   widget_control,wid_id,get_value=resultat 
     185;   Send back, in the result variable, a structure of 3 elements whose  
     186;   names are inspired by keywords we can pass at widget_control when 
     187;   we use WIDGET_COMBOBOX: 
     188;            COMBOBOX_NUMBER: the number of elements currently 
     189;            contained in the specified combobox widget. 
     190;            COMBOBOX_SELECT: the zero-based number of the 
     191;            currently-selected element (i.e., the currently-displayed 
     192;            element) in the specified combobox widget. 
     193;            DYNAMIC_RESIZE: a True value (1) if the widget specified 
     194;            by Widget_ID is a button, combobox, or label widget that 
     195;            has had its DYNAMIC_RESIZE attribute set. Otherwise, 
     196;            False (0) is returned. 
     197;       2) SET_VALUE 
     198;   widget_control,wid_id,set_value=impose 
     199;   Allows to modify the state of the combobox like we can do it for  
     200;   WIDGET_COMBOBOX. May impose:  
     201;       a) The contents of the list widget (string or string array) 
     202;       b) A structure which can have for elements (from 1 to 3):  
     203;            DYNAMIC_RESIZE:Set this keyword to activate (if set to 1) 
     204;            or deactivate (if set to 0) dynamic resizing of the 
     205;            specified CW_COMBOBOX_PM widget (see the documentation 
     206;            for the DYNAMIC_RESIZE keyword to WIDGET_COMBOBOX 
     207;            procedure for more information about dynamic widget 
     208;            resizing). 
     209;            COMBOBOX_SELECT:Set this keyword to return the zero-based 
     210;            number of the currently-selected element (i.e., the 
     211;            currently-displayed element) in the specified combobox 
     212;            widget. 
     213;            VALUE: The contents of the list widget (string or string 
     214;            array) 
     215; 
     216; @examples 
     217; See the program provided above (testwid and the associated procedure, testwid_event). 
     218; 
     219; @history 
     220; Sebastien Masson (smasson@lodyc.jussieu.fr) 
     221;                      6/9/1999 
     222; 
     223; @version 
     224; $Id$ 
     225; 
     226;- 
     227;------------------------------------------------------------ 
     228;------------------------------------------------------------ 
     229;------------------------------------------------------------ 
    215230FUNCTION cw_combobox_pm, parent, VALUE = value, UVALUE = uvalue, UNAME = uname, ROW = row, COLUMN = column, _extra = ex 
    216231; 
  • trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_domain.pro

    r134 r150  
    5353   change = changegrid(currentgrid) 
    5454;------------------------------------------------ 
    55 ; quel est le type de boxzoom? 
     55; What is the type of boxzoom ? 
    5656   currentplot = (extractatt(top_uvalue, 'smallin'))[2]-1 
    5757   options = extractatt(top_uvalue, 'options')    
     
    6363    ytype = 'geographic' ELSE ytype = 'index' 
    6464;------------------------------------------------ 
    65 ; comment completer la boxzoom? 
     65; How to complete the boxzoom ? 
    6666   IF xtype EQ  'geographic' then begin 
    6767      lonn1 = lon1 
     
    114114   strict = uvalue.strict 
    115115; 
    116 ; les longitudes 
    117 ; 
    118 ; min et max possible 
     116; Longitudes 
     117; 
     118; Possible min and max 
    119119   if xtype EQ 'geographic' then BEGIN 
    120120      min = floor(min([glamt,glamf], max = max)) 
     
    124124      max = jpi-1 
    125125   ENDELSE 
    126 ; les id des widgets 
     126; widgets's id 
    127127   lon1id = widget_info(id,find_by_uname = 'lon1') 
    128128   lon2id = widget_info(id,find_by_uname = 'lon2') 
    129 ; doit-on changer de type d''axe x: longitude/index 
     129; Do we have to change the type of x axis: longitude/index 
    130130   lonbase = widget_info(id,find_by_uname = 'lonbase') 
    131131   widget_control, lonbase,  get_uvalue = lonbase_uvalue 
    132132   if lonbase_uvalue.name NE xtype then BEGIN 
    133133      widget_control, lonbase, update = 0 
    134 ; on casse tout 
     134; We break everything 
    135135      widget_control, lon1id, /destroy 
    136136      widget_control, lon2id, /destroy 
    137 ; on reconstruit 
     137; We reconstruct 
    138138      lon1id = cw_slider_pm(lonbase,value=min > boxzoom[0] < ((boxzoom[1] < max)-keyword_set(strict)) $ 
    139139                            , uvalue={name:'lon1', strict:keyword_set(strict)},uname ='lon1' $ 
     
    147147      widget_control, lonbase, update = 1 
    148148   ENDIF ELSE BEGIN 
    149 ; la nouvelle valeur qu''ils vont avoir 
     149; The new value  they will have 
    150150      cursorvalue1 = min > boxzoom[0] < ((boxzoom[1] < max)-strict) 
    151151      cursorvalue2 = ((min > boxzoom[0])+strict) > boxzoom[1] < max 
    152 ; on change les bornes des slider 
     152; We change slider's boundaries 
    153153      widget_control, lon1id, set_value = {slider_min:min, slider_max:cursorvalue2-strict} 
    154154      widget_control, lon2id, set_value = {slider_min:cursorvalue1+strict, slider_max:max} 
    155 ; on attribut la nouvelle valeur 
     155; We attribute the new value 
    156156      widget_control, lon1id , set_value = cursorvalue1 
    157157      widget_control, lon2id, set_value = cursorvalue2 
    158158   ENDELSE 
    159159; 
    160 ; les latitudes 
    161 ; 
    162 ; min et max possible 
     160; Latitudes 
     161; 
     162; Possible min and max 
    163163   if ytype EQ 'geographic' then begin 
    164164      min = floor(min([gphit,gphif], max = max)) 
     
    168168      max = jpj-1 
    169169   ENDELSE 
    170 ; doit-on changer de type d''axe y: latitude/index 
     170; Do we have to change the type of y axis: latitude/index 
    171171   latbase = widget_info(id,find_by_uname = 'latbase') 
    172172   widget_control, latbase,  get_uvalue = latbase_uvalue 
     
    219219      widget_control, dthlv2id, set_value = {value:strtrim(gdep2, 1)} 
    220220   ENDIF ELSE gdep2 = gdep1+1 
    221 ; on s''assure que les profs donnees contiennent bien au moins un 
    222 ; niveau. 
     221; We make sure that given depthes contain at least one level. 
    223222   if boxzoom[4] GT boxzoom[5] then begin 
    224223      rien = boxzoom[4] 
     
    240239      boxzoom[5] = boxzoom[4]+1 
    241240   endif 
    242 ; maintenant que les values et les indexes sont definis proprement, 
    243 ; on peut les appliquer 
     241; Now, values and indexes are proprely defined. 
     242; So we can apply them 
    244243   widget_control, dthlv1id, set_value = {combobox_select:indice1} 
    245244   widget_control, dthlv2id, set_value = {combobox_select:indice2} 
    246 ; controler les min et les max des sliders... 
     245; control mins and maxs of sliders... 
    247246   if indice1 EQ 0 then min1 = 0 ELSE min1 = gdep2[indice1-1] 
    248247   max1 = (min1+1) > gdep1[indice2] 
     
    313312         depth2id = widget_info(event.handler,find_by_uname = 'depth2') 
    314313         dthlv2id = widget_info(event.handler,find_by_uname = 'dthlv2') 
    315 ; faut-il changer dthlv2 ? 
     314; Do we have to change dthlv2 ? 
    316315         widget_control, event.id, get_value = dthlv1_value 
    317316         gdep1 = fix(dthlv1_value.combobox_value) 
     
    319318         gdep2 = fix(dthlv2_value.combobox_value) 
    320319         if dthlv2_value.combobox_index LT event.index then BEGIN 
    321 ; on redefinie la valeur de dthlv2id 
     320; We redefine the dthlv2id's value 
    322321            widget_control, dthlv2id, set_value = {combobox_select:event.index} 
    323 ; donc on redefinit la valeur et le max du slider 2 
     322; So we redefine the value and the max of the slider 2 
    324323            if event.index EQ jpk-1 then BEGIN  
    325324               max = max([gdept, gdepw]) 
     
    329328            widget_control, depth2id $ 
    330329             , set_value = {slider_max:max, value:gdep2[event.index]} 
    331 ; du coup on redefinie donc le max du slider 1  
     330; So we redefine the max of the slider 1 
    332331            widget_control, depth1id, set_value = {slider_max:gdep1[event.index]} 
    333332         END  
    334 ; on redefinie la valeur et le min du slider depth 1 
     333; We redefine the value and the min of the slider depth1  
    335334         if event.index EQ 0 then min = 0 ELSE min = gdep1[event.index-1]+1 
    336335         widget_control, depth1id, set_value = {slider_min:min, value:gdep1[event.index]} 
    337 ; du coup on change aussi la valeur du min du slider depth 2 
     336; S we change the value of the min of the slider depth 2 
    338337         widget_control, depth2id, set_value = {slider_min:gdep1[event.index]+1} 
    339338      END 
     
    343342         depth2id = widget_info(event.handler,find_by_uname = 'depth2') 
    344343         dthlv1id = widget_info(event.handler,find_by_uname = 'dthlv1') 
    345 ; faut-il changer dthlv1 ? 
     344; Do we have to change dthlv1 ? 
    346345         widget_control, dthlv1id, get_value = dthlv1_value 
    347346         gdep1 = fix(dthlv1_value.combobox_value) 
     
    349348         gdep2 = fix(dthlv2_value.combobox_value) 
    350349         if dthlv1_value.combobox_index GT event.index then BEGIN 
    351 ; on redefinie la valeur de dthlv1id 
     350; We redfine the value of dthlv1id 
    352351            widget_control, dthlv1id, set_value = {combobox_select:event.index} 
    353 ; donc on redefinit la valeur et le min du slider 1 
     352; So we redefine the value and the min of the slider 1 
    354353            if event.index EQ 0 then min = 0 ELSE min = gdep2[event.index-1] 
    355354            widget_control, depth1id $ 
    356355             , set_value = {slider_min:min, value:gdep1[event.index]} 
    357 ; du coup on redefinie donc le min du slider 2 
     356; Se we redefine the min of the slider 2 
    358357            widget_control, depth2id, set_value = {slider_min:gdep2[event.index]} 
    359358         END  
    360 ; on redefinie la valeur et le max du slider depth 2 
     359; We redefine the value and the max of the slider depth 2 
    361360         if event.index EQ jpk-1 then BEGIN  
    362361            max = max([gdept, gdepw]) 
     
    365364         ENDIF ELSE max = gdep2[event.index+1]-1 
    366365         widget_control, depth2id, set_value = {slider_max:max, value:gdep2[event.index]} 
    367 ; du coup on change aussi la valeur du max du slider depth 1 
     366; So we change the value of the max of the slider depth 1 
    368367         widget_control, depth1id, set_value = {slider_max:gdep2[event.index]-1} 
    369368      END 
     
    372371         depth2id = widget_info(event.handler,find_by_uname = 'depth2') 
    373372         dthlv1id = widget_info(event.handler,find_by_uname = 'dthlv1') 
    374 ; doit-on changer dthlv1 ? 
     373; Do we have to change dthlv1 ? 
    375374         widget_control, dthlv1id, get_value = dthlv1_value 
    376375         gdep1 = fix(dthlv1_value.combobox_value) 
     
    378377         indice = indice < (jpk-1) 
    379378         if indice NE dthlv1_value.combobox_index then begin 
    380 ; on change le min de depth2 
     379; We change the min of depth2 
    381380            widget_control, depth2id, set_value = {slider_min:gdep1[indice]+1} 
    382 ; on redefinie la valeur de dthlv1id 
     381; We redefine the value of dthlv1id 
    383382            widget_control, dthlv1id, set_value = {combobox_select:indice} 
    384 ; donc on redefinit le min du slider 1 
     383; So we redefine the min of the slider 1 
    385384            if indice EQ 0 then min = 0 ELSE min = gdep1[indice-1]+1 
    386385            widget_control, event.id, set_value = {slider_min:min} 
     
    391390         depth1id = widget_info(event.handler,find_by_uname = 'depth1') 
    392391         dthlv2id = widget_info(event.handler,find_by_uname = 'dthlv2') 
    393 ; doit-on changer dthlv2 ? 
     392; Do we have to change dthlv2 ? 
    394393         widget_control, dthlv2id, get_value = dthlv2_value 
    395394         gdep2 = fix(dthlv2_value.combobox_value) 
     
    397396         indice = 0 > (indice-1) 
    398397         if indice NE dthlv2_value.combobox_index then begin 
    399 ; on change le max de depth1 
     398; We change the min of depth1 
    400399            widget_control, depth1id, set_value = {slider_max:gdep2[indice]-1} 
    401 ; on redefinie la valeur de dthlv2id 
     400; We redefine the value of dthlv2id 
    402401            widget_control, dthlv2id, set_value = {combobox_select:indice} 
    403 ; donc on redefinit le max du slider 2 
     402; So we redefine the min of the slider 2 
    404403            if indice EQ jpk-1 then BEGIN  
    405404               max = max([gdept, gdepw]) 
     
    418417end 
    419418;********************************************************************* 
     419;+ 
     420; @file_comments 
     421; 
     422; 
     423; @categories 
     424; 
     425;  
     426; @param PARENT {in}{required} 
     427; The widget ID of the parent widget. 
     428;  
     429; @keyword UVALUE 
     430; The user value to be associated with the widget. 
     431;  
     432; @keyword UNAME 
     433; The user name to be associated with the widget. 
     434;  
     435; @keyword STRICT 
     436; 
     437; 
     438; @keyword UNZOOM 
     439; 
     440; 
     441; @keyword BOXZOOM 
     442; Vector indicating the geographic zone on which we want to cut the map.  
     443; If BOXZOOM has :  
     444;   1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] 
     445;   2 elements: The extraction is made on [lon1, lon2, lat1, lat2, boxzoom[0],boxzoom[1]] 
     446;   4 elements: The extraction is made on [Boxzoom, 0, max([gdept, gdepw])] 
     447;   5 elements: The extraction is made on [Boxzoom[0:3], 0, Boxzoom[4]] 
     448;   6 elements: The extraction is made on Boxzoom  
     449; Where lon1, lon2,lat1,lat2 are global variables defined at the last domdef! 
     450; 
     451; @keyword _EXTRA 
     452; Used to pass your keywords 
     453;  
     454; @returns 
     455;  
     456;  
     457; @uses 
     458;  
     459;  
     460; @restrictions 
     461;  
     462;  
     463; @examples 
     464;  
     465;  
     466; @history 
     467;  
     468;  
     469; @version  
     470; $Id$ 
     471; 
     472; @todo 
     473; seb: Documenter 
     474;  
     475;- 
    420476FUNCTION cw_domain, parent, BOXZOOM = boxzoom, STRICT = strict, UVALUE = uvalue, UNAME = uname, UNZOOM = unzoom, _extra = ex 
    421477; 
     
    426482@cm_4data 
    427483; 
    428 ; def de la boxzoom 
     484; Definition of the boxzoom 
    429485  Case N_Elements(Boxzoom) OF 
    430486    0:boxzoom = [lon1, lon2, lat1, lat2 $ 
  • trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_droplist_pm.pro

    r134 r150  
    1 ;------------------------------------------------------------ 
    2 ;------------------------------------------------------------ 
    3 ;------------------------------------------------------------ 
    4 ;+ 
    5 ; NAME: cw_droplist_pm 
    6 ; 
    7 ; PURPOSE: widget equivalent a WIDGET_DROPLIST sauf qu'en plus on 
    8 ; dispose de 2 bouttons + et - pour deplacer le widget de +/- 1. 
    9 ; 
    10 ; CATEGORY: compound widget (aide a l''ecriture des widgets) 
    11 ; 
    12 ; CALLING SEQUENCE: id=cw_droplist_pm(parent) 
    13 ;  
    14 ; INPUTS: 
    15 ;         Parent: The widget ID of the parent widget. 
    16 ; 
    17 ; KEYWORD PARAMETERS:tous ceux de WIDGET_DROPLIST 
    18 ; 
    19 ; OUTPUTS: 
    20 ;         The returned value of this function is the widget ID of the 
    21 ;         newly-created animation widget. 
    22 ; 
    23 ; COMMON BLOCKS: none 
    24 ; 
    25 ; SIDE EFFECTS: 
    26 ; 
    27 ;     Widget Events Returned by Droplist Widgets 
    28 ; 
    29 ;   Pressing the mouse button while the mouse cursor is over an 
    30 ;   element of a droplist widget causes the widget to change the label 
    31 ;   on the droplist button and to generate an event. The appearance of 
    32 ;   any previously selected element is restored to normal at the same 
    33 ;   time. The event structure returned by the WIDGET_EVENT function is 
    34 ;   defined by the following statement: 
    35 ; 
    36 ;   { CW_DROPLIST_PM, ID:0L, TOP:0L, HANDLER:0L, INDEX:0L, OUT:0 } 
    37 ; 
    38 ;   The first three fields are the standard fields found in every 
    39 ;   widget event. 
    40 ;   INDEX returns the index of the selected item. This can be used to 
    41 ;   index the array of names originally used to set the widget''s 
    42 ;   value 
    43 ;   OUT:c''est un entier qui peut prendre 3 valeurs: 
    44 ;       1 : si on appuie sur + alors que l''index est deja aux max. rq: 
    45 ;       ds ce cas l''index reste au max 
    46 ;       -1: si on appuie sur - alors que l''index est deja aux min. rq: 
    47 ;       ds ce cas l''index reste au min 
    48 ;       0 : ds les autres cas! 
    49 ; 
    50 ;   Keywords to WIDGET_CONTROL 
    51 ; 
    52 ;   A number of keywords to the WIDGET_CONTROL procedure affect the 
    53 ;   behavior of cw_slider_pm widget: GET_VALUE and SET_VALUE. 
    54 ;       1) GET_VALUE 
    55 ;   widget_control,wid_id,get_value=resultat 
    56 ;   retourne ds la variable resultat une structure de 3 elements dont 
    57 ;   les noms sont inspires des mots cles que l''on peut passer a 
    58 ;   widget_control qd on utilise WIDGET_DROPLIST: 
    59 ;            DROPLIST_NUMBER: the number of elements currently 
    60 ;            contained in the specified droplist widget. 
    61 ;            DROPLIST_SELECT: the zero-based number of the 
    62 ;            currently-selected element (i.e., the currently-displayed 
    63 ;            element) in the specified droplist widget. 
    64 ;            DYNAMIC_RESIZE: a True value (1) if the widget specified 
    65 ;            by Widget_ID is a button, droplist, or label widget that 
    66 ;            has had its DYNAMIC_RESIZE attribute set. Otherwise, 
    67 ;            False (0) is returned. 
    68 ;       2) SET_VALUE 
    69 ;   widget_control,wid_id,set_value=impose 
    70 ;   permet de modifier l''etat de la droplist comme on peut le faire 
    71 ;   pour WIDGET_DROPLIST Impose peut etre: 
    72 ;       a) The contents of the list widget (string or string array) 
    73 ;       b) une structure qui peut avoir comme elements (de 1 a 3): 
    74 ;            DYNAMIC_RESIZE:Set this keyword to activate (if set to 1) 
    75 ;            or deactivate (if set to 0) dynamic resizing of the 
    76 ;            specified CW_DROPLIST_PM widget (see the documentation 
    77 ;            for the DYNAMIC_RESIZE keyword to WIDGET_DROPLIST 
    78 ;            procedure for more information about dynamic widget 
    79 ;            resizing). 
    80 ;            DROPLIST_SELECT:Set this keyword to return the zero-based 
    81 ;            number of the currently-selected element (i.e., the 
    82 ;            currently-displayed element) in the specified droplist 
    83 ;            widget. 
    84 ;            VALUE: The contents of the list widget (string or string 
    85 ;            array) 
    86 ; 
    87 ; RESTRICTIONS: 
    88 ; 
    89 ; EXAMPLE: cf utiliser le programme founit i-dessous: testwid et la 
    90 ; procedure associee, testwid_event. 
    91 ; 
    92 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) 
    93 ;                      6/9/1999 
    94 ; 
    95 ;- 
    96 ;------------------------------------------------------------ 
    97 ;------------------------------------------------------------ 
    98 ;------------------------------------------------------------ 
    991; PRO testwid_event, event 
    1002; ;   help, event, /STRUCT 
     
    199101end 
    200102;---------------------------------------------------------------------- 
     103;------------------------------------------------------------ 
     104;------------------------------------------------------------ 
     105;------------------------------------------------------------ 
     106;+ 
     107; 
     108; @file_comments 
     109; Like WIDGET_DROPLIST but here, their are 2 buttons + and - to move the widget from +/- 1 
     110; 
     111; @categories 
     112; compound widget 
     113;  
     114; @param PARENT {in}{required} 
     115; The widget ID of the parent widget. 
     116; 
     117; @keyword COLUMN 
     118; Buttons will be arranged in the number of columns 
     119; specified by this keyword. 
     120;  
     121; @keyword ROW 
     122; Buttons will be arranged in the number of rows 
     123; specified by this keyword. 
     124;  
     125; @keyword UVALUE 
     126; The user value to be associated with the widget. 
     127;  
     128; @keyword UNAME 
     129; The user name to be associated with the widget. 
     130;  
     131; @keyword _EXTRA 
     132; Used to pass your keywords 
     133; 
     134; @returns 
     135; The returned value of this function is the widget ID of the 
     136; newly-created animation widget. 
     137; 
     138; @restrictions 
     139; 
     140;     Widget Events Returned by Droplist Widgets 
     141; 
     142;   Pressing the mouse button while the mouse cursor is over an 
     143;   element of a droplist widget causes the widget to change the label 
     144;   on the droplist button and to generate an event. The appearance of 
     145;   any previously selected element is restored to normal at the same 
     146;   time. The event structure returned by the WIDGET_EVENT function is 
     147;   defined by the following statement: 
     148; 
     149;   { CW_DROPLIST_PM, ID:0L, TOP:0L, HANDLER:0L, INDEX:0L, OUT:0 } 
     150; 
     151;   The first three fields are the standard fields found in every 
     152;   widget event. 
     153;   INDEX returns the index of the selected item. This can be used to 
     154;   index the array of names originally used to set the widget''s 
     155;   value 
     156;   OUT:It is an integer which can take 3 values:  
     157;       1 : If we press + when the index is already at the max 
     158;       Comment: In this case, the index stay at the max 
     159;       -1: If we press - when the index is already at the min 
     160;       Comment: In this case, the index stay at the min 
     161;       0 : In other cases 
     162; 
     163;   Keywords to WIDGET_CONTROL 
     164; 
     165;   A number of keywords to the WIDGET_CONTROL procedure affect the 
     166;   behavior of cw_slider_pm widget: GET_VALUE and SET_VALUE. 
     167;       1) GET_VALUE 
     168;   widget_control,wid_id,get_value=resultat 
     169;   Send back, in the result variable, a structure of 3 elements whose  
     170;   names are inspired by keywords we can pass at widget_control when 
     171;   we use WIDGET_COMBOBOX: 
     172;            DROPLIST_NUMBER: the number of elements currently 
     173;            contained in the specified droplist widget. 
     174;            DROPLIST_SELECT: the zero-based number of the 
     175;            currently-selected element (i.e., the currently-displayed 
     176;            element) in the specified droplist widget. 
     177;            DYNAMIC_RESIZE: a True value (1) if the widget specified 
     178;            by Widget_ID is a button, droplist, or label widget that 
     179;            has had its DYNAMIC_RESIZE attribute set. Otherwise, 
     180;            False (0) is returned. 
     181;       2) SET_VALUE 
     182;   widget_control,wid_id,set_value=impose 
     183;   permet de modifier l''etat de la droplist comme on peut le faire 
     184;   pour WIDGET_DROPLIST Impose peut etre: 
     185;       a) The contents of the list widget (string or string array) 
     186;       b) A structure which can have for elements (from 1 to 3):  
     187;            DYNAMIC_RESIZE:Set this keyword to activate (if set to 1) 
     188;            or deactivate (if set to 0) dynamic resizing of the 
     189;            specified CW_DROPLIST_PM widget (see the documentation 
     190;            for the DYNAMIC_RESIZE keyword to WIDGET_DROPLIST 
     191;            procedure for more information about dynamic widget 
     192;            resizing). 
     193;            DROPLIST_SELECT:Set this keyword to return the zero-based 
     194;            number of the currently-selected element (i.e., the 
     195;            currently-displayed element) in the specified droplist 
     196;            widget. 
     197;            VALUE: The contents of the list widget (string or string 
     198;            array) 
     199; 
     200; @examples 
     201; See the program provided above (testwid and the associated procedure, testwid_event). 
     202; 
     203; @history 
     204; Sebastien Masson (smasson@lodyc.jussieu.fr) 
     205;                      6/9/1999 
     206; 
     207; @version 
     208; $Id$ 
     209; 
     210;- 
     211;------------------------------------------------------------ 
     212;------------------------------------------------------------ 
     213;------------------------------------------------------------ 
    201214FUNCTION cw_droplist_pm, parent,UVALUE = uvalue, UNAME = uname, ROW = row, COLUMN = column, _extra = ex 
    202215; 
  • trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_pagelayout.pro

    r134 r150  
    1818; 
    1919@common 
    20 ; si on ne change pas le nombre de colonnes, on sort 
     20; If we do not change the number of columns, we send 
    2121      if uval.name EQ 'column' then $ 
    2222       if event.index+1 EQ smallin[0] THEN $ 
    2323       return,{ID:event.handler, TOP:event.top, HANDLER:0L} 
    24 ; si on ne change pas le nombre de lignes, on sort 
     24; If we do not change the number of lines, we send 
    2525      if uval.name EQ 'row' then $ 
    2626       if event.index+1 EQ smallin[1] THEN $ 
    2727       return,{ID:event.handler, TOP:event.top, HANDLER:0L} 
    2828; 
    29 ; on efface la page 
     29; We erase the page 
    3030;      graphid = widget_info(event.top,find_by_uname = 'graph') 
    3131      graphid = extractatt(top_uvalue, 'graphid') 
     
    4646      nbredessin = smallin[0]*smallin[1] 
    4747;          
    48 ; on remet tout a 0 en ce qui concerne les postscripts 
     48; We put all back to 0 for postscripts 
    4949      createhistory, event.top, smallin 
    5050;          
     
    7979end 
    8080;********************************************************************* 
     81;+ 
     82; @file_comments 
     83; 
     84; 
     85; @categories 
     86; 
     87;  
     88; @param PARENT {in}{required} 
     89; The widget ID of the parent widget. 
     90; 
     91; @param SMALL  
     92; 
     93; 
     94; @keyword COLUMN 
     95; Buttons will be arranged in the number of columns 
     96; specified by this keyword. 
     97;  
     98; @keyword ROW 
     99; Buttons will be arranged in the number of rows 
     100; specified by this keyword. 
     101;  
     102; @keyword UVALUE 
     103; The user value to be associated with the widget. 
     104;  
     105; @keyword UNAME 
     106; The user name to be associated with the widget. 
     107; 
     108; @keyword _EXTRA 
     109; Used to pass your keywords 
     110; 
     111;  
     112;  
     113; @returns 
     114;  
     115;  
     116; @uses 
     117;  
     118;  
     119; @restrictions 
     120;  
     121;  
     122; @examples 
     123;  
     124;  
     125; @history 
     126;  
     127;  
     128; @version 
     129; $Id$  
     130;  
     131; @todo  
     132; seb: documenter 
     133;  
     134;- 
    81135FUNCTION cw_pagelayout, parent, small, UVALUE = uvalue, UNAME = uname, UNZOOM = unzoom, COLUMN = column, ROW = row, _extra = ex 
    82136;------------------------------------------------ 
  • trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slide_slice.pro

    r134 r150  
    109109end 
    110110;-------------------------------------------------------------------------------- 
     111;+ 
     112; @file_comments 
     113; 
     114; 
     115; @categories 
     116; 
     117; @param PARENT {in}{required} 
     118; The widget ID of the parent widget. 
     119; 
     120; @keyword BOXZOOM 
     121; Vector indicating the geographic zone on which we want to cut the map.  
     122; If BOXZOOM has :  
     123;   1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] 
     124;   2 elements: The extraction is made on [lon1, lon2, lat1, lat2, boxzoom[0],boxzoom[1]] 
     125;   4 elements: The extraction is made on [Boxzoom, 0, max([gdept, gdepw])] 
     126;   5 elements: The extraction is made on [Boxzoom[0:3], 0, Boxzoom[4]] 
     127;   6 elements: The extraction is made on Boxzoom  
     128; Where lon1, lon2,lat1,lat2 are global variables defined at the last domdef! 
     129; 
     130; @keyword COLUMN 
     131; Buttons will be arranged in the number of columns 
     132; specified by this keyword. 
     133;  
     134; @keyword FRAME 
     135; Specifies the width of the frame to be drawn around the base. 
     136;  
     137; @keyword ROW 
     138; Buttons will be arranged in the number of rows 
     139; specified by this keyword. 
     140;  
     141; @keyword UVALUE 
     142; The user value to be associated with the widget. 
     143;  
     144; @keyword UNAME 
     145; The user name to be associated with the widget. 
     146;  
     147; @keyword _EXTRA 
     148; Used to pass your keywords 
     149;  
     150; @returns 
     151;  
     152;  
     153; @uses 
     154;  
     155;  
     156; @restrictions 
     157;  
     158;  
     159; @examples 
     160;  
     161;  
     162; @history 
     163;  
     164;  
     165; @version  
     166; $Id$ 
     167;  
     168; @todo 
     169; seb: documenter 
     170; 
     171;- 
    111172FUNCTION cw_slide_slice, parent, boxzoom = boxzoom, UVALUE = uvalue, UNAME = uname, FRAME = frame, ROW = row, COLUMN = column, _extra = ex 
    112173; 
  • trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slider_pm.pro

    r134 r150  
    1 ;------------------------------------------------------------ 
    2 ;------------------------------------------------------------ 
    3 ;------------------------------------------------------------ 
    4 ;+ 
    5 ; NAME: cw_slider_pm 
    6 ; 
    7 ; PURPOSE: widget equivalent a WIDGET_SLIDER sauf qu'en plus on 
    8 ; dispose de 2 bouttons + et - pour deplacer le widget de +/- 1. 
    9 ; 
    10 ; CATEGORY: compound widget (aide a l''ecriture des widgets) 
    11 ; 
    12 ; CALLING SEQUENCE: id=cw_slider_pm(parent) 
    13 ;  
    14 ; INPUTS: 
    15 ;         Parent: The widget ID of the parent widget. 
    16 ; 
    17 ; KEYWORD PARAMETERS:tous ceux de WIDGET_SLIDER 
    18 ; 
    19 ; OUTPUTS: 
    20 ;         The returned value of this function is the widget ID of the 
    21 ;         newly-created animation widget. 
    22 ; 
    23 ; COMMON BLOCKS: none 
    24 ; 
    25 ; SIDE EFFECTS:  
    26 ; 
    27 ;  Widget Events Returned by the CW_SLIDER_PM Widget 
    28 ; 
    29 ;  Slider widgets generate events when the mouse is used to change 
    30 ;  their value. The event structure returned by the WIDGET_EVENT 
    31 ;  function is defined by the following statement: 
    32 ; 
    33 ;  {CW_SLIDER_PM, ID:0L, TOP:0L, HANDLER:0L, VALUE:0L, DRAG:0, OUT:0} 
    34 ; 
    35 ;  ID is the widget ID of the button generating the event. TOP is the 
    36 ;  widget ID of the top level widget containing ID. 
    37 ;  HANDLER contains the widget ID of the widget associated with the 
    38 ;  handler routine. 
    39 ;  VALUE returns the new value of the slider. 
    40 ;  DRAG returns integer 1 if the slider event was generated as part of 
    41 ;  a drag operation, or zero if the event was generated when the user 
    42 ;  had finished positioning the slider. Note that the slider widget 
    43 ;  only generates events during the drag operation if the DRAG keyword 
    44 ;  is set, and if the application is running under Motif. When the 
    45 ;  DRAG keyword is set, the DRAG field can be used to avoid 
    46 ;  computationally expensive operations until the user releases the 
    47 ;  slider. 
    48 ;  OUT:c''est un entier qui peut prendre 3 valeurs: 
    49 ;      1 : si on appuie sur + alors que le slider est deja aux max. rq: 
    50 ;      ds ce cas le slider reste au max 
    51 ;      -1: si on appuie sur - alors que le slider est deja aux min. rq: 
    52 ;      ds ce cas le slider reste au min 
    53 ;      0 : ds les autres cas! 
    54 ; 
    55 ;   Keywords to WIDGET_CONTROL 
    56 ; 
    57 ;   A number of keywords to the WIDGET_CONTROL procedure affect the 
    58 ;   behavior of cw_slider_pm widget: GET_VALUE and SET_VALUE. 
    59 ;       1) GET_VALUE 
    60 ;   widget_control,wid_id,get_value=resultat 
    61 ;   retourne ds la variable resultat une structure de 2 elements dont 
    62 ;   les noms sont inspires des mots cles que l''on peut passer a 
    63 ;   widget_control qd on utilise WIDGET_SLIDER: 
    64 ;            VALUE:the value setting of the widget 
    65 ;            SLIDER_MIN_MAX: a 2 elements array: The minimum and the 
    66 ;            maximum value of the range encompassed by the slider 
    67 ;       2) SET_VALUE 
    68 ;   widget_control,wid_id,set_value=impose 
    69 ;   permet de modifier l''etat de la slider bar comme on peut le faire 
    70 ;   pour WIDGET_SLIDER. Impose peut etre: 
    71 ;       a) un entier: donne la nouvelle  position of the slider. 
    72 ;       b) une structure qui peut avoir comme elements (de 1 a 3): 
    73 ;            VALUE:un entier qui donne la nouvelle  position of the slider. 
    74 ;            SLIDER_MIN:Set to a new minimum value for the specified 
    75 ;            slider widget. 
    76 ;            SLIDER_MAX:Set to a new minimum value for the specified 
    77 ;            slider widget. 
    78 ; 
    79 ; RESTRICTIONS: 
    80 ; 
    81 ; EXAMPLE: cf utiliser le programme founit i-dessous: testwid et la 
    82 ; procedure associee, testwid_event. 
    83 ; 
    84 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) 
    85 ;                      5/9/1999 
    86 ;- 
    87 ;------------------------------------------------------------ 
    88 ;------------------------------------------------------------ 
    89 ;------------------------------------------------------------ 
    901; PRO testwid_event, event 
    912; ;   help, event, /STRUCT 
     
    249160end 
    250161;---------------------------------------------------------------------- 
     162;------------------------------------------------------------ 
     163;------------------------------------------------------------ 
     164;------------------------------------------------------------ 
     165;+ 
     166; 
     167; @file_comments 
     168; Like WIDGET_SLIDER but here, their are 2 buttons + and - to move the widget from +/- 1 
     169; 
     170; @categories 
     171; compound widget 
     172;  
     173; @param PARENT {in}{required} 
     174; The widget ID of the parent widget. 
     175; 
     176; @keyword UVALUE 
     177; The user value to be associated with the widget. 
     178;  
     179; @keyword UNAME 
     180; The user name to be associated with the widget. 
     181;  
     182; @keyword VALUE 
     183; 
     184; 
     185; @keyword MAXIMUM 
     186;  
     187;  
     188; @keyword MINIMUM 
     189; 
     190;  
     191; @keyword STRMINLEN 
     192; 
     193; 
     194; @keyword _EXTRA 
     195; Used to pass your keywords 
     196; 
     197; @returns 
     198; The returned value of this function is the widget ID of the 
     199; newly-created animation widget. 
     200; 
     201; @restrictions 
     202; 
     203;  Widget Events Returned by the CW_SLIDER_PM Widget 
     204; 
     205;  Slider widgets generate events when the mouse is used to change 
     206;  their value. The event structure returned by the WIDGET_EVENT 
     207;  function is defined by the following statement: 
     208; 
     209;  {CW_SLIDER_PM, ID:0L, TOP:0L, HANDLER:0L, VALUE:0L, DRAG:0, OUT:0} 
     210; 
     211;  ID is the widget ID of the button generating the event. TOP is the 
     212;  widget ID of the top level widget containing ID. 
     213;  HANDLER contains the widget ID of the widget associated with the 
     214;  handler routine. 
     215;  VALUE returns the new value of the slider. 
     216;  DRAG returns integer 1 if the slider event was generated as part of 
     217;  a drag operation, or zero if the event was generated when the user 
     218;  had finished positioning the slider. Note that the slider widget 
     219;  only generates events during the drag operation if the DRAG keyword 
     220;  is set, and if the application is running under Motif. When the 
     221;  DRAG keyword is set, the DRAG field can be used to avoid 
     222;  computationally expensive operations until the user releases the 
     223;  slider. 
     224;  OUT:It is an integer which can take 3 values:  
     225;       1 : If we press + when the index is already at the max 
     226;       Comment: In this case, the index stay at the max 
     227;       -1: If we press - when the index is already at the min 
     228;       Comment: In this case, the index stay at the min 
     229;       0 : In other cases 
     230; 
     231;   Keywords to WIDGET_CONTROL 
     232; 
     233;   A number of keywords to the WIDGET_CONTROL procedure affect the 
     234;   behavior of cw_slider_pm widget: GET_VALUE and SET_VALUE. 
     235;       1) GET_VALUE 
     236;   widget_control,wid_id,get_value=resultat 
     237;   retourne ds la variable resultat une structure de 2 elements dont 
     238;   les noms sont inspires des mots cles que l''on peut passer a 
     239;   widget_control qd on utilise WIDGET_SLIDER: 
     240;            VALUE:the value setting of the widget 
     241;            SLIDER_MIN_MAX: a 2 elements array: The minimum and the 
     242;            maximum value of the range encompassed by the slider 
     243;       2) SET_VALUE 
     244;   widget_control,wid_id,set_value=impose 
     245;   Allows to modify the state of the combobox like we can do it for  
     246;   WIDGET_COMBOBOX. May impose:  
     247;       a) un entier: donne la nouvelle  position of the slider. 
     248;       b) A structure which can have for elements (from 1 to 3):  
     249;            VALUE: an integer which give the new position of the slider 
     250;            SLIDER_MIN:Set to a new minimum value for the specified 
     251;            slider widget. 
     252;            SLIDER_MAX:Set to a new minimum value for the specified 
     253;            slider widget. 
     254; 
     255; 
     256; @examples 
     257; See the program provided above (testwid and the associated procedure, testwid_event). 
     258; 
     259; @history 
     260; Sebastien Masson (smasson@lodyc.jussieu.fr) 
     261;                      5/9/1999 
     262; 
     263; @version 
     264; $Id$ 
     265; 
     266; @todo 
     267; seb: documenter 
     268; 
     269;- 
     270;------------------------------------------------------------ 
     271;------------------------------------------------------------ 
     272;------------------------------------------------------------ 
    251273FUNCTION cw_slider_pm, parent, MAXIMUM = maximum, MINIMUM = minimum $ 
    252274                       , STRMINLEN = strminlen, VALUE = value, UVALUE = uvalue $ 
  • trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_specifie.pro

    r134 r150  
    7272    'default':BEGIN  
    7373;--------------- 
    74 ; on trouve le nom de la variable: 
    75 ;--------------- 
     74; We find the name of the variable:  
    7675      vlstid = widget_info(event.top, find_by_uname = 'varlist') 
    7776      fieldname = widget_info(vlstid, /combobox_gettext) 
     
    9493;***************************************************** 
    9594;***************************************************** 
     95;+ 
     96; @file_comments 
     97; 
     98; 
     99; @categories 
     100; 
     101;  
     102; @param PARENT {in}{required} 
     103; The widget ID of the parent widget. 
     104; 
     105; @keyword COLUMN 
     106; Buttons will be arranged in the number of columns 
     107; specified by this keyword. 
     108;  
     109; @keyword ROW 
     110; Buttons will be arranged in the number of rows 
     111; specified by this keyword. 
     112;  
     113; @keyword UVALUE 
     114; The user value to be associated with the widget. 
     115;  
     116; @keyword UNAME 
     117; The user name to be associated with the widget. 
     118; 
     119; @keyword FRAME 
     120; 
     121; 
     122; @keyword FORXXX 
     123; 
     124;  
     125; @keyword _EXTRA 
     126; Used to pass your keywords 
     127; 
     128;  
     129; @returns 
     130;  
     131;  
     132; @uses 
     133;  
     134;  
     135; @restrictions 
     136;  
     137;  
     138; @examples 
     139;  
     140;  
     141; @history 
     142;  
     143;  
     144; @version  
     145; $ID$ 
     146; 
     147; @todo 
     148; seb: documenter 
     149;  
     150;- 
    96151FUNCTION cw_specifie, parent, ROW = row, COLUMN = column, UVALUE = uvalue, UNAME = uname, FRAME = frame, FORXXX = forxxx, _extra = ex 
    97152; cheking exclusive keywords 
     
    135190 
    136191 
    137 ; widget text contennant les autres mots cles passe ds top_uvalue.exextra 
    138 ; en reste-t-il? si oui, il faut les mettres sous forme de string 
     192; widget text containig other keywords pass into top_uvalue.exextra 
     193; Does it remain some? If yes, we have to put them as string 
    139194    
    140195   rien = widget_text(base, value = '  ', /editable, uname = 'autres', uvalue = 'autres', xsize = 54, ysize = 3, yoffset = 65, /wrap, /no_newline) 
  • trunk/SRC/ToBeReviewed/WIDGET/findtopid.pro

    r134 r150  
    33;------------------------------------------------------------ 
    44;+ 
    5 ; NAME: findtopid 
    65; 
    7 ; PURPOSE: retrouve a partir d''un Id de widget l'Id du widget qui est 
     6; @file_comments 
     7; Find, from an Id of widget, the Id of the widget which is  
    88; "the top-level base" (i.e., it has no parent) 
    99; 
    10 ; CATEGORY: aide pour les widgets 
    11 ; 
    12 ; CALLING SEQUENCE: res=findtopid(Widget_ID) 
     10; categories 
     11; widget 
    1312;  
    14 ; INPUTS: Widget_ID: this argument should be the widget ID of the 
     13; @param WIDGET_ID 
     14; This argument should be the widget ID of the 
    1515; widget for which information is desired. 
    1616; 
    17 ; KEYWORD PARAMETERS: 
     17; @returns 
     18; The Id of the widget which is "the top-level base" 
    1819; 
    19 ; OUTPUTS: l'Id du widget qui est "the top-level base" 
     20; @history 
     21; Sebastien Masson (smasson@lodyc.jussieu.fr) 
     22;                      22/9/1999 
    2023; 
    21 ; COMMON BLOCKS: 
     24; @version 
     25; $Id$ 
    2226; 
    23 ; SIDE EFFECTS:  
    24 ; 
    25 ; RESTRICTIONS: 
    26 ; 
    27 ; EXAMPLE: 
    28 ; 
    29 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) 
    30 ;                      22/9/1999 
    3127;- 
    3228;------------------------------------------------------------ 
    3329;------------------------------------------------------------ 
    3430;------------------------------------------------------------ 
    35 FUNCTION findtopid,  identite 
     31FUNCTION findtopid,  WIDGET_ID 
    3632; 
    3733  compile_opt idl2, strictarrsubs 
    3834; 
    39    id = long(identite) 
     35   id = long(WIDGET_ID) 
    4036;    exist = widget_info(id, /managed) 
    4137;    if exist EQ 0 then return,  -1 
  • trunk/SRC/ToBeReviewed/WIDGET/slec.pro

    r134 r150  
     1;+ 
     2; @file_comments 
     3; 
     4; 
     5; @categories 
     6; 
     7;  
     8; @param NAME 
     9; 
     10; 
     11; @param DEBUT 
     12; 
     13; 
     14; @param FIN 
     15; 
     16; 
     17; @param NOMEXP 
     18; 
     19;  
     20; @keyword PARENT {in}{required} 
     21; The widget ID of the parent widget. 
     22; 
     23; @keyword BOXZOOM 
     24; Vector indicating the geographic zone on which we want to cut the map.  
     25; If BOXZOOM has :  
     26;   1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] 
     27;   2 elements: The extraction is made on [lon1, lon2, lat1, lat2, boxzoom[0],boxzoom[1]] 
     28;   4 elements: The extraction is made on [Boxzoom, 0, max([gdept, gdepw])] 
     29;   5 elements: The extraction is made on [Boxzoom[0:3], 0, Boxzoom[4]] 
     30;   6 elements: The extraction is made on Boxzoom  
     31; Where lon1, lon2,lat1,lat2 are global variables defined at the last domdef! 
     32; 
     33; @keyword _EXTRA 
     34; Used to pass your keywords 
     35;  
     36;  
     37; @returns 
     38;  
     39;  
     40; @uses 
     41;  
     42;  
     43; @restrictions 
     44;  
     45;  
     46; @examples 
     47;  
     48;  
     49; @history 
     50;  
     51;  
     52; @version  
     53; $Id$ 
     54; 
     55; @todo 
     56; Seb: documenter 
     57; 
     58;- 
    159FUNCTION slec,name,debut,fin, nomexp, PARENT = parent, BOXZOOM=boxzoom, _EXTRA = ex 
    260;--------------------------------------------------------- 
  • trunk/SRC/ToBeReviewed/WIDGET/xnotice.pro

    r134 r150  
    33;------------------------------------------------------------ 
    44;+ 
    5 ; NAME:xnotice 
    65; 
    7 ; PURPOSE:cree un widget avec du texte au milieu de la fenetre. 
     6; @file_comments 
     7; Create a widget with some text at the middle of the window 
    88; 
    9 ; CATEGORY:information 
     9; @categories 
     10; Information 
     11;  
     12; @param TEXT {in}{required} 
     13; it is a string or a vector of string. If it is a scalar, we  
     14; look for the line separator !C to create a text with several lines. 
    1015; 
    11 ; CALLING SEQUENCE:widgetid=xnotice(text) 
    12 ;  
    13 ; INPUTS:text: un string ou un vecteur de string. Si c''est un 
    14 ; scalaire on cherche le separateur de ligne !C pour creer un texte a 
    15 ; plusieurs lignes. 
     16; @keyword CHKWIDGET 
     17; Force to verify that they are some active widget to create a widget,  
     18; otherwise print at the prompt 
    1619; 
    17 ; KEYWORD PARAMETERS:chkwidget: oblige a verifier qu''il y a des 
    18 ; widgets actif pour creer un widget, sinon imprime au prompt 
     20; @returns 
     21; The identity of the created widget 
    1922; 
    20 ; OUTPUTS:lidentite du widget cree 
    21 ; 
    22 ; COMMON BLOCKS 
    23 ; 
    24 ; SIDE EFFECTS:ne fait pas appelle a xmanager -> ne cree aucun event! 
    25 ; il faut detruire ce widget a la main: 
     23; @restrictions  
     24; It do not call xmanager -> It do not create any event!  
     25; We have to delete this widget manuelly: 
    2626; widget_control, widgetid, /destroy 
    2727; 
    28 ; RESTRICTIONS: 
    29 ; 
    30 ; EXAMPLE: 
     28; @examples 
    3129;    IDL> id=xnotice('ca marche !C ou pas?') 
    3230;    IDL> widget_control, id, /destroy 
    3331; 
    34 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) 
     32; @history 
     33; Sebastien Masson (smasson@lodyc.jussieu.fr) 
    3534;                      2000 3 17 
     35; 
     36; @version 
     37; $Id$ 
     38; 
    3639;- 
    3740;------------------------------------------------------------ 
     
    4043FUNCTION xnotice, text, CHKWIDGET = chkwidget 
    4144; 
    42 ; on separe le text en differentes lignes (separees par !C) si ce 
     45; We separate the text in different lines (separated by !C) if it is not done yet... 
    4346; n''est pas deja fait... 
    4447; 
  • trunk/SRC/ToBeReviewed/WIDGET/xquestion.pro

    r134 r150  
    1 ;------------------------------------------------------------ 
    2 ;------------------------------------------------------------ 
    3 ;------------------------------------------------------------ 
    4 ;+ 
    5 ; NAME:xquestion 
    6 ; 
    7 ; PURPOSE: a small widget who ask a question and give an answer. 
    8 ;          WARNING: For a binary question with yes/no answer use 
    9 ;                   DIALOG_MESSAGE. 
    10 ; 
    11 ; CATEGORY: widget 
    12 ; 
    13 ; CALLING SEQUENCE: answer = xquestion(question[,proposedanswer]) 
    14 ;  
    15 ; INPUTS: 
    16 ;        question: a scalar string or a array of string. If this 
    17 ;        argument is set to : 
    18 ;          + an array of strings: each array element is 
    19 ;            displayed as a separate line of text. 
    20 ;          + a scalar string: we are looking for the "separate line 
    21 ;          character" '!C' 
    22 ; 
    23 ;        proposedanswer: a string proposing a answer 
    24 ; 
    25 ; KEYWORD PARAMETERS: those from WIDGET_BASE and WIDGET_TEXT 
    26 ; 
    27 ;        /CHKWIDGET: active this keyword if you whant that xquestion 
    28 ;        check if managed widget are present. If not, xquestion do not 
    29 ;        open a widget but print the question in the IDL window.  
    30 ; 
    31 ; OUTPUTS: 
    32 ;        answer: a string 
    33 ; 
    34 ; COMMON BLOCKS: 
    35 ;        none (we use a "false widget") 
    36 ; 
    37 ; SIDE EFFECTS: 
    38 ;        The function does not return to its caller until the user 
    39 ;        press "Enter" key in the widget. 
    40 ; 
    41 ; RESTRICTIONS: 
    42 ; 
    43 ; EXAMPLE: 
    44 ; 
    45 ;        IDL> help, xquestion('Postscript name') 
    46 ;        <Expression>    STRING    = 'toto.ps' 
    47 ; 
    48 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) 
    49 ;                      13/10/1999 
    50 ;- 
    51 ;------------------------------------------------------------ 
    52 ;------------------------------------------------------------ 
    53 ;------------------------------------------------------------ 
    541;------------------------------------------------------------------------- 
    552pro xquestion_event, event 
     
    6815end 
    6916;------------------------------------------------------------------------- 
     17;------------------------------------------------------------ 
     18;------------------------------------------------------------ 
     19;------------------------------------------------------------ 
     20;+ 
     21; 
     22; @file_comments 
     23; A small widget who ask a question and give an answer. 
     24;   WARNING: For a binary question with yes/no answer use 
     25;   DIALOG_MESSAGE. 
     26; 
     27; @categories 
     28; widget 
     29; 
     30; @param QUESTION 
     31; A scalar string or a array of string. If this 
     32; argument is set to : 
     33;      + an array of strings: each array element is 
     34;        displayed as a separate line of text. 
     35;      + a scalar string: we are looking for the "separate line 
     36;        character" '!C' 
     37; 
     38; @param PROPOSEDANSWER 
     39; A string proposing a answer 
     40; 
     41; 
     42; @keyword CHKWIDGET 
     43; Active this keyword if you whant that xquestion 
     44; check if managed widget are present. If not, xquestion do not 
     45; open a widget but print the question in the IDL window.  
     46; 
     47; @keyword _EXTRA 
     48; Used to pass your keywords 
     49;  
     50; @returns 
     51; answer: a string 
     52; 
     53; @restrictions 
     54; The function does not return to its caller until the user 
     55; press "Enter" key in the widget. 
     56; 
     57; @examples 
     58; IDL> help, xquestion('Postscript name') 
     59; <Expression>    STRING    = 'toto.ps' 
     60; 
     61; @history 
     62; Sebastien Masson (smasson@lodyc.jussieu.fr) 
     63;                      13/10/1999 
     64; 
     65; @version 
     66; $Id$ 
     67; 
     68;- 
     69;------------------------------------------------------------ 
     70;------------------------------------------------------------ 
     71;------------------------------------------------------------ 
    7072FUNCTION xquestion, question, proposedanswer, CHKWIDGET = chkwidget, _extra = ex ; 
    7173; 
  • trunk/SRC/ToBeReviewed/WIDGET/xx.pro

    r134 r150  
    1  
     1;+ 
     2; @file_comments 
     3; 
     4; 
     5; @categories 
     6; 
     7;  
     8; @keyword JOUR 
     9;  
     10;  
     11; @keyword MESHFILENAME 
     12;  
     13;  
     14; @keyword LISTVAR 
     15;  
     16;  
     17; @keyword LISTGRID 
     18;  
     19;  
     20; @keyword FUNCLEC_NAME  
     21;  
     22;  
     23; @keyword CALENDAR 
     24;  
     25;  
     26; @keyword _EXTRA 
     27; Used to pass your keywords 
     28;  
     29;  
     30; @uses 
     31;  
     32;  
     33; @restrictions 
     34;  
     35;  
     36; @examples 
     37;  
     38;  
     39; @history 
     40;  
     41;  
     42; @version  
     43; $Id$ 
     44; 
     45; @todo 
     46; seb documenter 
     47; 
     48;- 
     49; 
    250PRO xx,  JOUR = jour, MESHFILENAME = meshfilename,  LISTVAR = listvar, LISTGRID = listgrid, FUNCLEC_NAME = funclec_name, CALENDAR = calendar, _extra = ex 
    3 ; 
    451; 
    552  compile_opt idl2, strictarrsubs 
     
    855;---------------------------------------------------------------------- 
    956;---------------------------------------------------------------------- 
    10 partie a changer 
     57Name of the part to be changed 
    1158;---------------------------------------------------------------------- 
    1259;---------------------------------------------------------------------- 
    13 ; nom de la fonction de lecture: 
     60; Name of the reading function 
    1461   if NOT keyword_set(funclec_name) then funclec_name = 'slec' 
    1562   varexp = 'INF' 
    16 ; liste des variables 
     63; list of variables 
    1764   if NOT keyword_set(listvar) then listvar = ['tn','sn','un','vn', 'taux', 'tauy','hdep20','hdep28','hdep15','hturb','hpycn','htoth','emp','qn','qs', 'smltot11', 'smltot12', 'smltot13', 'smltot14', 'smltot15', 'smltot16', 'tmltot11', 'tmltot12', 'tmltot13', 'tmltot14', 'tmltot15', 'tmltot16'] 
    18 ; liste des grilles auxquelles elles se rapportent les variables 
     65; list of grids to which variables refer to. 
    1966   if NOT keyword_set(listgrid) then BEGIN  
    2067      listgrid = replicate('T', n_elements(listvar)) 
     
    2269      listgrid[[3, 5]] = 'V' 
    2370   ENDIF 
    24 ; calendrier a utiliser (en jours juliens d''IDL    
     71; calendar to be used (in IDL julian days     
    2572;++++    if NOT keyword_set(calendar) then BEGIN  
    2673;++++       if keyword_set(jour) then calendar = calendriertotem(/julian_day) ELSE calendar = calendriertotem(/julian_day, /mensuel) 
    2774;++++    ENDIF 
    28 ; nom du fichier se rapportant au masque 
     75; Name of the file refering to the mask 
    2976   if NOT keyword_set(meshfilename) then meshfilename = '/usr1/com/smasson/IDL/INIT/inittotem.pro' 
    3077;++++   meshparameters = whichgrid(meshfilename) 
    31 ; parameteres specifiant comment doit etre lu le champ 
     78; parameters specifing how the field must be read 
    3279   readparameters= {funclec_name: funclec_name $ 
    3380                    , jpidta: jpidta, jpjdta: jpjdta, jpkdta: jpkdta $ 
     
    3784;---------------------------------------------------------------------- 
    3885;---------------------------------------------------------------------- 
    39 ;   fin de la partie a changer 
     86;   End of the part to be change 
    4087;---------------------------------------------------------------------- 
    4188;---------------------------------------------------------------------- 
  • 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.