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

Last change on this file 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
Line 
1;+
2;
3; @file_comments
4; It is the procedure launching the drawing.
5; If we do not give the command to it, it call
6; construitcommande to know what to trace.
7;
8; @categories
9;
10; @param BASE {in}{required}
11; The id of the widget where apply the drawing.
12;
13; @keyword COMMANDE {type=string}
14; A string of the style: read_data('sst'...),...
15;
16; @keyword _EXTRA
17; Used to pass keywords
18;
19; @uses
20; <pro>common</pro>
21;
22; @history
23; Sebastien Masson (smasson\@lodyc.jussieu.fr)
24;
25; @version
26; $Id$
27;
28;-
29PRO letsdraw, base, COMMANDE=commande, _EXTRA=ex
30;
31  compile_opt idl2, strictarrsubs
32;
33@common
34; we recuperate the uvalue of base
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 $
40    commande = buildcmd(base, _extra=ex)
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;
54; we recuperate the id of the graphic associated to the widget of id base.
55   graphid = extractatt(top_uvalue, 'graphid')
56   widget_control, graphid, get_value = win
57; We select it (we will pass to it all commands concerning the window)
58   wset, win
59
60   smallout = long(extractatt(top_uvalue, 'smallout'))
61   numdessinout = smallout[2]-1
62;
63   tracecadre, smallout, /fill
64;
65   options = extractatt(top_uvalue, 'options')
66   optionsflag = extractatt(top_uvalue, 'optionsflag')
67   portrait = (strtrim(optionsflag[where(options EQ 'Portrait/Landscape'), 0], 1))[0]
68
69;
70   createpro, ['@common' $
71               , 'noerase = 1' $
72               , 'key_portrait = '+ portrait $
73               , Commande] $
74    , filename =  myuniquetmpdir + 'xxx_oneplot.pro'
75;
76   inserthistory, base, Commande,'; beginning of '+strtrim(smallout[2], 1) $
77    , '; end of '+strtrim(smallout[2], 1)
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.