X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fhyphen-engraver.cc;h=20d2a7c9380d3d4cd13fbb8cbae1d2a9f98ab916;hb=2bbacb364aa29041af9cbbbd32cfad2e8e387cb3;hp=c1f2a04e37e1fa35d49af682c0c317b9c6675f31;hpb=08560a1b8076630c4fc6cb9b902614d8b74fd6fc;p=lilypond.git diff --git a/lily/hyphen-engraver.cc b/lily/hyphen-engraver.cc index c1f2a04e37..20d2a7c938 100644 --- a/lily/hyphen-engraver.cc +++ b/lily/hyphen-engraver.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 1999--2012 Glen Prideaux , + Copyright (C) 1999--2015 Glen Prideaux , Han-Wen Nienhuys , Jan Nieuwenhuizen @@ -42,8 +42,8 @@ public: protected: - DECLARE_ACKNOWLEDGER (lyric_syllable); - DECLARE_TRANSLATOR_LISTENER (hyphen); + void acknowledge_lyric_syllable (Grob_info); + void listen_hyphen (Stream_event *); virtual void finalize (); @@ -51,7 +51,8 @@ protected: void process_music (); }; -Hyphen_engraver::Hyphen_engraver () +Hyphen_engraver::Hyphen_engraver (Context *c) + : Engraver (c) { hyphen_ = 0; finished_hyphen_ = 0; @@ -74,7 +75,6 @@ Hyphen_engraver::acknowledge_lyric_syllable (Grob_info i) finished_hyphen_->set_bound (RIGHT, item); } -IMPLEMENT_TRANSLATOR_LISTENER (Hyphen_engraver, hyphen); void Hyphen_engraver::listen_hyphen (Stream_event *ev) { @@ -155,7 +155,13 @@ Hyphen_engraver::stop_translation_timestep () ev_ = 0; } -ADD_ACKNOWLEDGER (Hyphen_engraver, lyric_syllable); + +void +Hyphen_engraver::boot () +{ + ADD_LISTENER (Hyphen_engraver, hyphen); + ADD_ACKNOWLEDGER (Hyphen_engraver, lyric_syllable); +} ADD_TRANSLATOR (Hyphen_engraver, /* doc */