2 breathing_sign-engraver.cc -- implement Breathing_sign_engraver
4 Copyright (C) 1999 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
16 #include "staff-symbol-referencer.hh"
17 #include "breathing-sign.hh"
18 #include "musical-request.hh"
19 #include "command-request.hh"
20 #include "engraver-group-engraver.hh"
22 #include "engraver.hh"
23 #include "command-request.hh"
25 class Breathing_sign_engraver
: public Engraver
{
27 TRANSLATOR_DECLARATIONS(Breathing_sign_engraver
);
30 virtual bool try_music (Music
*req
);
31 virtual void process_acknowledged_grobs ();
32 virtual void stop_translation_timestep ();
33 virtual void start_translation_timestep ();
36 Breathing_sign_req
* breathing_sign_req_
;
37 Grob
* breathing_sign_
;
40 Breathing_sign_engraver::Breathing_sign_engraver ()
43 breathing_sign_req_
= 0;
47 Breathing_sign_engraver::try_music (Music
*r
)
49 if (Breathing_sign_req
* b
= dynamic_cast <Breathing_sign_req
*> (r
))
51 breathing_sign_req_
= b
;
59 Breathing_sign_engraver::process_acknowledged_grobs ()
61 if (breathing_sign_req_
&& ! breathing_sign_
)
63 SCM b
= get_property ("BreathingSign");
64 breathing_sign_
= new Item (b
);
66 announce_grob(breathing_sign_
, breathing_sign_req_
->self_scm());
67 breathing_sign_req_
= 0;
72 Breathing_sign_engraver::stop_translation_timestep ()
76 typeset_grob (breathing_sign_
);
82 Breathing_sign_engraver::start_translation_timestep ()
84 breathing_sign_req_
= 0;
88 ENTER_DESCRIPTION(Breathing_sign_engraver
,
90 /* creats*/ "BreathingSign",