X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fbreathing-sign-engraver.cc;h=34b296d10b248028416c87286138c4073c6583af;hb=47db9a3883d726ca53e2133a3b2298f78dd6a32e;hp=d7a73bf6bee7ad12b3698460bb42cb9aa183a6b2;hpb=e864a61c53a13b5b53843dc702f6ba4e54a8fc6b;p=lilypond.git diff --git a/lily/breathing-sign-engraver.cc b/lily/breathing-sign-engraver.cc index d7a73bf6be..34b296d10b 100644 --- a/lily/breathing-sign-engraver.cc +++ b/lily/breathing-sign-engraver.cc @@ -1,20 +1,34 @@ /* - breathing_sign-engraver.cc -- implement Breathing_sign_engraver + This file is part of LilyPond, the GNU music typesetter. - (c) 1999--2006 Michael Krause + Copyright (C) 1999--2015 Michael Krause written for the GNU LilyPond music typesetter TODO: - . Cancel any beams running through the breathing sign - ([e8 \breathe f e f] should become [e8] \breathe [f e f]) . Spacing is not yet completely pretty + + 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 "breathing-sign.hh" #include "engraver.hh" #include "item.hh" +#include "stream-event.hh" + +#include "translator.icc" class Breathing_sign_engraver : public Engraver { @@ -22,12 +36,12 @@ public: TRANSLATOR_DECLARATIONS (Breathing_sign_engraver); protected: - virtual bool try_music (Music *event); void process_music (); void stop_translation_timestep (); + DECLARE_TRANSLATOR_LISTENER (breathing); private: - Music *breathing_sign_event_; + Stream_event *breathing_sign_event_; Grob *breathing_sign_; }; @@ -37,11 +51,11 @@ Breathing_sign_engraver::Breathing_sign_engraver () breathing_sign_event_ = 0; } -bool -Breathing_sign_engraver::try_music (Music *r) +IMPLEMENT_TRANSLATOR_LISTENER (Breathing_sign_engraver, breathing); +void +Breathing_sign_engraver::listen_breathing (Stream_event *ev) { - breathing_sign_event_ = r; - return true; + ASSIGN_EVENT_ONCE (breathing_sign_event_, ev); } void @@ -60,11 +74,16 @@ Breathing_sign_engraver::stop_translation_timestep () breathing_sign_event_ = 0; } -#include "translator.icc" - ADD_TRANSLATOR (Breathing_sign_engraver, - /* doc */ "", - /* create */ "BreathingSign", - /* accept */ "breathing-event", - /* read */ "", - /* write */ ""); + /* doc */ + "Create a breathing sign.", + + /* create */ + "BreathingSign ", + + /* read */ + "", + + /* write */ + "" + );