2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 2000--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>, Erik Sandberg
5 <mandolaerik@gmail.com>
7 LilyPond is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 LilyPond is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
21 #include "bar-line.hh"
22 #include "global-context.hh"
23 #include "international.hh"
26 #include "repeated-music.hh"
27 #include "score-engraver.hh"
29 #include "stream-event.hh"
32 #include "translator.icc"
35 This acknowledges repeated music with "percent" style. It typesets
38 class Slash_repeat_engraver
: public Engraver
41 TRANSLATOR_DECLARATIONS (Slash_repeat_engraver
);
45 DECLARE_TRANSLATOR_LISTENER (percent
);
46 void process_music ();
49 Slash_repeat_engraver::Slash_repeat_engraver ()
54 IMPLEMENT_TRANSLATOR_LISTENER (Slash_repeat_engraver
, percent
);
56 Slash_repeat_engraver::listen_percent (Stream_event
*ev
)
58 /*todo: separate events for percent and slash */
60 = robust_scm2moment (get_property ("measureLength"), Moment (0));
62 if (get_event_length (ev
) < meas_length
)
63 ASSIGN_EVENT_ONCE (slash_
, ev
);
66 don't warn if nothing happens: this can happen if there are whole
72 Slash_repeat_engraver::process_music ()
76 make_item ("RepeatSlash", slash_
->self_scm ());
81 ADD_TRANSLATOR (Slash_repeat_engraver
,