1 #include "rhythmic-head.hh"
4 #include "score-engraver.hh"
6 class Forbid_line_break_engraver
: public Engraver
9 TRANSLATOR_DECLARATIONS (Forbid_line_break_engraver
);
10 virtual void start_translation_timestep ();
13 Forbid_line_break_engraver::Forbid_line_break_engraver (){}
16 Forbid_line_break_engraver::start_translation_timestep ()
19 Check for running note heads. This should probably be done elsewhere.
21 SCM busy
= get_property ("busyGrobs");
23 Moment now
= now_mom ();
24 while (ly_pair_p (busy
) && unsmob_moment (ly_caar (busy
))->main_part_
== now
.main_part_
)
28 while (ly_pair_p (busy
))
30 Grob
*g
= unsmob_grob (ly_cdar (busy
));
31 if (Rhythmic_head::has_interface (g
))
33 get_score_engraver ()->forbid_breaks ();
40 ENTER_DESCRIPTION (Forbid_line_break_engraver
,
41 /* descr */ "Forbid line breaks when note heads are still playing at some point.",
45 /* reads */ "busyGrobs",