source file of the GNU LilyPond music typesetter
- (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1998--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
#include "beam-engraver.hh"
#include "musical-request.hh"
#include "beam.hh"
-#include "grouping.hh"
+#include "rhythmic-grouping.hh"
#include "stem.hh"
#include "warn.hh"
#include "time-description.hh"
finished_grouping_p_ = 0;
grouping_p_ =0;
reqs_drul_[LEFT] = reqs_drul_[RIGHT] =0;
+ prev_start_req_ =0;
}
bool
if (d == STOP && !beam_p_)
{
- m->warning ("No Beam to end");
+ m->warning (_ ("No Beam to end"));
return false;
}
reqs_drul_[d ] = c;
if (reqs_drul_[STOP])
{
if (!beam_p_)
- reqs_drul_[STOP]->warning (_("No beam to stop"));
+ reqs_drul_[STOP]->warning (_("No beam to end"));
+ prev_start_req_ =0;
finished_beam_p_ = beam_p_;
finished_grouping_p_ = grouping_p_;
{
if (beam_p_)
{
- reqs_drul_[START]->warning ("Already have a Beam");
+ reqs_drul_[START]->warning (_ ("Already have a Beam"));
return;
}
+ prev_start_req_ = reqs_drul_[START];
beam_p_ = new Beam;
grouping_p_ = new Rhythmic_grouping;
typeset_beam ();
if (beam_p_)
{
- warning ("Unfinished beam");
+ prev_start_req_->warning (_ ("Unfinished beam"));
finished_beam_p_ = beam_p_;
finished_grouping_p_ = grouping_p_;
typeset_beam ();
Rhythmic_req *rhythmic_req = dynamic_cast <Rhythmic_req *> (info.req_l_);
if (!rhythmic_req)
{
- String s=_("Stem must have Rhythmic structure.");
+ String s = _ ("Stem must have Rhythmic structure.");
if (info.req_l_)
- info.req_l_->warning(s);
+ info.req_l_->warning (s);
else
::warning (s);
if (rhythmic_req->duration_.durlog_i_<= 2)
{
rhythmic_req->warning (_ ("stem doesn't fit in beam"));
- reqs_drul_[LEFT]->warning (_("beam was started here"));
+ prev_start_req_->warning (_ ("beam was started here"));
return;
}
if (!grouping_p_->child_fit_b (start))
{
- String s (_("please fix me") + ": "
- + _f ("stem at %s doesn't fit in beam", now_moment ().str ()));
+ String s (_ ("please fix me") + ": "
+ + _f ("stem at %s doesn't fit in beam", now_mom ().str ()));
if (info.req_l_)
info.req_l_->warning(s);
}
else
{
- grouping_p_->add_child (start, rhythmic_req->duration ());
+ grouping_p_->add_child (start, rhythmic_req->length_mom ());
stem_l->flag_i_ = rhythmic_req->duration_.durlog_i_;
beam_p_->add_stem (stem_l);
}