2 slash-repeat-engraver.cc -- implement Slash_repeat_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 2000--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>, Erik Sandberg
7 <mandolaerik@gmail.com>
10 #include "bar-line.hh"
11 #include "global-context.hh"
12 #include "international.hh"
15 #include "repeated-music.hh"
16 #include "score-engraver.hh"
18 #include "stream-event.hh"
21 #include "translator.icc"
24 This acknowledges repeated music with "percent" style. It typesets
27 class Slash_repeat_engraver : public Engraver
30 TRANSLATOR_DECLARATIONS (Slash_repeat_engraver);
34 DECLARE_TRANSLATOR_LISTENER (percent);
35 void process_music ();
38 Slash_repeat_engraver::Slash_repeat_engraver ()
43 IMPLEMENT_TRANSLATOR_LISTENER (Slash_repeat_engraver, percent);
45 Slash_repeat_engraver::listen_percent (Stream_event *ev)
47 /*todo: separate events for percent and slash */
49 = robust_scm2moment (get_property ("measureLength"), Moment (0));
51 if (get_event_length (ev) < meas_length)
52 ASSIGN_EVENT_ONCE (slash_, ev);
55 don't warn if nothing happens: this can happen if there are whole
61 Slash_repeat_engraver::process_music ()
65 make_item ("RepeatSlash", slash_->self_scm ());
70 ADD_TRANSLATOR (Slash_repeat_engraver,