]> git.donarmstrong.com Git - lilypond.git/blob - lily/rest.cc
release: 0.0.39-1
[lilypond.git] / lily / rest.cc
1 #include "rest.hh"
2 #include "dimen.hh" 
3 #include "debug.hh"
4 #include "paper-def.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
16 void
17 Rest::do_print()const
18 {
19 #ifndef NPRINT
20     mtor << "Rest "<<balltype<< "dots " << dots;
21     Item::print();
22 #endif
23 }
24
25 Molecule*
26 Rest::brew_molecule_p()const
27 {
28     Paper_def *p =paper();
29
30     Symbol s;
31     s = p->lookup_p_->rest(balltype);
32     
33     Molecule *m = new Molecule(Atom(s));
34     if (dots) {
35         Symbol d =p->lookup_p_->dots(dots);
36         Molecule dm;
37         dm.add(Atom(d));
38         m->add_right(dm);
39     }
40     return m;
41 }
42