]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/paper-def.hh
release: 0.0.72pre
[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,1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
8
9
10 #ifndef PAPER_DEF_HH
11 #define PAPER_DEF_HH
12 #include "lily-proto.hh"
13
14 #include "real.hh"
15 #include "string.hh"
16 #include "moment.hh"
17
18
19 /** 
20
21   symbols, dimensions and constants
22
23   This struct takes care of all kinds of symbols, dimensions and
24   constants. Most of them are related to the point-size of the fonts,
25   so therefore, the lookup table for symbols is also in here.
26
27   TODO: 
28   
29   add support for multiple fontsizes 
30   split into "Input_paper_def" and Paper_def
31
32   add support for other len->wid conversions.
33
34   Input_engraver should be in here.
35  */
36 class Paper_def {
37     Lookup *lookup_p_;
38     Assoc<String, Real> *real_vars_p_;
39
40 public:    
41     String outfile_str_;
42     
43     
44     /* *************** */
45     void set_var(String, Real);
46     Real get_var (String)const;
47     void reinit();
48     Paper_def();
49     void set(Lookup*);
50     ~Paper_def();
51     Paper_def(Paper_def const&);
52     /// The distance between beams
53     Real interbeam_f()const;
54     /**
55       The distance between lines
56      */
57     Real interline_f()const;
58     /// half the distance between lines
59     Real internote_f()const;
60
61     /// thickness of the standard line 
62     Real rule_thickness()const;
63     Real whole_width()const;
64     Real linewidth_f()const;
65     /// height of the staff
66     Real standard_height()const;
67
68     /// width of a quaver ball
69     Real note_width() const;
70     void print() const;
71
72     Lookup const * lookup_l();  // TODO naming
73
74     /** convert a duration to an idealspacing
75       influence using the geometric_ and  parameters.
76       */
77     Real duration_to_dist(Moment);
78 };
79
80 #endif // Paper_def_HH
81