]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/ligature-engraver.hh
Run grand-replace (issue 3765)
[lilypond.git] / lily / include / ligature-engraver.hh
1 /*
2   This file is part of LilyPond, the GNU music typesetter.
3
4   Copyright (C) 2002--2014 Juergen Reuter <reuter@ipd.uka.de>
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 #ifndef LIGATURE_ENGRAVER_HH
21 #define LIGATURE_ENGRAVER_HH
22
23 #include "engraver.hh"
24 #include "moment.hh"
25
26 class Ligature_engraver : public Engraver
27 {
28 protected:
29   Ligature_engraver ();
30   void stop_translation_timestep ();
31   virtual void finalize ();
32
33   DECLARE_ACKNOWLEDGER (rest);
34   DECLARE_ACKNOWLEDGER (ligature_head);
35   virtual void listen_ligature (Stream_event *ev);
36   void process_music ();
37   virtual Spanner *create_ligature_spanner () = 0;
38   virtual void typeset_ligature (Spanner *ligature,
39                                  vector<Grob_info> const &primitives) = 0;
40   virtual Spanner *current_ligature ();
41   SCM brew_ligature_primitive_proc;
42
43 public:
44   // no TRANSLATOR_DECLARATIONS (Ligature_engraver) needed since this
45   // class is abstract
46
47 private:
48   Drul_array<Stream_event *> events_drul_;
49
50   Spanner *ligature_;
51   vector<Grob_info> primitives_;
52
53   Spanner *finished_ligature_;
54   vector<Grob_info> finished_primitives_;
55
56   Stream_event *prev_start_event_;
57
58   // moment where ligature started.
59   Moment ligature_start_mom_;
60
61   Grob *last_bound_;
62 };
63
64 #endif // LIGATURE_ENGRAVER_HH