X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fbreathing-sign-engraver.cc;h=917a47d4f6caa54a65c5ac6952b7a10093f121ed;hb=750b714488c5af6eae22d07163bba8b554734ac6;hp=0850067b6946434328ad6975cbd9c8bce9f1eb9f;hpb=62f221b6b3861ff055dc0384ec3c48cc665688cd;p=lilypond.git diff --git a/lily/breathing-sign-engraver.cc b/lily/breathing-sign-engraver.cc index 0850067b69..917a47d4f6 100644 --- a/lily/breathing-sign-engraver.cc +++ b/lily/breathing-sign-engraver.cc @@ -1,15 +1,26 @@ /* - breathing_sign-engraver.cc -- implement Breathing_sign_engraver + This file is part of LilyPond, the GNU music typesetter. - (c) 1999--2008 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" @@ -28,19 +39,19 @@ protected: void process_music (); void stop_translation_timestep (); - DECLARE_TRANSLATOR_LISTENER (breathing); + void listen_breathing (Stream_event *); private: Stream_event *breathing_sign_event_; Grob *breathing_sign_; }; -Breathing_sign_engraver::Breathing_sign_engraver () +Breathing_sign_engraver::Breathing_sign_engraver (Context *c) + : Engraver (c) { breathing_sign_ = 0; breathing_sign_event_ = 0; } -IMPLEMENT_TRANSLATOR_LISTENER (Breathing_sign_engraver, breathing); void Breathing_sign_engraver::listen_breathing (Stream_event *ev) { @@ -63,16 +74,22 @@ Breathing_sign_engraver::stop_translation_timestep () breathing_sign_event_ = 0; } +void +Breathing_sign_engraver::boot () +{ + ADD_LISTENER (Breathing_sign_engraver, breathing); +} + ADD_TRANSLATOR (Breathing_sign_engraver, - /* doc */ - "Create a breathing sign.", + /* doc */ + "Create a breathing sign.", - /* create */ - "BreathingSign ", + /* create */ + "BreathingSign ", - /* read */ - "", + /* read */ + "", - /* write */ - "" - ); + /* write */ + "" + );