2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 1999--2010 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 DECLARE_TRANSLATOR_LISTENER (breathing
);
44 Stream_event
*breathing_sign_event_
;
45 Grob
*breathing_sign_
;
48 Breathing_sign_engraver::Breathing_sign_engraver ()
51 breathing_sign_event_
= 0;
54 IMPLEMENT_TRANSLATOR_LISTENER (Breathing_sign_engraver
, breathing
);
56 Breathing_sign_engraver::listen_breathing (Stream_event
*ev
)
58 ASSIGN_EVENT_ONCE (breathing_sign_event_
, ev
);
62 Breathing_sign_engraver::process_music ()
64 if (breathing_sign_event_
)
66 breathing_sign_
= make_item ("BreathingSign", breathing_sign_event_
->self_scm ());
71 Breathing_sign_engraver::stop_translation_timestep ()
74 breathing_sign_event_
= 0;
77 ADD_TRANSLATOR (Breathing_sign_engraver
,
79 "Create a breathing sign.",