X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Ffingering-engraver.cc;h=a364947b08eb363e02718616aab51a359d07136b;hb=32a34dcef0c0041c6d62677487a380b5c8b85712;hp=235fdd666dfea51a3bbfd82729d9b2670ec6ccf3;hpb=a9d9433bc7b95cb2d4b3d96eefce7a8437c0d44e;p=lilypond.git diff --git a/lily/fingering-engraver.cc b/lily/fingering-engraver.cc index 235fdd666d..a364947b08 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--2012 Han-Wen Nienhuys - (c) 1998--2009 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" @@ -19,8 +30,8 @@ class Fingering_engraver : public Engraver { - vector events_; - vector fingerings_; + vector events_; + vector fingerings_; public: TRANSLATOR_DECLARATIONS (Fingering_engraver); @@ -28,7 +39,6 @@ protected: void stop_translation_timestep (); void process_music (); DECLARE_TRANSLATOR_LISTENER (fingering); - DECLARE_TRANSLATOR_LISTENER (stroke_finger); DECLARE_ACKNOWLEDGER (rhythmic_head); DECLARE_ACKNOWLEDGER (stem); @@ -43,17 +53,6 @@ Fingering_engraver::listen_fingering (Stream_event *ev) events_.push_back (ev); } -IMPLEMENT_TRANSLATOR_LISTENER (Fingering_engraver, stroke_finger); -void -Fingering_engraver::listen_stroke_finger (Stream_event * /* ev */) -{ - /* - FIXME: should do something. - - This function is mainly here to shut up a warning - */ -} - void Fingering_engraver::acknowledge_stem (Grob_info inf) { @@ -69,7 +68,7 @@ Fingering_engraver::acknowledge_rhythmic_head (Grob_info inf) Grob *t = fingerings_[i]; Side_position_interface::add_support (t, inf.grob ()); if (!t->get_parent (X_AXIS)) - t->set_parent (inf.grob (), X_AXIS); + t->set_parent (inf.grob (), X_AXIS); } } @@ -119,9 +118,9 @@ Fingering_engraver::make_script (Direction d, Stream_event *r, int i) if (!is_direction (fingering->get_property_data ("direction"))) { if (d) - fingering->set_property ("direction", scm_from_int (d)); + fingering->set_property ("direction", scm_from_int (d)); else - fingering->set_property ("direction", scm_from_int (RIGHT)); + fingering->set_property ("direction", scm_from_int (RIGHT)); } fingerings_.push_back (fingering); @@ -130,9 +129,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 (); } @@ -145,15 +141,15 @@ ADD_ACKNOWLEDGER (Fingering_engraver, rhythmic_head); ADD_ACKNOWLEDGER (Fingering_engraver, stem); ADD_TRANSLATOR (Fingering_engraver, - /* doc */ - "Create fingering scripts.", + /* doc */ + "Create fingering scripts.", - /* create */ - "Fingering ", + /* create */ + "Fingering ", - /* read */ - "", + /* read */ + "", - /* write */ - "" - ); + /* write */ + "" + );