X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fscore-engraver.cc;h=88ea4af86f34003dd605dad337c56d7e7f1174b1;hb=77267b700c377fd170abcbf4863728937038eb5e;hp=6281f166f478c4df96f10a0a540f7d07bb3a48a8;hpb=113223f5d488baf62b0e1a7bf4c2cfee037f4e0e;p=lilypond.git diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc index 6281f166f4..88ea4af86f 100644 --- a/lily/score-engraver.cc +++ b/lily/score-engraver.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 1997--2014 Han-Wen Nienhuys + Copyright (C) 1997--2015 Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -49,20 +49,20 @@ Score_engraver::derived_mark () const Engraver_group::derived_mark (); } -IMPLEMENT_LISTENER (Score_engraver, prepare); void Score_engraver::prepare (SCM) { - precomputed_recurse_over_translators (context (), START_TRANSLATION_TIMESTEP, START); + precomputed_recurse_over_translators (context (), START_TRANSLATION_TIMESTEP, DOWN); } -IMPLEMENT_LISTENER (Score_engraver, finish); void Score_engraver::finish (SCM) { - recurse_over_translators (context (), &Translator::finalize, - &Translator_group::finalize, - STOP); + recurse_over_translators + (context (), + Callback0_wrapper::make_smob (), + Callback0_wrapper::make_smob (), + UP); } #define MUSIC_FONT "emmentaler-20" @@ -105,9 +105,9 @@ Score_engraver::connect_to_context (Context *c) Engraver_group::connect_to_context (c); Dispatcher *d = c->get_global_context ()->event_source (); - d->add_listener (GET_LISTENER (one_time_step), ly_symbol2scm ("OneTimeStep")); - d->add_listener (GET_LISTENER (prepare), ly_symbol2scm ("Prepare")); - d->add_listener (GET_LISTENER (finish), ly_symbol2scm ("Finish")); + d->add_listener (GET_LISTENER (Score_engraver, one_time_step), ly_symbol2scm ("OneTimeStep")); + d->add_listener (GET_LISTENER (Score_engraver, prepare), ly_symbol2scm ("Prepare")); + d->add_listener (GET_LISTENER (Score_engraver, finish), ly_symbol2scm ("Finish")); } /* @@ -128,9 +128,9 @@ void Score_engraver::disconnect_from_context () { Dispatcher *d = context ()->get_global_context ()->event_source (); - d->remove_listener (GET_LISTENER (one_time_step), ly_symbol2scm ("OneTimeStep")); - d->remove_listener (GET_LISTENER (prepare), ly_symbol2scm ("Prepare")); - d->remove_listener (GET_LISTENER (finish), ly_symbol2scm ("Finish")); + d->remove_listener (GET_LISTENER (Score_engraver, one_time_step), ly_symbol2scm ("OneTimeStep")); + d->remove_listener (GET_LISTENER (Score_engraver, prepare), ly_symbol2scm ("Prepare")); + d->remove_listener (GET_LISTENER (Score_engraver, finish), ly_symbol2scm ("Finish")); Engraver_group::disconnect_from_context (); } @@ -143,7 +143,6 @@ Score_engraver::finalize () typeset_all (); } -IMPLEMENT_LISTENER (Score_engraver, one_time_step); void Score_engraver::one_time_step (SCM) { @@ -158,10 +157,10 @@ Score_engraver::one_time_step (SCM) } void -Score_engraver::announce_grob (Grob_info info) +Score_engraver::announce_grob (Grob_info info, Direction start_end, Context *reroute_context) { - Engraver_group::announce_grob (info); - if (info.start_end () == START) + Engraver_group::announce_grob (info, start_end, reroute_context); + if (start_end == START) { pscore_->root_system ()->typeset_grob (info.grob ()); elems_.push_back (info.grob ());