]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/horizontal-bracket-engraver.cc
Issue 5062: Redo send_stream_event in type-clean manner
[lilypond.git] / lily / horizontal-bracket-engraver.cc
index 78bba9cf15bc7829122fdf6bafcdd6949ad3ab0a..6dd34c17855f564989dcf79ccedfa9da3a6f018a 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2002--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 2002--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -39,17 +39,17 @@ public:
 
   void stop_translation_timestep ();
   void process_music ();
-  DECLARE_ACKNOWLEDGER (note_column);
-  DECLARE_TRANSLATOR_LISTENER (note_grouping);
+  void acknowledge_note_column (Grob_info);
+  void listen_note_grouping (Stream_event *);
 };
 
-Horizontal_bracket_engraver::Horizontal_bracket_engraver ()
+Horizontal_bracket_engraver::Horizontal_bracket_engraver (Context *c)
+  : Engraver (c)
 {
   pop_count_ = 0;
   push_count_ = 0;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Horizontal_bracket_engraver, note_grouping);
 void
 Horizontal_bracket_engraver::listen_note_grouping (Stream_event *ev)
 {
@@ -109,7 +109,13 @@ Horizontal_bracket_engraver::stop_translation_timestep ()
   events_.clear ();
 }
 
-ADD_ACKNOWLEDGER (Horizontal_bracket_engraver, note_column);
+void
+Horizontal_bracket_engraver::boot ()
+{
+  ADD_LISTENER (Horizontal_bracket_engraver, note_grouping);
+  ADD_ACKNOWLEDGER (Horizontal_bracket_engraver, note_column);
+}
+
 ADD_TRANSLATOR (Horizontal_bracket_engraver,
                 /* doc */
                 "Create horizontal brackets over notes for musical analysis"