]> git.donarmstrong.com Git - lilypond.git/blob - rhythmstaff.cc
7e2706e02dc723107c77723f50a11e6c8d4820a5
[lilypond.git] / rhythmstaff.cc
1 #include "molecule.hh"
2 #include "stem.hh"
3 #include "linestaff.hh"
4 #include "rhythmstaff.hh"
5 #include "paper.hh"
6 #include "sccol.hh" 
7
8
9 void
10 Rhythmic_staff::set_output(PScore*ps)
11 {
12     theline = new Linestaff(1,ps);
13     Simple_staff::set_output(ps);
14 }
15
16
17 void
18 Rhythmic_column::typeset_command(Command *com, int breakst)
19 {
20     Item *i =new Item;
21     Molecule*m = create_command_mol(com);
22     i->output=m;
23     m->translate(Offset(0,
24                         -staff_->score_->paper_->standard_height()/2));
25     typeset_item(i, breakst);
26 }
27
28 void
29 Rhythmic_column::typeset_req(Request *rq)
30 {
31     Item *i =new Item;
32     Molecule*m=create_req_mol(rq);
33     i->output=m;
34     typeset_item(i);
35 }
36
37 void
38 Rhythmic_column::typeset_stem(Stem_req*rq)
39 {
40     Stem * s = new Stem(0);
41     s->minnote = s->maxnote = 0;
42     s->flag = rq->stem_number;
43     s->calculate();
44     typeset_item(s);
45     s->brew_molecole();
46 }
47
48 /*
49   creation
50   */
51 Staff *
52 get_new_rhythmstaff()
53 {
54     return new Rhythmic_staff;
55 }
56
57
58 Staff_column*
59 Rhythmic_staff::create_col(Score_column*s)
60 {
61     return new Rhythmic_column(s,this);
62 }
63
64 Rhythmic_staff*
65 Rhythmic_staff::clone() const
66 {
67     return new Rhythmic_staff(*this);
68 }