]> git.donarmstrong.com Git - lilypond.git/blob - lily/phrasing-slur-engraver.cc
Bring dev/johngourlay/issue-4751 up to date with respect to staging.
[lilypond.git] / lily / phrasing-slur-engraver.cc
1 /*
2   This file is part of LilyPond, the GNU music typesetter.
3
4   Copyright (C) 1997--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
5
6   LilyPond is free software: you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation, either version 3 of the License, or
9   (at your option) any later version.
10
11   LilyPond is distributed in the hope that it will be useful,
12   but WITHOUT ANY WARRANTY; without even the implied warranty of
13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   GNU General Public License for more details.
15
16   You should have received a copy of the GNU General Public License
17   along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #include "engraver.hh"
21
22 #include "context.hh"
23 #include "directional-element-interface.hh"
24 #include "international.hh"
25 #include "note-column.hh"
26 #include "slur.hh"
27 #include "slur-proto-engraver.hh"
28 #include "spanner.hh"
29 #include "stream-event.hh"
30 #include "warn.hh"
31
32 #include "translator.icc"
33
34 class Phrasing_slur_engraver : public Slur_proto_engraver
35 {
36 protected:
37   void listen_phrasing_slur (Stream_event *);
38   void acknowledge_slur (Grob_info);
39
40 public:
41   SCM event_symbol ();
42   TRANSLATOR_DECLARATIONS (Phrasing_slur_engraver);
43   TRANSLATOR_INHERIT (Slur_proto_engraver);
44 };
45
46 Phrasing_slur_engraver::Phrasing_slur_engraver () :
47   Slur_proto_engraver (0, "PhrasingSlur", "phrasing slur", "phrasing-slur-event")
48 {
49 }
50
51 SCM
52 Phrasing_slur_engraver::event_symbol ()
53 {
54   // Need a string constant for memoization
55   return ly_symbol2scm ("phrasing-slur-event");
56 }
57
58 void
59 Phrasing_slur_engraver::listen_phrasing_slur (Stream_event *ev)
60 {
61   Slur_proto_engraver::listen_slur (ev);
62 }
63
64 void
65 Phrasing_slur_engraver::acknowledge_slur (Grob_info info)
66 {
67   acknowledge_extra_object (info);
68 }
69
70
71 void
72 Phrasing_slur_engraver::boot ()
73 {
74   ADD_LISTENER (Phrasing_slur_engraver, phrasing_slur);
75   ADD_LISTENER (Slur_proto_engraver, note);
76   ADD_ACKNOWLEDGER (Slur_proto_engraver, inline_accidental);
77   ADD_ACKNOWLEDGER (Slur_proto_engraver, fingering);
78   ADD_ACKNOWLEDGER (Slur_proto_engraver, note_column);
79   ADD_ACKNOWLEDGER (Phrasing_slur_engraver, slur);
80   ADD_ACKNOWLEDGER (Slur_proto_engraver, script);
81   ADD_ACKNOWLEDGER (Slur_proto_engraver, dots);
82   ADD_ACKNOWLEDGER (Slur_proto_engraver, text_script);
83   ADD_END_ACKNOWLEDGER (Slur_proto_engraver, tie);
84   ADD_ACKNOWLEDGER (Slur_proto_engraver, tuplet_number);
85 }
86
87 ADD_TRANSLATOR (Phrasing_slur_engraver,
88                 /* doc */
89                 "Print phrasing slurs.  Similar to @ref{Slur_engraver}.",
90
91                 /* create */
92                 "PhrasingSlur ",
93
94                 /* read */
95                 "",
96
97                 /* write */
98                 ""
99                );