source: trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/createhistory.pro @ 297

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

corrections of some headers and parameters and keywords case. change of pro2href to replace proidl

  • 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;
5; @categories
6;
7; @param BASE {in}{required}
8; The id of the widget where apply the drawing.
9;
10; @param SMALL
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,
20; conserving the aspect rapport (except when REMPLI is activated).
21;
22; @returns
23;
24; @uses
25;
26; @restrictions
27;
28; @examples
29;
30; @history
31;
32; @version
33; $Id$
34;
35; @todo
36; seb: je ne suis pas sur pour les param,
37; documenter le reste.
38;
39;-
40;
41PRO createhistory, base, small
42;
43; we save globalcommand in globaloldcommand
44;
45  compile_opt idl2, strictarrsubs
46;
47   widget_control,base, get_uvalue = top_uvalue
48   globalcommand = extractatt(top_uvalue, 'globalcommand')
49   *top_uvalue[1, findline(top_uvalue, 'globaloldcommand')] = globalcommand
50; portrait or landscape ???
51   options = extractatt(top_uvalue, 'options')
52   optionsflag = extractatt(top_uvalue, 'optionsflag')
53   portrait = (optionsflag[where(options EQ 'Portrait/Landscape'), 0])[0]
54; composition du text contennu ds history.pro
55   texte = ['@common' $
56            , ' ' $
57            , 'if keyword_set(postscript) then begin'  $
58            , '    noerase = 1' $
59            , '    openps, infowidget = infowidget, portrait = ' + strtrim(portrait, 2) $
60            , 'endif' $
61            , ' ' $
62            , '; beginning of 1' $
63            , ';' $
64            , '; end of 1']
65   if small[0]*small[1] GT 1 then begin
66      for draw = 1, small[0]*small[1]-1  do begin
67         texte = [texte $
68                  , '; beginning of '+strtrim(draw+1, 2) $
69                  , 'noerase=1' $
70                  , '; end of '+strtrim(draw+1, 2)]
71      endfor
72   ENDIF
73   texte = [texte $
74            , 'if keyword_set(postscript) then begin' $
75            , '    closeps, infowidget = infowidget' $
76            , '    printps' $
77            , 'endif']
78; the new globalcommand
79   *top_uvalue[1, findline(top_uvalue, 'globalcommand')] = texte
80;-------------------------------------------------------------
81;  for i = 0, n_elements(texte)-1 do print, texte[i]
82;-------------------------------------------------------------
83   return
84end
Note: See TracBrowser for help on using the repository browser.