lilypond-1.3.28
[lilypond.git] / lily / breathing-sign-engraver.cc
blob46761a934fe27dd60fe37980a180af17614860bc
1 /*
2 breathing_sign-engraver.cc -- implement Breathing_sign_engraver
4 Copyright (C) 1999 Michael Krause
6 written for the GNU LilyPond music typesetter
8 TODO:
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-engraver.hh"
18 #include "breathing-sign.hh"
19 #include "musical-request.hh"
20 #include "command-request.hh"
21 #include "engraver-group-engraver.hh"
22 #include "note-head.hh"
23 #include "local-key-item.hh"
26 Breathing_sign_engraver::Breathing_sign_engraver()
28 breathing_sign_p_ = 0;
29 breathing_sign_req_l_ = 0;
32 bool
33 Breathing_sign_engraver::do_try_music (Music*r_l)
35 if (Breathing_sign_req * b= dynamic_cast <Breathing_sign_req *> (r_l))
37 breathing_sign_req_l_ = b;
38 return true;
41 return false;
44 void
45 Breathing_sign_engraver::do_process_requests()
47 if(breathing_sign_req_l_)
49 breathing_sign_p_ = new Breathing_sign;
50 breathing_sign_p_->set_elt_property ("break-aligned", SCM_BOOL_T);
51 Staff_symbol_referencer_interface st (breathing_sign_p_);
52 st.set_interface ();
54 announce_element (Score_element_info (breathing_sign_p_, breathing_sign_req_l_));
58 void
59 Breathing_sign_engraver::do_pre_move_processing()
61 if(breathing_sign_p_)
63 typeset_element(breathing_sign_p_);
64 breathing_sign_p_ = 0;
68 void
69 Breathing_sign_engraver::do_post_move_processing()
71 breathing_sign_req_l_ = 0;
74 ADD_THIS_TRANSLATOR(Breathing_sign_engraver);