]> git.donarmstrong.com Git - lilypond.git/blob - src/spanner.cc
release: 0.0.20
[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 void
9 Spanner::calculate()
10 {
11 }
12 String
13 Spanner::TeXstring() const
14 {
15     
16     assert(output);
17     return output->TeXstring();
18 }
19
20 Spanner::Spanner()
21 {
22     pstaff_=0;
23     left = right = 0;
24 }
25
26 void
27 Spanner::process()
28 {
29 }
30
31 void
32 Spanner::preprocess()
33 {
34 }
35
36 Interval
37 Spanner::width()const
38 {
39     Real r =right->hpos,
40         l= left->hpos;
41     assert(r>=l);
42         
43     return Interval(0, r-l);
44 }
45
46 Paperdef*
47 Spanner::paper()const
48 {
49     assert(pstaff_);
50     return pstaff_->pscore_->paper_;
51 }
52 void
53 Spanner::print()const
54 {
55 #ifndef NPRINT
56     mtor << "Spanner { ";
57     if (output) {
58         mtor << "Output ";
59         output->print();
60     }
61     
62     mtor << "}\n";
63 #endif
64 }
65 Spanner::~Spanner()
66 {
67     delete output;
68 }