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