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

Last change on this file since 232 was 232, checked in by pinsard, 17 years ago

improvements/corrections of some *.pro headers

  • 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;-
29;
30PRO letsdraw, base, COMMANDE = commande, _EXTRA = ex
31;
32  compile_opt idl2, strictarrsubs
33;
34@common
35; we recuperate the uvalue of base
36; widget_control,base, get_uvalue = top_uvalue
37; print, '*****************'
38; help,  top_uvalue, /struct
39; help,  top_uvalue.exextra, /struct
40   if NOT keyword_set(commande) then $
41    commande = buildcmd(base, _extra=ex)
42   if commande[0] EQ '' then return
43; on recupere la uvalue de base
44   widget_control, base, /hourglass
45   widget_control,base, get_uvalue = top_uvalue
46; print, '*****************'
47; help,  top_uvalue, /struct
48; print, '***..........****'
49;  help,  top_uvalue.exextra, /struct
50;  help,  top_uvalue.extra, /struct
51; print, '-*-*-*-*-*-*-*-*-*'
52; print, commande
53; help,mixstru(top_uvalue.exextra,top_uvalue.extra), /struct
54;
55;
56; we recuperate the id of the graphic associated to the widget of id base.
57   graphid = extractatt(top_uvalue, 'graphid')
58   widget_control, graphid, get_value = win
59; We select it (we will pass to it all commands concerning the window)
60   wset, win
61;   erase, 255                       ; we clean the window
62; 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.
63;    if !d.n_colors gt 256 then begin
64;       device, decomposed=1
65;       !p.background='ffffff'x
66;       plot,[0],[0]
67;       device, decomposed=0
68;    ENDIF
69;
70   smallout = long(extractatt(top_uvalue, 'smallout'))
71   numdessinout = smallout[2]-1
72;
73   tracecadre, smallout, /fill
74;
75;
76   options = extractatt(top_uvalue, 'options')
77   optionsflag = extractatt(top_uvalue, 'optionsflag')
78   portrait = (strtrim(optionsflag[where(options EQ 'Portrait/Landscape'), 0], 1))[0]
79
80;
81   createpro, ['@common' $
82               , 'noerase = 1' $
83               , 'key_portrait = '+ portrait $
84               , Commande] $
85    , filename =  myuniquetmpdir + 'xxx_oneplot.pro'
86;
87   inserthistory, base, Commande,'; beginning of '+strtrim(smallout[2], 1) $
88    , '; end of '+strtrim(smallout[2], 1)
89;
90   (*top_uvalue[1, findline(top_uvalue, 'penvs')])[numdessinout] = !p
91   (*top_uvalue[1, findline(top_uvalue, 'xenvs')])[numdessinout] = !x
92   (*top_uvalue[1, findline(top_uvalue, 'yenvs')])[numdessinout] = !y
93
94   return
95end
Note: See TracBrowser for help on using the repository browser.