]> git.donarmstrong.com Git - lilypond.git/blob - src/simplestaff.cc
release: 0.0.20
[lilypond.git] / src / simplestaff.cc
1 #include "request.hh"
2 #include "voice.hh"
3 #include "swalker.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"
11
12
13
14 Simple_column::Simple_column(Score_column*s, Simple_staff *rs)
15     : Staff_column(s)
16 {
17     stem_requester_len = 0;
18     stem_ = 0;    
19     staff_ = rs;
20     beam_ = 0;
21 }
22
23 Simple_staff::Simple_staff()
24 {
25     theline = 0;
26 }
27
28 /**
29  accept:
30
31     BREAK: all
32     TYPESET: bar, meter,
33
34     */
35
36
37
38 void
39 Simple_column::process_requests()
40 {
41     for (int i = 0 ; i < v_elts.sz(); i ++)
42         for (PCursor<Request *> rqc(v_elts[i]->reqs); rqc.ok(); rqc++) {
43             Request *rq= rqc;
44             if (rq->rhythmic()){
45                 notes.add( rq->rhythmic());
46             }
47             if (rq->stem()) {
48                 stem_ = rq->stem();
49                 stem_requester_len = v_elts[i]->duration;
50             }
51
52             if (rq->beam()) {
53                 beam_ = rq->beam();
54             }
55             if (rq->slur()) {
56                 slurs.add(rq->slur());
57             }
58         }
59 }
60
61 Staff_column*
62 Simple_staff::create_col(Score_column*s)
63 {
64     return new Simple_column(s,this);
65 }
66
67 void
68 Simple_staff::walk()
69 {
70     for (Simple_walker sc(this); sc.ok(); sc++) {
71         sc.col()->process_requests();// TODO
72         sc.process();
73     }
74 }
75