]> git.donarmstrong.com Git - lilypond.git/blob - src/spanner.cc
2d34f9e477aa409c86fd6a4bfb3b70b7cd10443d
[lilypond.git] / src / spanner.cc
1 #include "pstaff.hh"
2 #include "debug.hh"
3 #include "pscore.hh"
4 #include "spanner.hh"
5 #include "symbol.hh"
6 #include "molecule.hh"
7 #include "pcol.hh"
8
9 String
10 Spanner::TeXstring() const
11 {
12     
13     assert(output);
14     return output->TeXstring();
15 }
16
17 Spanner::Spanner()
18 {
19     pstaff_=0;
20     left = right = 0;
21 }
22
23 void
24 Spanner::process()
25 {
26 }
27
28 void
29 Spanner::preprocess()
30 {
31 }
32
33 Interval
34 Spanner::width()const
35 {
36     Real r =right->hpos,
37         l= left->hpos;
38     assert(r>=l);
39         
40     return Interval(0, r-l);
41 }
42
43 Paperdef*
44 Spanner::paper()const
45 {
46     assert(pstaff_);
47     return pstaff_->pscore_->paper_;
48 }
49 void
50 Spanner::print()const
51 {
52 #ifndef NPRINT
53     mtor << "Spanner { ";
54     if (output) {
55         mtor << "Output ";
56         output->print();
57     }
58     
59     mtor << "}\n";
60 #endif
61 }