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

Last change on this file since 150 was 150, checked in by navarro, 18 years ago

english and nicer header (3a)

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