lilypond-0.1.33
[lilypond.git] / src / simplestaff.cc
blob4f7b5bd2e22644ecb9b7e40193c48183a4f289b6
1 #include "request.hh"
2 #include "voice.hh"
3 #include "staffwalker.hh"
4 #include "debug.hh"
5 #include "clef.hh"
6 #include "staff.hh"
7 #include "command.hh"
8 #include "simplestaff.hh"
9 #include "sccol.hh"
10 #include "simplewalker.hh"
14 Simple_column::Simple_column(Score_column*s, Simple_staff *rs)
15 : Staff_column(s)
17 stem_requester_len = 0;
18 stem_ = 0;
19 staff_l_ = rs;
20 beam_ = 0;
21 text_=0;
25 Simple_staff::Simple_staff()
27 theline_l_ = 0;
32 void
33 Simple_column::setup_requests()
35 for (int i = 0 ; i < v_elts.size(); i ++)
36 for (iter_top(v_elts[i]->reqs,j); j.ok(); j++) {
37 Request *rq= j;
38 if (rq->barcheck()) {
39 if (tdescription_->whole_in_measure) {
40 warning( "Barcheck failed", rq->defined_ch_c_l_m );
43 if (rq->rhythmic()){
44 notes.push(rq->rhythmic());
46 if (rq->script()) {
47 notes.top().scripts.push(rq->script());
49 if (rq->stem()) {
50 stem_ = rq->stem();
51 stem_requester_len = v_elts[i]->duration;
53 if (rq->text()) {
54 text_ = rq->text();
56 if (rq->beam()) {
57 beam_ = rq->beam();
59 if (rq->slur()) {
60 slurs.push(rq->slur());
65 Staff_column*
66 Simple_staff::create_col(Score_column*s)
68 return new Simple_column(s,this);
71 void
72 Simple_staff::walk()
74 for (Simple_walker sc(this); sc.ok(); sc++) {
75 sc.col()->setup_requests();// TODO
76 sc.process();
79 Note_info::Note_info()
81 rq =0;
83 Note_info::Note_info(Rhythmic_req*r) {
84 rq = r;