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