2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 2000--2015 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/>.
22 #include "engraver.hh"
23 #include "stream-event.hh"
25 #include "translator.icc"
28 This acknowledges repeated music with "percent" style. It typesets
29 a slash sign or double percent sign.
31 class Slash_repeat_engraver : public Engraver
34 TRANSLATOR_DECLARATIONS (Slash_repeat_engraver);
38 DECLARE_TRANSLATOR_LISTENER (repeat_slash);
39 void process_music ();
42 Slash_repeat_engraver::Slash_repeat_engraver ()
47 IMPLEMENT_TRANSLATOR_LISTENER (Slash_repeat_engraver, repeat_slash);
49 Slash_repeat_engraver::listen_repeat_slash (Stream_event *ev)
51 ASSIGN_EVENT_ONCE (slash_, ev);
55 Slash_repeat_engraver::process_music ()
59 SCM count = slash_->get_property ("slash-count");
60 if (scm_to_int (count) == 0)
61 make_item ("DoubleRepeatSlash", slash_->self_scm ());
63 make_item ("RepeatSlash", slash_->self_scm ());
68 ADD_TRANSLATOR (Slash_repeat_engraver,