]> git.donarmstrong.com Git - lilypond.git/blob - paper.cc
6e5e87bda8329aa3338752fe6bdebb69b0ab08da
[lilypond.git] / paper.cc
1 #include "paper.hh"
2 #include "debug.hh"
3 #include "lookupsyms.hh"
4 #include "dimen.hh"
5 #include "textdb.hh"
6
7 Paperdef::Paperdef()
8 {
9     linewidth = convert_dimen(15,"cm");         // in cm for now
10     whole_width= convert_dimen(2,"cm");
11     lookup_ = new Lookup();
12     parse();
13     
14 }
15
16 void 
17 Paperdef::parse()
18 {
19     Text_db symini("symbol.ini");
20
21     
22     while (!symini.eof()) {
23         
24          Text_record  r(  symini++);
25         
26          if  (r[0] == "symboltables")
27              lookup_->parse(symini);     
28     }
29 }
30
31 Paperdef::~Paperdef()
32 {
33     delete lookup_;
34 }
35
36 Real
37 Paperdef::interline() const
38 {
39     return lookup_->ball(4).dim.y.length();
40 }
41
42 Real
43 Paperdef::standard_height() const
44 {
45     return convert_dimen(20,"pt");
46 }
47
48 void
49 Paperdef::print() const
50 {
51 #ifndef NPRINT
52     mtor << "Paper {width: " << print_dimen(linewidth);
53     mtor << "whole: " << print_dimen(whole_width);
54     mtor << "out: " <<outfile;
55     mtor << "}\n";
56 #endif
57 }