/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 2000--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
- Erik Sandberg <mandolaerik@gmail.com>
+ Copyright (C) 2000--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ Erik Sandberg <mandolaerik@gmail.com>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
protected:
virtual void finalize ();
void process_music ();
- DECLARE_TRANSLATOR_LISTENER (tremolo_span);
- DECLARE_ACKNOWLEDGER (stem);
+ void listen_tremolo_span (Stream_event *);
+ void acknowledge_stem (Grob_info);
};
Chord_tremolo_engraver::Chord_tremolo_engraver ()
previous_stem_ = 0;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Chord_tremolo_engraver, tremolo_span);
void
Chord_tremolo_engraver::listen_tremolo_span (Stream_event *ev)
{
if (Stem::duration_log (s) != 1)
beam_->set_property ("gap-count", scm_from_int (gap_count));
-
if (info.ultimate_event_cause ()->in_event_class ("rhythmic-event"))
- Beam::add_stem (beam_, s);
+ Beam::add_stem (beam_, s);
else
- {
- string s = _ ("stem must have Rhythmic structure");
- if (info.event_cause ())
- info.event_cause ()->origin ()->warning (s);
- else
- ::warning (s);
- }
+ {
+ string s = _ ("stem must have Rhythmic structure");
+ if (info.event_cause ())
+ info.event_cause ()->origin ()->warning (s);
+ else
+ ::warning (s);
+ }
// Store current grob, so we can possibly end the spanner here (and
// reset the beam direction to RIGHT)
previous_stem_ = s;
}
}
-ADD_ACKNOWLEDGER (Chord_tremolo_engraver, stem);
+void
+Chord_tremolo_engraver::boot ()
+{
+ ADD_LISTENER (Chord_tremolo_engraver, tremolo_span);
+ ADD_ACKNOWLEDGER (Chord_tremolo_engraver, stem);
+}
+
ADD_TRANSLATOR (Chord_tremolo_engraver,
- /* doc */
- "Generate beams for tremolo repeats.",
+ /* doc */
+ "Generate beams for tremolo repeats.",
- /* create */
- "Beam ",
+ /* create */
+ "Beam ",
- /* read */
- "",
+ /* read */
+ "",
- /* write */
- ""
- );
+ /* write */
+ ""
+ );