;+ ; ; @file_comments ; It is the procedure launching the drawing. ; If we do not give the command to it, it call ; construitcommande to know what to trace. ; ; @categories ; ; @param BASE {in}{required} ; The id of the widget where apply the drawing. ; ; @keyword COMMANDE {type=string} ; A string of the style: read_data('sst'...),... ; ; @keyword _EXTRA ; Used to pass keywords ; ; @uses ; common ; ; @history ; Sebastien Masson (smasson\@lodyc.jussieu.fr) ; ; @version ; $Id$ ; ;- PRO letsdraw, base, COMMANDE=commande, _EXTRA=ex ; compile_opt idl2, strictarrsubs ; @common ; we recuperate the uvalue of base ; widget_control,base, get_uvalue = top_uvalue ; print, '*****************' ; help, top_uvalue, /struct ; help, top_uvalue.exextra, /struct if NOT keyword_set(commande) then $ commande = buildcmd(base, _extra=ex) if commande[0] EQ '' then return ; on recupere la uvalue de base widget_control, base, /hourglass widget_control,base, get_uvalue = top_uvalue ; print, '*****************' ; help, top_uvalue, /struct ; print, '***..........****' ; help, top_uvalue.exextra, /struct ; help, top_uvalue.extra, /struct ; print, '-*-*-*-*-*-*-*-*-*' ; print, commande ; help,mixstru(top_uvalue.exextra,top_uvalue.extra), /struct ; ; ; we recuperate the id of the graphic associated to the widget of id base. graphid = extractatt(top_uvalue, 'graphid') widget_control, graphid, get_value = win ; We select it (we will pass to it all commands concerning the window) wset, win ; erase, 255 ; we clean the window ; 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. ; if !d.n_colors gt 256 then begin ; device, decomposed=1 ; !p.background='ffffff'x ; plot,[0],[0] ; device, decomposed=0 ; ENDIF ; smallout = long(extractatt(top_uvalue, 'smallout')) numdessinout = smallout[2]-1 ; tracecadre, smallout, /fill ; ; options = extractatt(top_uvalue, 'options') optionsflag = extractatt(top_uvalue, 'optionsflag') portrait = (strtrim(optionsflag[where(options EQ 'Portrait/Landscape'), 0], 1))[0] ; createpro, ['@common' $ , 'noerase = 1' $ , 'key_portrait = '+ portrait $ , Commande] $ , filename = myuniquetmpdir + 'xxx_oneplot.pro' ; inserthistory, base, Commande,'; beginning of '+strtrim(smallout[2], 1) $ , '; end of '+strtrim(smallout[2], 1) ; (*top_uvalue[1, findline(top_uvalue, 'penvs')])[numdessinout] = !p (*top_uvalue[1, findline(top_uvalue, 'xenvs')])[numdessinout] = !x (*top_uvalue[1, findline(top_uvalue, 'yenvs')])[numdessinout] = !y return end