Changeset 150 for trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX
- Timestamp:
- 08/09/06 12:12:54 (18 years ago)
- Location:
- trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/buildcmd.pro
r134 r150 3 3 ;------------------------------------------------------------ 4 4 ;+ 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 29 32 ; 30 33 ;- … … 56 59 ;------------------------------------------------------------ 57 60 ;--------------- 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 60 62 ;--------------- 61 63 IF keyword_set(forcetype) THEN type = forcetype $ … … 81 83 endcase 82 84 ; 83 ; recherche desoptions85 ; Search of options 84 86 ; 85 87 options = extractatt(top_uvalue, 'options') … … 94 96 alreadyvector = extractatt(top_uvalue, 'alreadyvector') 95 97 alreadyover = extractatt(top_uvalue, 'alreadyoer') 96 ; que devons-nous lire?98 ; What must we read ? 97 99 case 1 of 98 100 alreadyover NE -1:BEGIN … … 340 342 ;----------------------- 341 343 ;--------------- 342 ; determination du nom de la boxzoom 343 ;--------------- 344 ; determination of the boxzoom's name. 344 345 if NOT keyword_set(boxzoom) then widget_control, domainid, get_value = boxzoom 345 ; ecriture de celle-ci sous forme d''unstring346 ; Writting of this one as a string 346 347 box = '['+strtrim(boxzoom[0], 1) 347 348 for i = 1, (n_elements(boxzoom)-1) < (3+2*(strpos(type, 'z') EQ -1)) do $ 348 349 box = box+', '+strtrim(boxzoom[i], 1) 349 ; pour les [plots en z, box doit avoir par defaut 0,profmax350 ; For [plots in z, box must have by default 0,profmax 350 351 if strpos(type, 'z') NE -1 then BEGIN 351 ; si + de 1 niveau est selectionne:352 ; If more than 1 level is selected: 352 353 widget_control, widget_info(base, find_by_uname = 'dthlv1'), get_value = niv1 353 354 niv1 = niv1.combobox_index … … 372 373 ENDIF 373 374 ;--------------- 374 ; on determine typein375 ; We determinate typein 375 376 ;--------------- 376 377 IF strpos(type, ' diag ') NE -1 THEN typein = ''''+strmid(type, 0, 4)+'''' $ … … 378 379 ;--------------- 379 380 ;--------------- 380 ; determination desmall381 ; determination of small 381 382 ;--------------- 382 383 ssmall = tostr(smallout) 383 384 ;------------------------------------------------------------ 384 ; on va definir le string qui contiendra la commande a executer parwidgetdessine.pro385 ; We will define the string which will contain the command to be executed by widgetdessine.pro 385 386 ;------------------------------------------------------------ 386 387 Cmd = [readCmd, procedure+ ', field $' $ … … 395 396 ; print, '---------------' 396 397 ;--------------- 397 ; on complete et/ou actualise lastructure top_uvalue...398 ; We complete and/or update the structure top_uvalue... 398 399 ;--------------- 399 400 (*top_uvalue[1, findline(top_uvalue, 'nameprocedures')])[numdessinout] = procedure -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/buildreadcmd.pro
r148 r150 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 ; NAME:buildreadcmd 2 ; 3 ; @param BASE {in}{required} 4 ; The id of the widget where apply the drawing. 6 5 ; 7 ; PURPOSE:6 ; @param SNAMEEXP {in}{required} 8 7 ; 9 ; CATEGORY:10 8 ; 11 ; CALLING SEQUENCE: 9 ; @param PROCEDURE {in}{required} 10 ; 11 ; 12 ; @param TYPE {in}{required} 13 ; 12 14 ; 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! 14 24 ; 15 ; KEYWORD PARAMETERS:25 ; @keyword COMPLETE 16 26 ; 17 ; OUTPUTS: 27 ; 28 ; @keyword NAMEFIELD 18 29 ; 19 ; COMMON BLOCKS:common.pro20 30 ; 21 ; SIDE EFFECTS: 31 ; @uses 32 ; common.pro 33 ; 34 ; @history 35 ; Sebastien Masson (smasson@lodyc.jussieu.fr) 36 ; 37 ; @version 38 ; $Id$ 22 39 ; 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. 28 42 ; 29 43 ;- 30 ;------------------------------------------------------------31 ;------------------------------------------------------------32 ;------------------------------------------------------------33 44 FUNCTION buildreadcmd, base, snameexp, procedure, type, BOXZOOM = boxzoom $ 34 45 , COMPLETE = complete, NAMEFIELD = namefield … … 135 146 ;------------------------------------------------------------ 136 147 ;------------------------------------------------------------ 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. 139 149 ;------------------------------------------------------------ 140 150 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 ;- 1 46 PRO changefield, base, newfieldname, BOXZOOM = boxzoom 2 47 ; -
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 ;- 1 53 PRO changefile, base, newfilename, BOXZOOM = boxzoom, DATE1 = date1, DATE2 = date2, FIELDNAME = fieldname 2 54 ; -
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 ;- 1 46 PRO createhistory, base, small 2 47 ; -
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 ;- 1 48 PRO cutcmd, widcmd, toread, numberofread, prefix, nameexp, ending 2 49 ; -
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 ;- 1 33 FUNCTION definedefaultextra, nomvariable 2 34 ; -
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 ;- 1 33 PRO doubleclickaction, event 2 34 ;------------------------------------------------------------ … … 6 38 widget_control, event.id , get_uvalue = uval 7 39 widget_control, event.top, get_uvalue = top_uvalue 8 ; on active la bonne fenetre40 ; We activate the right window 9 41 widget_control, event.id, get_value = win 10 42 wset, win 11 ; quel est le dessin selectionne??43 ; What is the selected drawing? 12 44 smallin = extractatt(top_uvalue, 'smallin') 13 45 smallout = extractatt(top_uvalue, 'smallout') … … 17 49 numligne = n_elements(where(findgen(smallin[1])/smallin[1] lt 1-y))-1 18 50 numdessin = numcolonne+numligne*smallin[0]+1 19 ; choix du type d''action51 ; Choice of the type of action. 20 52 case uval.press of 21 53 1:BEGIN … … 46 78 inserthistory, event.top, ';', '; beginning of '+strtrim(numdessin, 2) $ 47 79 , '; 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: 49 81 50 82 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 ;- 1 36 FUNCTION extractatt, top_uvalue, name 2 37 ; -
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 ;- 1 36 FUNCTION findline, top_uvalue, name 2 37 ; -
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 ;- 1 33 FUNCTION identifyclick, event 2 34 ; … … 7 39 if thisEvent EQ 'WIDGET_TIMER' then press = 0 ELSE press = event.press 8 40 ; 9 ; d/0/>1 -------->t/1/0--------->**d/2/0** 10 ; -------->d/1/0--------->**t/2/0** click normal41 ; d/0/>1 -------->t/1/0--------->**d/2/0** long click 42 ; -------->d/1/0--------->**t/2/0** normal click 11 43 ; --------->**d/2/>1**-------->d/3/0----->t/0/0 double click 12 44 ; -------->t/3/0----->d/0/0 double click 13 45 type = 'inutile' 14 46 case 1 OF 15 ; d/0/0 1er re monte47 ; d/0/0 1er reascending 16 48 thisEvent EQ 'WIDGET_DRAW' AND uval.click EQ 0 AND press EQ 0: 17 ; d/0/>1 1er appuie de la serie49 ; d/0/>1 1er click of the series 18 50 thisEvent EQ 'WIDGET_DRAW' AND uval.click EQ 0 AND press ge 1:BEGIN 19 51 uval.x = [event.x, 0] … … 23 55 widget_control, event.id, timer = .3 24 56 END 25 ; d/1/0 1er re monte57 ; d/1/0 1er reascending 26 58 thisEvent EQ 'WIDGET_DRAW' AND uval.click EQ 1 AND press EQ 0:uval.click = 2 27 ; d/2/0 finlong click59 ; d/2/0 End of the long click 28 60 thisEvent EQ 'WIDGET_DRAW' AND uval.click EQ 2 AND press EQ 0:BEGIN 29 61 type = 'long' … … 39 71 uval.click = 3 40 72 END 41 ; d/3/0 re monte et fin de double click73 ; d/3/0 reascending and end of the double click 42 74 thisEvent EQ 'WIDGET_DRAW' AND uval.click EQ 3 AND press EQ 0:uval.click = 0 43 ; t/0/0 fin de double click75 ; t/0/0 End of the double click 44 76 thisEvent EQ 'WIDGET_TIMER' AND uval.click EQ 0 AND press EQ 0: 45 77 ; t/1/0 long click 46 78 thisEvent EQ 'WIDGET_TIMER' AND uval.click EQ 1 AND press EQ 0:uval.click = 2 47 ; t/2/0 click normal79 ; t/2/0 normal click 48 80 thisEvent EQ 'WIDGET_TIMER' AND uval.click EQ 2 AND press EQ 0:BEGIN 49 81 type = 'single' … … 51 83 uval.click = 0 52 84 END 53 ; t/3/0 fin de double click85 ; t/3/0 End of the double click 54 86 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: 56 88 ELSE:BEGIN 57 89 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 ;------------------------------------------------------------- 1 43 PRO inserthistory, base, text, line1, line2 2 ;-------------------------------------------------------------3 44 ; 4 45 compile_opt idl2, strictarrsubs -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/letsdraw.pro
r134 r150 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 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. 6 6 ; 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 10 8 ; 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'...),... 12 15 ; 13 ; CALLING SEQUENCE:widgetdessine, base 16 ; @keyword _EXTRA 17 ; Used to pass your keywords 14 18 ; 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 ; 32 28 ;- 33 ;------------------------------------------------------------34 ;------------------------------------------------------------35 ;------------------------------------------------------------36 37 29 PRO letsdraw, base, COMMANDE = commande, _extra = ex 38 30 ; … … 40 32 ; 41 33 @common 42 ; on recupere la uvalue debase34 ; we recuperate the uvalue of base 43 35 ; widget_control,base, get_uvalue = top_uvalue 44 36 ; print, '*****************' … … 61 53 ; 62 54 ; 63 ; on recuperel''id de la fenetre graphique associee au widget d''id base55 ; we recuperate the id of the graphic associated to the widget of id base. 64 56 graphid = extractatt(top_uvalue, 'graphid') 65 57 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) 68 59 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. 73 62 ; if !d.n_colors gt 256 then begin 74 63 ; 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 ;- 1 36 PRO loadgrid, meshfilein, _extra = ex 2 37 ; -
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 ;- 1 33 PRO longclickaction, event 2 34 ; … … 5 37 widget_control, event.id, get_uvalue = uval 6 38 widget_control, event.top, get_uvalue = top_uvalue 7 ; quel est le dessin selectionne??39 ; What is the selected drawing? 8 40 smallout = extractatt(top_uvalue, 'smallout') 9 41 smallin = extractatt(top_uvalue, 'smallin') … … 32 64 domainid = widget_info(event.top, find_by_uname = 'domain') 33 65 boxzoom = [x, y] 34 ; faut-il passer la boxzoom en indexes ???66 ; Do we have to pass the boxzoom in indexes ??? 35 67 currentplot = (extractatt(top_uvalue, 'smallin'))[2]-1 36 68 options = extractatt(top_uvalue, 'options') … … 40 72 changey = (flags[where(options EQ 'Latitude / y index')])[0] EQ 1 41 73 if changex OR changey then begin 42 ; on veut retrouver le type de grille qui est utilisee74 ; We want to find the type of grid which is used 43 75 currentfile = extractatt(top_uvalue, 'currentfile') 44 76 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 ;- 1 58 FUNCTION read_vermair, name, debut, fin, nomexp, PARENT = parent, BOXZOOM=boxzoom, _EXTRA = ex 2 59 ; -
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 ;- 1 39 ; 2 40 ; liste des presupposes: … … 145 183 time = date0fk + lindgen(jpt) 146 184 ENDIF ELSE BEGIN 147 ; on lit l''axe des temps185 ; we read the time axis 148 186 ncdf_varget, cdfid, varid, time 149 187 time = double(time) … … 180 218 ENDELSE 181 219 ; 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 187 224 ; 188 225 unite = strlowcase(unite) -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/selectfile.pro
r134 r150 144 144 end 145 145 ;********************************************************************* 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 ;- 146 187 FUNCTION selectfile, datafilename, idlfile, argspro, _extra = ex 147 188 ; … … 153 194 ;------------------------------------------------------------ 154 195 ; 155 ; pour recuperer les reponses possees lors de l''utilisation de ce156 ; widget on cree un pointeur que l''on place dans la uvalue. Comme ca157 ; une fois que le widget est detruit dans la procedure ...event.pro,158 ; la variable surlaquelle pointait le pointeur (contenue ds la uvalue159 ; d u 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! 160 201 ; 161 202 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 ;- 1 33 PRO singleclickaction, event 2 34 ; … … 14 46 type = widget_info(actionid, /combobox_gettext) 15 47 IF type NE 'plt' THEN return 16 ; on active la bonne fenetre48 ; We activate the right window 17 49 widget_control, event.id, get_value = win 18 50 wset, win 19 ; choi x du type d''action51 ; choice of the type of action 20 52 case uval.press of 21 53 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 ;- 1 42 PRO tracecadre, small, out = out, erase = erase, fill = fill 2 43 ;------------------------------------------------------------ 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 5 45 ; 6 46 compile_opt idl2, strictarrsubs … … 9 49 numligne = numdessin/small[0] 10 50 numcolonne = numdessin-numligne*small[0] 11 ; determination deposcadre51 ; determination of poscadre 12 52 largeurcolonne = 1./small[0] 13 53 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 ;- 1 42 PRO updatewidget, base, NOBOXZOOM = noboxzoom, NODATES = nodates, NOTYPE = notype 2 43 ;---------------------------------------------------------------------- -
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 ;- 1 33 pro xcreateanim_event, event 2 34 ; … … 4 36 ; 5 37 @common 6 ; on recupere les aguments contenus ds le widget38 ; We recuperate arguments contained in the widget 7 39 if tag_names(event, /structure_name) NE 'WIDGET_BUTTON' then return 8 40 widget_control, event.id, get_uvalue = uval … … 12 44 return 13 45 ENDIF 14 ; on va ecrire l''animation!46 ; We will write the animation! 15 47 ; 16 48 widget_control, event.top, get_uvalue = local_uvalue … … 36 68 index2 = where(calendar eq date2jul(vdate2)) & index2 = index2[0] 37 69 if index2 EQ -1 OR index2 LE index1 then return 38 ; on detruit le widget avant de creer le fichier.ps70 ; We delete the widget before create the file .ps 39 71 widget_control, event.top, /destroy 40 72 ; 41 ; creation de la routine qui nous serviera pour faire le dessin42 ; 43 ; on recupere la liste des instructions73 ; creation of the routine which will serve us to do the drawing 74 ; 75 ; We recuperate the list of instructions 44 76 globalcommand = extractatt(top_uvalue, 'globalcommand') 45 ; on complete par le premiere et les dernieres lignes du programme77 ; We complete by first and last lines of the program 46 78 createpro, globalcommand, filename = myuniquetmpdir + 'xxx2ps.pro' $ 47 79 , KWDLIST = ', NOERASE = noerase, POSTSCRIPT = postscript, DATE1IN = date1in, DATE2IN = date2in' 48 80 ; 49 ;--------creation du fichier----------50 ; 51 ; recupere le nombre d'octets surlequel on code la palette81 ;--------creation of the file--------- 82 ; 83 ; we recuperate the number of octets on which we code the palette. 52 84 device, get_visual_depth = depth 53 ; taille de l''image (en nombre de pixel:85 ; Picture's size (in number of pixels): 54 86 xsize = !d.x_size 55 87 ysize = !d.y_size 56 88 ; 57 ; on verifie que le nom du fichier termine bien par.gif89 ; We check that the file's name end by .gif 58 90 if strpos(nomfic, '.gif') EQ -1 then nomfic = nomfic+'.gif' 59 91 … … 62 94 63 95 64 ; indication du numero de l''image que l''on est en train de creer96 ; indication of the number of the picture we are creating 65 97 base = widget_base() 66 98 sliderid = widget_slider(base, minimum = 1, maximum = index2-index1+1, value = 1 $ … … 68 100 widget_control, base, /realize 69 101 ; 70 ; commencement du fichier gif. ecriture d''une image vide102 ; Beginning of the gif file. Writting of an empty picture. 71 103 IF keyword_set(fakecal) THEN date = index1 ELSE date = jul2date(calendar[index1]) 72 104 xxx2ps, /noerase, date1in = date, date2in = date … … 91 123 wdelete, !d.window 92 124 ; 93 ; boucle de creation et d''ecriture ds le fichier.125 ; Creation and writting loop in the file. 94 126 ; 95 127 IF index2 GT index1 THEN BEGIN 96 128 FOR ind = index1+1, index2 do BEGIN 97 129 ; 98 widget_control, sliderid, set_value = ind-index1+1 ; on bouge le slider130 widget_control, sliderid, set_value = ind-index1+1 ; We move the slider. 99 131 ; 100 132 window, /free, /pixmap, xsize = xsize, ysize = ysize … … 111 143 ENDFOR 112 144 ENDIF 113 ; on met une derniere image blanche145 ; We put a last white picture 114 146 window, /free, /pixmap, xsize = xsize, ysize = ysize 115 147 reinitplt … … 122 154 write_gif, animdir+nomfic, image, red, green, blue, /multiple 123 155 wdelete, !d.window 124 ; fermeture du fichier156 ; File's closing. 125 157 write_gif, animdir+nomfic, /close 126 158 widget_control, base, /destroy 127 ; rebascule en mode "normal"159 ; Rerock in "normal" mode 128 160 thisOS = strupcase(strmid(!version.os_family, 0, 3)) 129 161 ; 130 162 wset, current_window 131 163 132 ; si on est sous x on essaie de lancerxanim...164 ; If we are under x, we try to lauch xanim... 133 165 134 166 if thisOS NE 'MAC' AND thisOS NE 'WIN' then begin … … 141 173 end 142 174 ;---------------------------------------------------------------- 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 ;- 143 207 PRO xcreateanim, parent 144 208 ; … … 149 213 widget_control, parent, get_uvalue = top_uvalue 150 214 ; 151 ; on va s''assurer que toutes les procedures de sont paspltt215 ; We will make sure that all procedure are not in pltt 152 216 ; 153 217 procedures = extractatt(top_uvalue, 'nameprocedures') … … 157 221 ENDIF 158 222 ; 159 ; on va s''assurer que toutes les figures ont le meme calendrier223 ; We will make sure that all figure have the same calendar 160 224 ; 161 225 filelist = extractatt(top_uvalue, 'filelist') … … 183 247 endif 184 248 ; 185 ; c''est possible de faire une animation249 ; It is possible to do an animation. 186 250 ; 187 251 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 ;- 1 32 ;------------------------------------------------ 2 33 PRO xxxmenubar_event, event … … 15 46 widget_control, event.top, update = 0 16 47 widget_control, event.top, get_uvalue = top_uvalue 17 ; on s''occupe defilelist48 ; We take care of filelist 18 49 filelist = extractatt(top_uvalue, 'filelist') 19 50 filelist = [filelist, newfile.fileparameters.filename] 20 51 currentfile = n_elements(filelist)-1 21 ; on update le widget52 ; We update the widget 22 53 filelistid = widget_info(event.top, find_by_uname = 'filelist') 23 54 widget_control, filelistid, combobox_additem = file_basename(newfile.fileparameters.filename) 24 55 widget_control, filelistid, set_combobox_select = currentfile 25 ; on update les elements filelist et currentfile de la top_uvalue56 ; We update filelist and currentfile's elements of the top_value 26 57 *top_uvalue[1, findline(top_uvalue, 'filelist')] = filelist 27 58 oldfile = *top_uvalue[1, findline(top_uvalue, 'currentfile')] 28 59 *top_uvalue[1, findline(top_uvalue, 'currentfile')] = currentfile 29 ; on s''occupe du nom de lavariable60 ; We take care of the name of the variable 30 61 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 ? 32 63 fieldname = widget_info(vlstid, /combobox_gettext) 33 64 index = where(newfile.fileparameters.listvar EQ fieldname) 34 65 widget_control, vlstid, set_value = newfile.fileparameters.listvar 35 66 widget_control, vlstid, set_combobox_select = 0 > index[0] 36 ; on s''occupe du calendrier67 ; We take care of the calendar. 37 68 key_caltype = newfile.fileparameters.caltype 38 69 date1id = widget_info(event.top, find_by_uname = 'calendar1') … … 53 84 rien = cw_calendar(basecal, newfile.fileparameters.time_counter, jdate2, uname = 'calendar2' $ 54 85 , FAKECAL = fakecal, uvalue = {name:'calendar2'}, /frame) 55 ; on update les elements fileparameters, readparameters et meshparameters de la top_uvalue86 ; We update fileparameters, readparameters et meshparameters elements of the top_value 56 87 newfileparameters = ptrarr(currentfile+1, /allocate_heap) 57 88 FOR i = 0, currentfile-1 DO $ … … 74 105 ptr_free, extractatt(top_uvalue, 'meshparameters') 75 106 *top_uvalue[1, findline(top_uvalue, 'meshparameters')] = newmeshparameters 76 ; on actualise le widget!107 ; We update the widget! 77 108 if cmpgrid(oldmeshparams) then BEGIN 78 109 domainid = widget_info(event.top, find_by_uname = 'domain') … … 93 124 ptr_free, extractatt(top_uvalue, 'meshparameters') 94 125 ptr_free, top_uvalue 95 widget_control, event.top, /destroy ; on ferme le widget126 widget_control, event.top, /destroy ;We shut the widget 96 127 end 97 128 'PostScript' :BEGIN … … 101 132 ENDIF 102 133 widget_control, event.top, get_uvalue = top_uvalue 103 ; on recupere la liste desinstructions134 ; We recuperate the list of instructions 104 135 globalcommand = extractatt(top_uvalue, 'globalcommand') 105 136 ; for i = 0, n_elements(globalcommand)-1 do print, globalcommand[i] 106 ; on complete par le premiere et les dernieres lignes du programme137 ; We complete by first and last lines of the program. 107 138 createpro, globalcommand, filename = myuniquetmpdir + 'xxx2ps.pro' $ 108 139 , KWDLIST = ', NOERASE = noerase, POSTSCRIPT = postscript' $ … … 136 167 return 137 168 ENDIF 138 ; on recupere le nom du fichier169 ; We recuperate the name of the file 139 170 filename = xquestion('dans quelle procedure IDL voulez vous sauver !C la realisation de ce graph?', 'xxx_figure.pro') 140 ; on le complete par un.pro171 ; We complete it by a .pro 141 172 if rstrpos(filename, '.pro') NE strlen(filename)-4 then filename = filename+'.pro' 142 173 filename = isafile(file = filename, io = homedir, /new) 143 174 widget_control, event.top, get_uvalue = top_uvalue 144 ; portrait o ulandscape ???175 ; portrait or landscape ??? 145 176 options = extractatt(top_uvalue, 'options') 146 177 optionsflag = extractatt(top_uvalue, 'optionsflag') 147 178 portrait = (optionsflag[where(options EQ 'Portrait/Landscape'), 0])[0] 148 ; on lit les commandes pour faire unplot179 ; We read commands to do a plot 149 180 globalcommand = extractatt(top_uvalue, 'globalcommand') 150 ; on complete par le premiere et les dernieres lignes du programme181 ; We complete by first and last lines of the program 151 182 thisOS = strupcase(strmid(!version.os_family, 0, 3)) 152 183 CASE thisOS of … … 163 194 , 'return' $ 164 195 , 'end'] 165 ; on les ecrit dans un programme196 ; We write it in a program 166 197 putfile, filename, globalcommand 167 198 END … … 171 202 return 172 203 ENDIF 173 ; on recupere le nom du fichier204 ; We recuperate the name of the file 174 205 filename = xquestion('dans quel fichier bianire voulez vous sauver le widget ?', 'xxx_widget.dat') 175 ; on le complete par un.dat206 ; We complete it by a .dat 176 207 if rstrpos(filename, '.dat') NE strlen(filename)-4 then filename = filename+'.dat' 177 208 filename = isafile(file = filename, io = homedir, /new) … … 195 226 key_portrait = 1-optionsflag[index, 0] 196 227 (*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? 198 229 if widget_info(event.top, find_by_uname = 'graph') EQ 0 then BEGIN 199 ; on tue la fenetre230 ; We delete the window 200 231 graphid = extractatt(top_uvalue, 'graphid') 201 232 widget_control, widget_info(graphid, /parent), /destroy 202 ; on la recree233 ; We recreate it. 203 234 basegraph = widget_base(title = 'xxx window', group_leader = event.top, uvalue = event.top, uname = 'basegraph') 204 235 windsize = givewindowsize() … … 209 240 widget_control, basegraph, /realize 210 241 xmanager, 'xxx', basegraph, /no_block 211 ; on redessine ce qu''il y avait dedans212 ; on recupere la liste desinstructions242 ; We redraw what their were into it 243 ; We recuperate the list of instructions 213 244 globalcommand = extractatt(top_uvalue, 'globalcommand') 214 ; on complete par le premiere et les dernieres lignes du programme245 ; We complete by first and last lines of the program 215 246 createpro, globalcommand, filename = myuniquetmpdir + 'xxx2ps.pro' $ 216 247 , KWDLIST = ', NOERASE = noerase, POSTSCRIPT = postscript, PORTRAIT = portrait, LANDSCAPE = landscape' $ 217 248 , KWDUSED = ', /noerase, PORTRAIT = portrait' 218 ; on reattribue l''element graphid de la top_uvalue249 ; We reattribute the graphic element of the top_value 219 250 *top_uvalue[1, findline(top_uvalue, 'graphid')] = graphid 220 251 ENDIF ELSE BEGIN 221 252 extra = extractatt(top_uvalue, 'extra') 222 253 xxx, CALLERWIDID = event.top, /redraw, _extra = extra 223 widget_control, event.top, /destroy ; on ferme le widget254 widget_control, event.top, /destroy ;We shut the widget 224 255 ENDELSE 225 256 end … … 230 261 flags = extractatt(top_uvalue, 'optionsflag') 231 262 index = where(options EQ 'Overlay') 232 ; on change le flag surLongitude / x index263 ; We change the flag on Longitude / x index 233 264 flag = 1-flags[index, numdessinin] & flag = flag[0] 234 ; on le reeatribue265 ; We reattribute it 235 266 (*top_uvalue[1, findline(top_uvalue, 'optionsflag')])[index, numdessinin] = flag 236 267 end … … 241 272 flags = extractatt(top_uvalue, 'optionsflag') 242 273 index = where(options EQ 'Vecteur') 243 ; on change le flag surLongitude / x index274 ; We change the flag on Longitude / x index 244 275 flag = 1-flags[index, numdessinin] & flag = flag[0] 245 ; on le reeatribue276 ; We reattribute it 246 277 (*top_uvalue[1, findline(top_uvalue, 'optionsflag')])[index, numdessinin] = flag 247 278 end … … 252 283 flags = extractatt(top_uvalue, 'optionsflag') 253 284 index = where(options EQ 'Longitude / x index') 254 ; on change le flag surLongitude / x index285 ; We change the flag on Longitude / x index 255 286 flag = 1-flags[index, numdessinin] & flag = flag[0] 256 ; on le reeatribue287 ; We reattribute it 257 288 (*top_uvalue[1, findline(top_uvalue, 'optionsflag')])[index, numdessinin] = flag 258 ; maintenant on va changer les sliders definissant laboxzoom289 ; Now we will change sliders defining the boxzoom 259 290 domainid = widget_info(event.top, find_by_uname = 'domain') 260 291 boxzoom = (extractatt(top_uvalue, 'domaines'))[*, numdessinin] 261 ; on veut retrouver le type de grille qui est utilisee292 ; We want to find the type of grid which is used 262 293 currentfile = extractatt(top_uvalue, 'currentfile') 263 294 listgrid = (*(extractatt(top_uvalue, 'fileparameters'))[currentfile]).listgrid … … 268 299 vargrid = strupcase(listgrid[indexvar]) 269 300 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... 272 302 domdef, boxzoom, gridtype = vargrid, /xindex $ 273 303 , yindex = (flags[where(options EQ 'Latitude / y index'), numdessinin])[0] 274 304 widget_control, domainid, set_value = [lon1, lon2, boxzoom[2:3]] 275 305 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... 278 307 domdef, boxzoom, gridtype = vargrid $ 279 308 , yindex = (flags[where(options EQ 'Latitude / y index'), numdessinin])[0] … … 281 310 widget_control, domainid, set_value = [firstx, lastx, boxzoom[2:3]] 282 311 ENDELSE 283 ; on met a jour latop_uvalue312 ; We update the top_uvalue 284 313 widget_control, domainid, get_value = boxzoom 285 314 (*top_uvalue[1, findline(top_uvalue, 'domaines')])[*, numdessinin] = boxzoom … … 291 320 flags = extractatt(top_uvalue, 'optionsflag') 292 321 index = where(options EQ 'Latitude / y index') 293 ; on change le flag surLatitude / y index322 ; We change the flag on Latitude / y index 294 323 flag = 1-flags[index, numdessinin] & flag = flag[0] 295 ; on le reeatribue324 ; We reattribute it 296 325 (*top_uvalue[1, findline(top_uvalue, 'optionsflag')])[index, numdessinin] = flag 297 ; maintenant on va changer les sliders definissant laboxzoom326 ; Now we will change sliders defining the boxzoom 298 327 domainid = widget_info(event.top, find_by_uname = 'domain') 299 328 boxzoom = (extractatt(top_uvalue, 'domaines'))[*, numdessinin] 300 ; on veut retrouver le type de grille qui est utilisee329 ; We want to find the type of grid which is used 301 330 currentfile = extractatt(top_uvalue, 'currentfile') 302 331 listgrid = (*(extractatt(top_uvalue, 'fileparameters'))[currentfile]).listgrid … … 307 336 vargrid = strupcase(listgrid[indexvar]) 308 337 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... 311 339 domdef, boxzoom, gridtype = vargrid, /yindex $ 312 340 , xindex = (flags[where(options EQ 'Longitude / x index'), numdessinin])[0] 313 341 widget_control, domainid, set_value = [boxzoom[0:1], lat1, lat2] 314 342 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... 317 344 domdef, boxzoom, gridtype = vargrid $ 318 345 , xindex = (flags[where(options EQ 'Longitude / x index'), numdessinin])[0] … … 320 347 widget_control, domainid, set_value = [boxzoom[0:1], firsty, lasty] 321 348 ENDELSE 322 ; on met a jour latop_uvalue349 ; We update the top_uvalue 323 350 widget_control, domainid, get_value = boxzoom 324 351 (*top_uvalue[1, findline(top_uvalue, 'domaines')])[*, numdessinin] = boxzoom
Note: See TracChangeset
for help on using the changeset viewer.