From: fred Date: Mon, 4 Nov 1996 14:46:19 +0000 (+0000) Subject: lilypond-0.0.7 X-Git-Tag: release/1.5.59~6929 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7b2c4fac1259682fbff281e741b9304002b1b145;p=lilypond.git lilypond-0.0.7 --- diff --git a/rhythmstaff.cc b/rhythmstaff.cc index 4e564bdf88..7e2706e02d 100644 --- a/rhythmstaff.cc +++ b/rhythmstaff.cc @@ -1,4 +1,5 @@ #include "molecule.hh" +#include "stem.hh" #include "linestaff.hh" #include "rhythmstaff.hh" #include "paper.hh" @@ -16,19 +17,34 @@ Rhythmic_staff::set_output(PScore*ps) void Rhythmic_column::typeset_command(Command *com, int breakst) { - Item *i = create_command_item(com); - i->output->translate(Offset(0, - -staff_->score_->paper_->standard_height()/2)); + Item *i =new Item; + Molecule*m = create_command_mol(com); + i->output=m; + m->translate(Offset(0, + -staff_->score_->paper_->standard_height()/2)); typeset_item(i, breakst); } void Rhythmic_column::typeset_req(Request *rq) { - Item *i =create_req_item(rq); + Item *i =new Item; + Molecule*m=create_req_mol(rq); + i->output=m; typeset_item(i); } +void +Rhythmic_column::typeset_stem(Stem_req*rq) +{ + Stem * s = new Stem(0); + s->minnote = s->maxnote = 0; + s->flag = rq->stem_number; + s->calculate(); + typeset_item(s); + s->brew_molecole(); +} + /* creation */ diff --git a/simplestaff.cc b/simplestaff.cc index 763a9ed393..97250b48cb 100644 --- a/simplestaff.cc +++ b/simplestaff.cc @@ -12,6 +12,7 @@ Simple_column::Simple_column(Score_column*s, Simple_staff *rs) : Staff_column(s) { the_note = 0; + stem_ = 0; staff_ = rs; } @@ -20,7 +21,6 @@ Simple_staff::Simple_staff() theline = 0; } -// should integrate handling of BREAK commands into Staff_column void Simple_column::process_commands( ) { @@ -50,7 +50,7 @@ Simple_column::process_commands( ) accept: BREAK: all - TYPESET: bar, meter + TYPESET: bar, meter, */ @@ -64,12 +64,15 @@ Simple_column::process_requests() Request *rq= rqc; if (rq->rhythmic()){ if (the_note){ - WARN << "too many notes.\n"; - return; + WARN << "too many notes.\n"; } the_note = rq; + } - break; + if (rq->stem()) { + stem_ = rq->stem(); + } + } } @@ -80,6 +83,8 @@ Simple_staff::grant_requests() Simple_column *rp = (Simple_column*)*cc; if (rp->the_note) rp->typeset_req( rp->the_note); + if (rp->stem_) + rp->typeset_stem(rp->stem_->stem()); } }