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

Last change on this file since 367 was 327, checked in by pinsard, 16 years ago

modification of headers : mainly blanks around = sign for keywords in declaration of function and pro

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.7 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; 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;
55; we recuperate the id of the graphic associated to the widget of id base.
56   graphid = extractatt(top_uvalue, 'graphid')
57   widget_control, graphid, get_value = win
58; We select it (we will pass to it all commands concerning the window)
59   wset, win
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.
62;    if !d.n_colors gt 256 then begin
63;       device, decomposed=1
64;       !p.background='ffffff'x
65;       plot,[0],[0]
66;       device, decomposed=0
67;    ENDIF
68;
69   smallout = long(extractatt(top_uvalue, 'smallout'))
70   numdessinout = smallout[2]-1
71;
72   tracecadre, smallout, /fill
73;
74;
75   options = extractatt(top_uvalue, 'options')
76   optionsflag = extractatt(top_uvalue, 'optionsflag')
77   portrait = (strtrim(optionsflag[where(options EQ 'Portrait/Landscape'), 0], 1))[0]
78
79;
80   createpro, ['@common' $
81               , 'noerase = 1' $
82               , 'key_portrait = '+ portrait $
83               , Commande] $
84    , filename =  myuniquetmpdir + 'xxx_oneplot.pro'
85;
86   inserthistory, base, Commande,'; beginning of '+strtrim(smallout[2], 1) $
87    , '; end of '+strtrim(smallout[2], 1)
88;
89   (*top_uvalue[1, findline(top_uvalue, 'penvs')])[numdessinout] = !p
90   (*top_uvalue[1, findline(top_uvalue, 'xenvs')])[numdessinout] = !x
91   (*top_uvalue[1, findline(top_uvalue, 'yenvs')])[numdessinout] = !y
92
93   return
94end
Note: See TracBrowser for help on using the repository browser.