source: trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/letsdraw.pro @ 495

Last change on this file since 495 was 495, checked in by pinsard, 10 years ago

fix thanks to coding rules; typo; dupe empty lines; trailing blanks

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.3 KB
RevLine 
[2]1;+
[231]2;
3; @file_comments
4; It is the procedure launching the drawing.
5; If we do not give the command to it, it call
[150]6; construitcommande to know what to trace.
[2]7;
[150]8; @categories
[2]9;
[150]10; @param BASE {in}{required}
11; The id of the widget where apply the drawing.
[231]12;
[163]13; @keyword COMMANDE {type=string}
[150]14; A string of the style: read_data('sst'...),...
[2]15;
[150]16; @keyword _EXTRA
[231]17; Used to pass keywords
18;
[150]19; @uses
[370]20; <pro>common</pro>
[231]21;
[150]22; @history
[157]23; Sebastien Masson (smasson\@lodyc.jussieu.fr)
[231]24;
25; @version
[150]26; $Id$
[231]27;
[2]28;-
[327]29PRO letsdraw, base, COMMANDE=commande, _EXTRA=ex
[114]30;
31  compile_opt idl2, strictarrsubs
32;
[2]33@common
[150]34; we recuperate the uvalue of base
[2]35; widget_control,base, get_uvalue = top_uvalue
36; print, '*****************'
37; help,  top_uvalue, /struct
38; help,  top_uvalue.exextra, /struct
39   if NOT keyword_set(commande) then $
[69]40    commande = buildcmd(base, _extra=ex)
[2]41   if commande[0] EQ '' then return
42; on recupere la uvalue de base
43   widget_control, base, /hourglass
44   widget_control,base, get_uvalue = top_uvalue
45; print, '*****************'
46; help,  top_uvalue, /struct
47; print, '***..........****'
48;  help,  top_uvalue.exextra, /struct
49;  help,  top_uvalue.extra, /struct
50; print, '-*-*-*-*-*-*-*-*-*'
51; print, commande
52; help,mixstru(top_uvalue.exextra,top_uvalue.extra), /struct
53;
[150]54; we recuperate the id of the graphic associated to the widget of id base.
[2]55   graphid = extractatt(top_uvalue, 'graphid')
56   widget_control, graphid, get_value = win
[150]57; We select it (we will pass to it all commands concerning the window)
[2]58   wset, win
[479]59
[49]60   smallout = long(extractatt(top_uvalue, 'smallout'))
61   numdessinout = smallout[2]-1
[2]62;
[49]63   tracecadre, smallout, /fill
[2]64;
[231]65   options = extractatt(top_uvalue, 'options')
[2]66   optionsflag = extractatt(top_uvalue, 'optionsflag')
67   portrait = (strtrim(optionsflag[where(options EQ 'Portrait/Landscape'), 0], 1))[0]
[231]68
[2]69;
70   createpro, ['@common' $
71               , 'noerase = 1' $
[69]72               , 'key_portrait = '+ portrait $
[2]73               , Commande] $
[49]74    , filename =  myuniquetmpdir + 'xxx_oneplot.pro'
[2]75;
[49]76   inserthistory, base, Commande,'; beginning of '+strtrim(smallout[2], 1) $
77    , '; end of '+strtrim(smallout[2], 1)
[2]78;
79   (*top_uvalue[1, findline(top_uvalue, 'penvs')])[numdessinout] = !p
80   (*top_uvalue[1, findline(top_uvalue, 'xenvs')])[numdessinout] = !x
81   (*top_uvalue[1, findline(top_uvalue, 'yenvs')])[numdessinout] = !y
82
83   return
84end
Note: See TracBrowser for help on using the repository browser.