]> git.donarmstrong.com Git - lilypond.git/blob - melodicstaff.cc
release: 0.0.6
[lilypond.git] / melodicstaff.cc
1 #include "melodicstaff.hh"
2 #include "paper.hh"
3 #include "molecule.hh"
4 #include "linestaff.hh"
5 #include "rhythmstaff.hh"
6 #include "sccol.hh" 
7
8 void
9 Melodic_staff::set_output(PScore*ps)
10 {
11     theline = new Linestaff(5,ps);
12     Simple_staff::set_output(ps);
13 }
14
15 void
16 Melodic_column::typeset_command(Command *com, int breakst)
17 {
18     Item *i = create_command_item(com);
19     typeset_item(i, breakst);
20 }
21
22 void
23 Melodic_column::typeset_req(Request *rq)
24 {
25     Item *i = create_req_item(rq);
26     if (rq->note()) {
27         int h = rq->note()->height();
28         Real dy = staff_->paper()->interline()/2;
29         i->output->translate(Offset(0,(h-2)*dy));
30     }
31     typeset_item(i);
32 }
33
34 /*
35   creation
36   */
37 Staff *
38 get_new_melodicstaff()
39 {
40     return new Melodic_staff;
41 }
42
43
44 Staff_column*
45 Melodic_staff::create_col(Score_column*s)
46 {
47     return new Melodic_column(s,this);
48 }
49
50 Melodic_staff*
51 Melodic_staff::clone()const
52 {
53     return new Melodic_staff(*this);
54 }