]> git.donarmstrong.com Git - lilypond.git/blob - lily/complex-staff.cc
661d8332ed4b292ab8b4bf8d52df1220f0dd4465
[lilypond.git] / lily / complex-staff.cc
1 #include "complex-staff.hh"
2 #include "complex-walker.hh"
3 #include "score.hh"
4 #include "p-score.hh"
5 #include "staffsym.hh"
6 #include "score-column.hh"
7
8 const NO_LINES = 5;
9
10 /** Aside from putting fields right, this generates the staff symbol.
11  */
12 void
13 Complex_staff::set_output(PScore* pscore_l )
14 {
15     pstaff_l_ = new PStaff(pscore_l);
16     pscore_l_ = pscore_l;
17     pscore_l_->add(pstaff_l_);
18
19     Staff_symbol *span_p = new Staff_symbol(NO_LINES);
20     
21     Score_column* col_last
22         =score_l_->find_col(score_l_->last(), false);
23     Score_column* col_first=
24         score_l_->find_col(0, false);
25         
26     span_p->set_extent(col_first->pcol_l_->postbreak_p_,
27                        col_last->pcol_l_->prebreak_p_);
28
29     pscore_l_->typeset_spanner(span_p, pstaff_l_);
30 }
31
32
33 Staff_walker * 
34 Complex_staff::get_walker_p()
35 {
36     return new Complex_walker(this);
37 }