2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 1999--2015 Michael Krause
6 written for the GNU LilyPond music typesetter
10 . Spacing is not yet completely pretty
12 LilyPond is free software: you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation, either version 3 of the License, or
15 (at your option) any later version.
17 LilyPond is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
26 #include "breathing-sign.hh"
27 #include "engraver.hh"
29 #include "stream-event.hh"
31 #include "translator.icc"
33 class Breathing_sign_engraver : public Engraver
36 TRANSLATOR_DECLARATIONS (Breathing_sign_engraver);
39 void process_music ();
40 void stop_translation_timestep ();
42 void listen_breathing (Stream_event *);
44 Stream_event *breathing_sign_event_;
45 Grob *breathing_sign_;
48 Breathing_sign_engraver::Breathing_sign_engraver ()
51 breathing_sign_event_ = 0;
55 Breathing_sign_engraver::listen_breathing (Stream_event *ev)
57 ASSIGN_EVENT_ONCE (breathing_sign_event_, ev);
61 Breathing_sign_engraver::process_music ()
63 if (breathing_sign_event_)
65 breathing_sign_ = make_item ("BreathingSign", breathing_sign_event_->self_scm ());
70 Breathing_sign_engraver::stop_translation_timestep ()
73 breathing_sign_event_ = 0;
77 Breathing_sign_engraver::boot ()
79 ADD_LISTENER (Breathing_sign_engraver, breathing);
82 ADD_TRANSLATOR (Breathing_sign_engraver,
84 "Create a breathing sign.",