]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/ligature-engraver.hh
Run grand replace for 2015.
[lilypond.git] / lily / include / ligature-engraver.hh
index bc5577a022e182fe6106a89bbfdc11c3fe6c6a9d..6f53331a4e5493627debd1ebea1bc48952f28726 100644 (file)
@@ -1,46 +1,64 @@
-/*   
-  ligature-engraver.hh -- declare Ligature_engraver
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 2002 Juergen Reuter <reuter@ipd.uka.de>
-  
- */
-#ifndef LIGATUREENGRAVER_HH
-#define LIGATUREEENGRAVER_HH
+/*
+  This file is part of LilyPond, the GNU music typesetter.
+
+  Copyright (C) 2002--2015 Juergen Reuter <reuter@ipd.uka.de>
+
+  LilyPond is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  LilyPond is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef LIGATURE_ENGRAVER_HH
+#define LIGATURE_ENGRAVER_HH
 
 #include "engraver.hh"
+#include "moment.hh"
 
 class Ligature_engraver : public Engraver
 {
 protected:
-  virtual void stop_translation_timestep ();
-  virtual void start_translation_timestep ();
+  Ligature_engraver ();
+  void stop_translation_timestep ();
   virtual void finalize ();
 
-  virtual void acknowledge_grob (Grob_info);
-  virtual bool try_music (Music*);
-  virtual void process_music ();
-  virtual void try_stop_ligature ();
-  virtual Spanner *create_ligature_spanner ();
-
-  Spanner *finished_ligature_;
-  Spanner *ligature_;
+  DECLARE_ACKNOWLEDGER (rest);
+  DECLARE_ACKNOWLEDGER (ligature_head);
+  virtual void listen_ligature (Stream_event *ev);
+  void process_music ();
+  virtual Spanner *create_ligature_spanner () = 0;
+  virtual void typeset_ligature (Spanner *ligature,
+                                 vector<Grob_info> const &primitives) = 0;
+  virtual Spanner *current_ligature ();
   SCM brew_ligature_primitive_proc;
 
 public:
-  TRANSLATOR_DECLARATIONS(Ligature_engraver);
+  // no TRANSLATOR_DECLARATIONS (Ligature_engraver) needed since this
+  // class is abstract
 
 private:
-  Drul_array<Music*> reqs_drul_;
-  
-  Music *prev_start_req_;
+  Drul_array<Stream_event *> events_drul_;
+
+  Spanner *ligature_;
+  vector<Grob_info> primitives_;
+
+  Spanner *finished_ligature_;
+  vector<Grob_info> finished_primitives_;
+
+  Stream_event *prev_start_event_;
 
   // moment where ligature started.
   Moment ligature_start_mom_;
 
-  Grob *last_bound;
-
+  Grob *last_bound_;
 };
 
-#endif // ENGRAVERGROUP_HH
+#endif // LIGATURE_ENGRAVER_HH