/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 2008--2014 Han-Wen Nienhuys <hanwen@lilypond.org>
+ Copyright (C) 2008--2015 Han-Wen Nienhuys <hanwen@lilypond.org>
LilyPond is free software: you can redistribute it and/or modify
virtual void stop_translation_timestep ();
private:
- void create_line_spanner (Stream_event *cause);
+ void create_line_spanner (Grob *cause);
void set_spanner_bounds (Spanner *line, bool end);
Spanner *line_;
Spanner *ended_line_; // Spanner manually broken, don't use it for new grobs
ADD_END_ACKNOWLEDGER (Dynamic_align_engraver, dynamic);
void
-Dynamic_align_engraver::create_line_spanner (Stream_event *event)
+Dynamic_align_engraver::create_line_spanner (Grob *cause)
{
if (!line_)
- line_ = make_spanner ("DynamicLineSpanner",
- event ? event->self_scm () : SCM_EOL);
+ line_ = make_spanner ("DynamicLineSpanner", cause->self_scm ());
}
void
Dynamic_align_engraver::acknowledge_end_dynamic (Grob_info info)
{
- if (Spanner::has_interface (info.grob ()))
+ if (has_interface<Spanner> (info.grob ()))
ended_.push_back (info.spanner ());
/* If the break flag is set, store the current spanner and let new dynamics
}
}
- create_line_spanner (cause);
- if (Spanner::has_interface (info.grob ()))
+ create_line_spanner (info.grob ());
+ if (has_interface<Spanner> (info.grob ()))
{
started_.push_back (info.spanner ());
current_dynamic_spanner_ = info.spanner ();
bound = spanners[0]->get_bound (d);
else
{
- bound = unsmob_grob (get_property ("currentMusicalColumn"));
+ bound = unsmob<Grob> (get_property ("currentMusicalColumn"));
programming_error ("started DynamicLineSpanner but have no left bound");
}