]> git.donarmstrong.com Git - lilypond.git/blob - src/rest.cc
215b102fed21a3cb4ec93601f9799b40032122dd
[lilypond.git] / src / rest.cc
1 #include "rest.hh"
2 #include "dimen.hh" 
3 #include "debug.hh"
4 #include "paper.hh"
5 #include "lookup.hh"
6 #include "molecule.hh"
7
8
9 Rest::Rest(int t, int d)
10 {
11     balltype = t;
12     dots = d;
13 }
14
15 void
16 Rest::print()const
17 {
18     mtor << "Rest "<<balltype<< "dots " << dots;
19     Item::print();
20 }
21
22 Molecule*
23 Rest::brew_molecule_p()const
24 {
25     Paperdef *p =paper();
26
27     Symbol s;
28     s = p->lookup_p_->rest(balltype);
29     
30     Molecule *m = new Molecule(Atom(s));
31     if (dots) {
32         Symbol d =p->lookup_p_->dots(dots);
33         Molecule dm;
34         dm.add(Atom(d));
35         m->add_right(dm);
36     }
37     return m;
38 }
39