3 #include "linestaff.hh"
9 #include "rhythmstaf.hh"
10 #include "lookupsyms.hh"
13 Rhythmic_column::Rhythmic_column(Score_column*s, Rhythmic_staff *rs)
20 Rhythmic_staff::Rhythmic_staff()
22 theline = new Linestaff(1);
25 Rhythmic_staff::set_output(PScore* ps )
28 pscore_->add(theline);
31 // should integrate handling of BREAK commands into Staff_column
33 Rhythmic_column::process_commands( )
35 int breakstat = BREAK_END - BREAK_PRE;
36 for (int i = 0 ; i < s_commands.sz(); i++) {
37 Command *com = s_commands[i];
45 score_column->set_breakable();
46 breakstat = com->code- BREAK_PRE;
50 typeset_command ( com , breakstat);
69 Rhythmic_column::process_requests()
71 for (int i = 0 ; i < v_elts.sz(); i ++)
72 for (PCursor<Request *> rqc(v_elts[i]->reqs); rqc.ok(); rqc++) {
76 WARN << "too many notes.\n";
87 Rhythmic_column::typeset_command(Command *com, int breakst)
92 if (com -> args[0] == "BAR" ) {
93 s = Lookup::bar(com->args[1]);
94 } else if (com->args[0] == "METER") {
95 Parametric_symbol *p = Lookup::meter("general");
96 svec<String> arg( com->args);
102 Molecule * m =new Molecule(Atom(s));
105 svec<Item*> sv(staff_->pscore_->
106 select_items(staff_->theline, score_column->pcol));
107 for (int j=0; j<sv.sz(); j++) {
108 wid.unite(sv[j]->output->extent().x);
111 m->translate(Offset(wid.max,0));
114 staff_->pscore_->typeset_item(i, score_column->pcol,
115 staff_->theline,breakst);
119 Rhythmic_column::typeset_req(Request *rq)
126 s = Lookup::ball(rq->note()->balltype);
128 dots=rq->rhythmic()->dots;
130 s = Lookup::rest(rq->rest()->balltype);
132 Molecule *m = new Molecule(Atom(s));
134 Symbol d = Lookup::dots(dots);
140 staff_->pscore_->typeset_item(i, score_column->pcol, staff_->theline );
144 Rhythmic_staff::grant_requests()
146 for (PCursor<Staff_column*> cc(cols); cc.ok(); cc++) {
147 Rhythmic_column *rp = (Rhythmic_column*)*cc;
149 rp->typeset_req( rp->the_note);
154 Rhythmic_staff::create_col(Score_column*s)
156 Rhythmic_column *rc = new Rhythmic_column(s,this);
162 get_new_rhythmstaff()
164 return new Rhythmic_staff;