X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Ffingering-engraver.cc;h=80023786984af883595e961476870c993faca68b;hb=334f5a4b1a756eaa161b230bc799651152044fd8;hp=c6a6a9b0fb9318da6279a871ba498ad30a1214a7;hpb=5d576b1299d374ae478cb38075cc05d5cb691046;p=lilypond.git diff --git a/lily/fingering-engraver.cc b/lily/fingering-engraver.cc index c6a6a9b0fb..8002378698 100644 --- a/lily/fingering-engraver.cc +++ b/lily/fingering-engraver.cc @@ -1,9 +1,20 @@ /* - fingering-engraver.cc -- implement Fingering_engraver + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 1998--2011 Han-Wen Nienhuys - (c) 1998--2006 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 + 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" @@ -13,6 +24,7 @@ #include "side-position-interface.hh" #include "stem.hh" #include "stream-event.hh" +#include "item.hh" #include "translator.icc" @@ -27,7 +39,7 @@ protected: void stop_translation_timestep (); void process_music (); DECLARE_TRANSLATOR_LISTENER (fingering); - DECLARE_TRANSLATOR_LISTENER (string_finger); + DECLARE_TRANSLATOR_LISTENER (stroke_finger); DECLARE_ACKNOWLEDGER (rhythmic_head); DECLARE_ACKNOWLEDGER (stem); @@ -42,16 +54,15 @@ Fingering_engraver::listen_fingering (Stream_event *ev) events_.push_back (ev); } -IMPLEMENT_TRANSLATOR_LISTENER (Fingering_engraver, string_finger); +IMPLEMENT_TRANSLATOR_LISTENER (Fingering_engraver, stroke_finger); void -Fingering_engraver::listen_string_finger (Stream_event *ev) +Fingering_engraver::listen_stroke_finger (Stream_event * /* ev */) { /* FIXME: should do something. This function is mainly here to shut up a warning */ - (void)ev; } void @@ -116,7 +127,7 @@ Fingering_engraver::make_script (Direction d, Stream_event *r, int i) fingering->set_property ("script-priority", scm_from_int (priority)); - if (!is_direction (fingering->get_property_data (ly_symbol2scm ("direction")))) + if (!is_direction (fingering->get_property_data ("direction"))) { if (d) fingering->set_property ("direction", scm_from_int (d)); @@ -130,9 +141,6 @@ Fingering_engraver::make_script (Direction d, Stream_event *r, int i) void Fingering_engraver::stop_translation_timestep () { - if (!fingerings_.size ()) - return; - fingerings_.clear (); events_.clear (); } @@ -146,10 +154,14 @@ ADD_ACKNOWLEDGER (Fingering_engraver, stem); ADD_TRANSLATOR (Fingering_engraver, /* doc */ - "Create fingering-scripts", + "Create fingering scripts.", + /* create */ - "Fingering", - /* accept */ - "fingering-event", - /* read */ "", - /* write */ ""); + "Fingering ", + + /* read */ + "", + + /* write */ + "" + );