[150] | 1 | ;+ |
---|
[231] | 2 | ; |
---|
[150] | 3 | ; @file_comments |
---|
| 4 | ; |
---|
| 5 | ; @categories |
---|
| 6 | ; |
---|
| 7 | ; @param BASE {in}{required} |
---|
| 8 | ; The id of the widget where apply the drawing. |
---|
| 9 | ; |
---|
| 10 | ; @param SMALL |
---|
[231] | 11 | ; Vector composed of 3 or 4 elements, applied to make a drawing on a small |
---|
| 12 | ; portion of a page or screen. It delimit the zone where the drawing will |
---|
| 13 | ; be done. If there is 4 elements: then is constituted of coordinates (expressed |
---|
| 14 | ; in cm located from the up and left corner of the page or the window (in portrait |
---|
| 15 | ; like in landscape)) of the bottom and left corner and of the up and right corner |
---|
| 16 | ; of the drawing zone. If there is 3 elements: in this case, we divide the page or |
---|
| 17 | ; the screen in small[0] columns and in small[1] lines the drawing made in the box |
---|
| 18 | ; numbered small[2]. The numerotation starting up and left by the number 1 and then, |
---|
| 19 | ; following the writing direction. By default, we make the largest drawing we can do, |
---|
[367] | 20 | ; conserving the aspect ratio (except when REMPLI is activated). |
---|
[231] | 21 | ; |
---|
[150] | 22 | ; @returns |
---|
[231] | 23 | ; |
---|
[150] | 24 | ; @uses |
---|
[231] | 25 | ; |
---|
[150] | 26 | ; @restrictions |
---|
[231] | 27 | ; |
---|
[150] | 28 | ; @examples |
---|
[231] | 29 | ; |
---|
[150] | 30 | ; @history |
---|
[231] | 31 | ; |
---|
| 32 | ; @version |
---|
[150] | 33 | ; $Id$ |
---|
| 34 | ; |
---|
| 35 | ; @todo |
---|
| 36 | ; seb: je ne suis pas sur pour les param, |
---|
| 37 | ; documenter le reste. |
---|
| 38 | ; |
---|
| 39 | ;- |
---|
[49] | 40 | PRO createhistory, base, small |
---|
[2] | 41 | ; |
---|
| 42 | ; we save globalcommand in globaloldcommand |
---|
[114] | 43 | ; |
---|
| 44 | compile_opt idl2, strictarrsubs |
---|
| 45 | ; |
---|
[2] | 46 | widget_control,base, get_uvalue = top_uvalue |
---|
| 47 | globalcommand = extractatt(top_uvalue, 'globalcommand') |
---|
| 48 | *top_uvalue[1, findline(top_uvalue, 'globaloldcommand')] = globalcommand |
---|
[69] | 49 | ; portrait or landscape ??? |
---|
[231] | 50 | options = extractatt(top_uvalue, 'options') |
---|
[69] | 51 | optionsflag = extractatt(top_uvalue, 'optionsflag') |
---|
| 52 | portrait = (optionsflag[where(options EQ 'Portrait/Landscape'), 0])[0] |
---|
[2] | 53 | ; composition du text contennu ds history.pro |
---|
| 54 | texte = ['@common' $ |
---|
| 55 | , ' ' $ |
---|
| 56 | , 'if keyword_set(postscript) then begin' $ |
---|
| 57 | , ' noerase = 1' $ |
---|
[69] | 58 | , ' openps, infowidget = infowidget, portrait = ' + strtrim(portrait, 2) $ |
---|
[2] | 59 | , 'endif' $ |
---|
| 60 | , ' ' $ |
---|
| 61 | , '; beginning of 1' $ |
---|
| 62 | , ';' $ |
---|
| 63 | , '; end of 1'] |
---|
[49] | 64 | if small[0]*small[1] GT 1 then begin |
---|
| 65 | for draw = 1, small[0]*small[1]-1 do begin |
---|
[2] | 66 | texte = [texte $ |
---|
| 67 | , '; beginning of '+strtrim(draw+1, 2) $ |
---|
| 68 | , 'noerase=1' $ |
---|
| 69 | , '; end of '+strtrim(draw+1, 2)] |
---|
| 70 | endfor |
---|
| 71 | ENDIF |
---|
| 72 | texte = [texte $ |
---|
| 73 | , 'if keyword_set(postscript) then begin' $ |
---|
| 74 | , ' closeps, infowidget = infowidget' $ |
---|
[49] | 75 | , ' printps' $ |
---|
[2] | 76 | , 'endif'] |
---|
| 77 | ; the new globalcommand |
---|
| 78 | *top_uvalue[1, findline(top_uvalue, 'globalcommand')] = texte |
---|
| 79 | ;------------------------------------------------------------- |
---|
[69] | 80 | ; for i = 0, n_elements(texte)-1 do print, texte[i] |
---|
[2] | 81 | ;------------------------------------------------------------- |
---|
| 82 | return |
---|
| 83 | end |
---|