]> git.donarmstrong.com Git - lilypond.git/blob - src/rhythmstaff.cc
release: 0.0.9
[lilypond.git] / src / rhythmstaff.cc
1 #include "molecule.hh"
2 #include "notehead.hh"
3 #include "stem.hh"
4 #include "linestaff.hh"
5 #include "rhythmstaff.hh"
6 #include "paper.hh"
7 #include "sccol.hh" 
8 #include "rest.hh"
9
10 void
11 Rhythmic_staff::set_output(PScore*ps)
12 {
13     theline = new Linestaff(1,ps);
14     Simple_staff::set_output(ps);
15 }
16
17 Item *
18 Rhythmic_staff::get_TYPESET_item(Command *com)
19 {
20     Item *i = Simple_staff::get_TYPESET_item(com);
21     i->translate(Offset(0,
22                         -score_->paper_->standard_height()/2));
23     return i;
24 }
25
26 Notehead*
27 Rhythmic_staff::get_notehead(Note_req *rq)
28 {
29     int b = rq->rhythmic()->balltype;
30     int d = rq->rhythmic()->dots;
31
32     Notehead *n =new Notehead(1);
33     n->balltype = b;
34     n->dots =d;
35     n->position = 0;
36     return n;
37 }
38
39 Stem *
40 Rhythmic_staff::get_stem(Stem_req*rq)
41 {
42     Stem * s = new Stem(0);
43     s->flag = rq->stem_number;
44     return s;    
45 }
46
47 /*
48   creation
49   */
50 Staff *
51 get_new_rhythmstaff()
52 {
53     return new Rhythmic_staff;
54 }
55
56
57
58 Rhythmic_staff*
59 Rhythmic_staff::clone() const
60 {
61     return new Rhythmic_staff(*this);
62 }