/*
slur-engraver.cc -- implement Slur_engraver
- (c) 1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
#include "event.hh"
#include "slur.hh"
#include "warn.hh"
#include "note-column.hh"
-#include "translator-group.hh"
+#include "context.hh"
+
#include "engraver.hh"
#include "spanner.hh"
virtual bool try_music (Music*);
virtual void acknowledge_grob (Grob_info);
virtual void stop_translation_timestep ();
- virtual void start_translation_timestep ();
virtual void finalize ();
virtual void process_music ();
bool
Slur_engraver::try_music (Music *ev)
{
- if (ev->is_mus_type ("abort-event"))
- {
- for (int i = 0; i < slur_stack_.size (); i++)
- {
- slur_stack_[i]->suicide ();
- }
- slur_stack_.clear ();
- for (int i = 0; i < end_slurs_.size (); i++)
- {
- end_slurs_[i]->suicide ();
- }
- end_slurs_.clear ();
- events_.clear ();
- new_slur_evs_.clear ();
- }
- else if (ev->is_mus_type ("slur-event"))
+ if (ev->is_mus_type ("slur-event"))
{
/*
Let's not start more than one slur per moment.
void
Slur_engraver::set_melisma (bool m)
{
- daddy_trans_->set_property ("slurMelismaBusy", m ? SCM_BOOL_T :SCM_BOOL_F);
+ daddy_context_->set_property ("slurMelismaBusy", m ? SCM_BOOL_T :SCM_BOOL_F);
}
void
Direction d = to_dir (slur_ev->get_mus_property ("span-direction"));
if (d== STOP)
{
- if (slur_stack_.empty ())
+ if (slur_stack_.is_empty ())
/* How to shut up this warning, when Voice_devnull_engraver has
eaten start event? */
slur_ev->origin ()->warning (_f ("can't find start of slur"));
{
// push a new slur onto stack.
// (use temp. array to wait for all slur STOPs)
- Grob* slur = new Spanner (get_property ("Slur"));
+ Grob* slur = make_spanner ("Slur");
Slur::set_interface (slur); // cannot remove yet!