[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 |
---|
[231] | 20 | ; common.pro |
---|
| 21 | ; |
---|
[150] | 22 | ; @history |
---|
[157] | 23 | ; Sebastien Masson (smasson\@lodyc.jussieu.fr) |
---|
[231] | 24 | ; |
---|
| 25 | ; @version |
---|
[150] | 26 | ; $Id$ |
---|
[231] | 27 | ; |
---|
[2] | 28 | ;- |
---|
[232] | 29 | PRO 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 | ; |
---|
| 54 | ; |
---|
[150] | 55 | ; we recuperate the id of the graphic associated to the widget of id base. |
---|
[2] | 56 | graphid = extractatt(top_uvalue, 'graphid') |
---|
| 57 | widget_control, graphid, get_value = win |
---|
[150] | 58 | ; We select it (we will pass to it all commands concerning the window) |
---|
[2] | 59 | wset, win |
---|
[150] | 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. |
---|
[2] | 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 | ; |
---|
[49] | 69 | smallout = long(extractatt(top_uvalue, 'smallout')) |
---|
| 70 | numdessinout = smallout[2]-1 |
---|
[2] | 71 | ; |
---|
[49] | 72 | tracecadre, smallout, /fill |
---|
[2] | 73 | ; |
---|
| 74 | ; |
---|
[231] | 75 | options = extractatt(top_uvalue, 'options') |
---|
[2] | 76 | optionsflag = extractatt(top_uvalue, 'optionsflag') |
---|
| 77 | portrait = (strtrim(optionsflag[where(options EQ 'Portrait/Landscape'), 0], 1))[0] |
---|
[231] | 78 | |
---|
[2] | 79 | ; |
---|
| 80 | createpro, ['@common' $ |
---|
| 81 | , 'noerase = 1' $ |
---|
[69] | 82 | , 'key_portrait = '+ portrait $ |
---|
[2] | 83 | , Commande] $ |
---|
[49] | 84 | , filename = myuniquetmpdir + 'xxx_oneplot.pro' |
---|
[2] | 85 | ; |
---|
[49] | 86 | inserthistory, base, Commande,'; beginning of '+strtrim(smallout[2], 1) $ |
---|
| 87 | , '; end of '+strtrim(smallout[2], 1) |
---|
[2] | 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 |
---|
| 94 | end |
---|