]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/paper-def.hh
release: 1.3.36
[lilypond.git] / lily / include / paper-def.hh
1 /*
2   paper-def.hh -- declare Paper_def
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1996--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9
10 #ifndef PAPER_DEF_HH
11 #define PAPER_DEF_HH
12
13 #include <map>
14
15 #include "lily-proto.hh"
16 #include "lily-guile.hh"
17 #include "real.hh"
18
19 #include "moment.hh"
20 #include "array.hh"
21 #include "interval.hh"
22 #include "music-output-def.hh"
23
24 /** 
25
26   Symbols, dimensions and constants pertaining to visual output.
27
28   This struct takes care of all kinds of symbols, dimensions and
29   constants. Most of them are related to the point-size of the fonts,
30   so therefore, the lookup table for symbols is also in here.
31
32   TODO: 
33   
34   add support for multiple fontsizes 
35
36   remove all utility funcs 
37   
38
39   add support for other len->wid conversions.
40
41
42   Interesting variables:
43   
44   /// The distance between lines
45   interline
46   
47 */
48 class Paper_def : public Music_output_def 
49 {
50   map<int, Lookup *> *lookup_p_tab_p_;
51   static int default_count_i_;
52
53 protected:
54   VIRTUAL_COPY_CONS(Music_output_def);
55
56 public:    
57   virtual ~Paper_def ();
58
59   Array<Interval> shape_int_a_;
60   /*
61     JUNKME
62    */
63   Real get_realvar (SCM symbol) const;
64   Real get_var (String id) const;
65
66   
67   void reinit ();
68   Paper_def ();
69   void set_lookup (int, Lookup*);
70
71   Paper_def (Paper_def const&);
72   /** The distance between beams of multiplicity_i
73       JUNKME
74   */
75   Real interbeam_f (int multiplicity_i) const;
76
77   Interval line_dimensions_int (int) const;
78
79   void print () const;
80
81   Lookup const * lookup_l (int sz) const;       // TODO naming
82
83
84   virtual int get_next_default_count () const;
85   static void reset_default_count();
86
87   void output_settings (Paper_outputter*) const;
88
89   Paper_stream* paper_stream_p () const;
90   String base_output_str () const;
91
92   // urg
93   friend int yyparse (void*);
94 };
95
96 #endif // Paper_def_HH