#include "international.hh"
#include "note-head.hh"
#include "rest.hh"
-#include "score-engraver.hh"
#include "spanner.hh"
+#include "stream-event.hh"
#include "warn.hh"
#include "translator.icc"
brew_ligature_primitive_proc = SCM_EOL;
}
-bool
-Ligature_engraver::try_music (Music *m)
+void
+Ligature_engraver::listen_ligature (Stream_event *ev)
{
- if (m->is_mus_type ("ligature-event"))
- {
- Direction d = to_dir (m->get_property ("span-direction"));
- events_drul_[d] = m;
- return true;
- }
- return false;
+ Direction d = to_dir (ev->get_property ("span-direction"));
+ events_drul_[d] = ev;
}
void
if (ligature_)
{
// TODO: maybe forbid breaks only if not transcribing
- get_score_engraver ()->forbid_breaks ();
+ context ()->get_score_context ()->set_property ("forbidBreak", SCM_BOOL_T);
}
if (events_drul_[START])
{
if (ligature_)
{
- info.music_cause ()->origin ()->warning (_ ("ignoring rest: ligature may not contain rest"));
+ info.event_cause ()->origin ()->warning (_ ("ignoring rest: ligature may not contain rest"));
prev_start_event_->origin ()->warning (_ ("ligature was started here"));
// TODO: maybe better should stop ligature here rather than
// ignoring the rest?