2 breathing_sign-engraver.cc -- implement Breathing_sign_engraver
4 (c) 1999--2009 Michael Krause
6 written for the GNU LilyPond music typesetter
10 . Cancel any beams running through the breathing sign
11 ([e8 \breathe f e f] should become [e8] \breathe [f e f])
12 . Spacing is not yet completely pretty
15 #include "breathing-sign.hh"
16 #include "engraver.hh"
18 #include "stream-event.hh"
20 #include "translator.icc"
22 class Breathing_sign_engraver
: public Engraver
25 TRANSLATOR_DECLARATIONS (Breathing_sign_engraver
);
28 void process_music ();
29 void stop_translation_timestep ();
31 DECLARE_TRANSLATOR_LISTENER (breathing
);
33 Stream_event
*breathing_sign_event_
;
34 Grob
*breathing_sign_
;
37 Breathing_sign_engraver::Breathing_sign_engraver ()
40 breathing_sign_event_
= 0;
43 IMPLEMENT_TRANSLATOR_LISTENER (Breathing_sign_engraver
, breathing
);
45 Breathing_sign_engraver::listen_breathing (Stream_event
*ev
)
47 ASSIGN_EVENT_ONCE (breathing_sign_event_
, ev
);
51 Breathing_sign_engraver::process_music ()
53 if (breathing_sign_event_
)
55 breathing_sign_
= make_item ("BreathingSign", breathing_sign_event_
->self_scm ());
60 Breathing_sign_engraver::stop_translation_timestep ()
63 breathing_sign_event_
= 0;
66 ADD_TRANSLATOR (Breathing_sign_engraver
,
68 "Create a breathing sign.",