X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Ftext-spanner-engraver.cc;h=3f9119ad018363a84c26f65568c60a37253593af;hb=77be11216a50501dd9567834687e63b6c5b4dd60;hp=f7b2576d85043c734d0dc9e55add6526ff762ddc;hpb=c5a3f0c024f4cb629811cff9eb04abff36e94138;p=lilypond.git diff --git a/lily/text-spanner-engraver.cc b/lily/text-spanner-engraver.cc index f7b2576d85..3f9119ad01 100644 --- a/lily/text-spanner-engraver.cc +++ b/lily/text-spanner-engraver.cc @@ -1,15 +1,27 @@ /* - text-spanner-engraver.cc -- implement Text_spanner_engraver + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 2000--2010 Jan Nieuwenhuizen - (c) 2000--2007 Jan Nieuwenhuizen + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #include "engraver.hh" #include "international.hh" #include "note-column.hh" +#include "pointer-group-interface.hh" #include "side-position-interface.hh" #include "spanner.hh" #include "stream-event.hh" @@ -23,6 +35,7 @@ public: protected: virtual void finalize (); DECLARE_TRANSLATOR_LISTENER (text_span); + DECLARE_ACKNOWLEDGER (note_column); void stop_translation_timestep (); void process_music (); @@ -61,6 +74,7 @@ Text_spanner_engraver::process_music () else { finished_ = span_; + announce_end_grob (finished_, SCM_EOL); span_ = 0; current_event_ = 0; } @@ -121,13 +135,34 @@ Text_spanner_engraver::finalize () } } + +void +Text_spanner_engraver::acknowledge_note_column (Grob_info info) +{ + if (span_) { + Pointer_group_interface::add_grob (span_, + ly_symbol2scm ("note-columns"), + info.grob()); + add_bound_item (span_, info.grob ()); + } else if (finished_) { + Pointer_group_interface::add_grob (finished_, ly_symbol2scm ("note-columns"), + info.grob()); + add_bound_item (finished_, info.grob ()); + } +} + +ADD_ACKNOWLEDGER (Text_spanner_engraver, note_column); + ADD_TRANSLATOR (Text_spanner_engraver, /* doc */ "Create text spanner from an event.", + /* create */ "TextSpanner ", + /* read */ "", + /* write */ "" );