]> git.donarmstrong.com Git - lilypond.git/blob - lily/phrasing-slur-engraver.cc
34b8cb09eee4f91c5e7a8925db3cc9f834529dc4
[lilypond.git] / lily / phrasing-slur-engraver.cc
1 /*
2   This file is part of LilyPond, the GNU music typesetter.
3
4   Copyright (C) 1997--2012 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   DECLARE_TRANSLATOR_LISTENER (phrasing_slur);
38   DECLARE_TRANSLATOR_LISTENER (break_phrasing_slur);
39   DECLARE_ACKNOWLEDGER (slur);
40
41 public:
42   TRANSLATOR_DECLARATIONS (Phrasing_slur_engraver);
43 };
44
45 Phrasing_slur_engraver::Phrasing_slur_engraver () :
46   Slur_proto_engraver (0, "PhrasingSlur", "phrasing slur", "phrasing-slur-event")
47 {
48   break_slur_ = 0;
49 }
50
51 IMPLEMENT_TRANSLATOR_LISTENER (Phrasing_slur_engraver, phrasing_slur);
52 void
53 Phrasing_slur_engraver::listen_phrasing_slur (Stream_event *ev)
54 {
55   internal_listen_slur (ev);
56 }
57
58 IMPLEMENT_TRANSLATOR_LISTENER (Phrasing_slur_engraver, break_phrasing_slur);
59 void
60 Phrasing_slur_engraver::listen_break_phrasing_slur (Stream_event *ev)
61 {
62   internal_listen_break_slur (ev);
63 }
64
65 void
66 Phrasing_slur_engraver::acknowledge_slur (Grob_info info)
67 {
68   acknowledge_extra_object (info);
69 }
70
71 ADD_ACKNOWLEDGER (Phrasing_slur_engraver, inline_accidental);
72 ADD_ACKNOWLEDGER (Phrasing_slur_engraver, fingering)
73 ADD_ACKNOWLEDGER (Phrasing_slur_engraver, note_column);
74 ADD_ACKNOWLEDGER (Phrasing_slur_engraver, slur);
75 ADD_ACKNOWLEDGER (Phrasing_slur_engraver, script);
76 ADD_ACKNOWLEDGER (Phrasing_slur_engraver, dots);
77 ADD_ACKNOWLEDGER (Phrasing_slur_engraver, text_script);
78 ADD_END_ACKNOWLEDGER (Phrasing_slur_engraver, tie);
79 ADD_ACKNOWLEDGER (Phrasing_slur_engraver, tuplet_number);
80
81 ADD_TRANSLATOR (Phrasing_slur_engraver,
82                 /* doc */
83                 "Print phrasing slurs.  Similar to @ref{Slur_engraver}.",
84
85                 /* create */
86                 "PhrasingSlur ",
87
88                 /* read */
89                 "",
90
91                 /* write */
92                 ""
93                );