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