;+ ; ; @file_comments ; ; @categories ; ; @param BASE {in}{required} ; The id of the widget where apply the drawing. ; ; @param SMALL ; Vector composed of 3 or 4 elements, applied to make a drawing on a small ; portion of a page or screen. It delimit the zone where the drawing will ; be done. If there is 4 elements: then is constituted of coordinates (expressed ; in cm located from the up and left corner of the page or the window (in portrait ; like in landscape)) of the bottom and left corner and of the up and right corner ; of the drawing zone. If there is 3 elements: in this case, we divide the page or ; the screen in small[0] columns and in small[1] lines the drawing made in the box ; numbered small[2]. The numerotation starting up and left by the number 1 and then, ; following the writing direction. By default, we make the largest drawing we can do, ; conserving the aspect ratio (except when REMPLI is activated). ; ; @returns ; ; @uses ; ; @restrictions ; ; @examples ; ; @history ; ; @version ; $Id$ ; ; @todo ; seb: je ne suis pas sur pour les param, ; documenter le reste. ; ;- PRO createhistory, base, small ; ; we save globalcommand in globaloldcommand ; compile_opt idl2, strictarrsubs ; widget_control,base, get_uvalue = top_uvalue globalcommand = extractatt(top_uvalue, 'globalcommand') *top_uvalue[1, findline(top_uvalue, 'globaloldcommand')] = globalcommand ; portrait or landscape ??? options = extractatt(top_uvalue, 'options') optionsflag = extractatt(top_uvalue, 'optionsflag') portrait = (optionsflag[where(options EQ 'Portrait/Landscape'), 0])[0] ; composition du text contenu dans history.pro texte = ['@common' $ , ' ' $ , 'if keyword_set(postscript) then begin' $ , ' noerase = 1' $ , ' openps, infowidget = infowidget, portrait = ' + strtrim(portrait, 2) $ , 'endif' $ , ' ' $ , '; beginning of 1' $ , ';' $ , '; end of 1'] if small[0]*small[1] GT 1 then begin for draw = 1, small[0]*small[1]-1 do begin texte = [texte $ , '; beginning of '+strtrim(draw+1, 2) $ , 'noerase=1' $ , '; end of '+strtrim(draw+1, 2)] endfor ENDIF texte = [texte $ , 'if keyword_set(postscript) then begin' $ , ' closeps, infowidget = infowidget' $ , ' printps' $ , 'endif'] ; the new globalcommand *top_uvalue[1, findline(top_uvalue, 'globalcommand')] = texte ;------------------------------------------------------------- ; for i = 0, n_elements(texte)-1 do print, texte[i] ;------------------------------------------------------------- return end