]> git.donarmstrong.com Git - lilypond.git/blob - src/simpleprint.cc
release: 0.0.9
[lilypond.git] / src / simpleprint.cc
1 #include "lookup.hh"
2 #include "request.hh"
3 #include "beam.hh"
4 #include "pscore.hh"
5 #include "paper.hh"
6 #include "simplestaff.hh"
7 #include "molecule.hh"
8 #include "sccol.hh"
9 #include "stem.hh"
10 #include "notehead.hh"
11 #include "rest.hh"
12 #include "debug.hh"
13 #include "bar.hh"
14 #include "meter.hh"
15
16 Item *
17 Simple_staff::get_TYPESET_item(Command *com)
18 {
19     Item *s;
20     if (com -> args[0] ==  "BAR" ) {
21         s = new Bar(com->args[1]);      
22     } else if (com->args[0] == "METER") {
23         svec<String> arg( com->args);   
24         arg.del(0);
25         s = new Meter(arg);
26     } else
27         assert(false);
28     
29     return s;
30 }
31
32 void
33 Simple_column::typeset_item(Item *i, int breakst)
34 {
35     assert(i);
36     // ugh
37     staff_->pscore_->typeset_item(i, score_column->pcol,
38                                   staff_->theline,breakst);
39 }
40
41 void
42 Simple_staff::set_output(PScore* ps )
43 {
44     pscore_ = ps;
45     pscore_->add(theline);
46 }
47
48
49 Rest*
50 Simple_staff::get_rest(Rest_req*rq)
51 {
52     int b = rq->rhythmic()->balltype;
53     int d = rq->rhythmic()->dots;
54     return new Rest(b, d);  
55 }