X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fligature-engraver.hh;h=92cc15940eade975be5193a1a15b09f0ba92d211;hb=48ddc05527f9894f322bcb8becd94110ba446291;hp=80c8537af6458c0f881fbdaffe6177fdee482768;hpb=811be522d0b79493159f47789e5621dc85493495;p=lilypond.git diff --git a/lily/include/ligature-engraver.hh b/lily/include/ligature-engraver.hh index 80c8537af6..92cc15940e 100644 --- a/lily/include/ligature-engraver.hh +++ b/lily/include/ligature-engraver.hh @@ -3,68 +3,51 @@ source file of the GNU LilyPond music typesetter - (c) 2002--2005 Juergen Reuter + (c) 2002--2009 Juergen Reuter */ + #ifndef LIGATURE_ENGRAVER_HH #define LIGATURE_ENGRAVER_HH #include "engraver.hh" #include "moment.hh" - -/* - * FIXME: Spanner *create_ligature_spanner () and virtual void - * typeset_ligature (...) are abstract methods, such that we would - * like to declare them abstract: - * - * virtual Spanner *create_ligature_spanner () = 0; - * virtual void typeset_ligature (...) = 0; - * - * Unfortunately, clone_const_helper() (as expanded from the - * TRANSLATOR_DECLARATIONS macro) requires this class to be - * instantiatable, such that it may not have any abstract virtual - * functions. As a workaround, the actually abstract methods are - * implemented, but produce a programming_error whenever called. --jr - */ - class Ligature_engraver : public Engraver { protected: + Ligature_engraver (); void stop_translation_timestep (); virtual void finalize (); - DECLARE_ACKNOWLEDGER (rest); DECLARE_ACKNOWLEDGER (note_head); - virtual bool try_music (Music *); + virtual void listen_ligature (Stream_event *ev); void process_music (); - virtual Spanner *create_ligature_spanner (); /* abstract method */ + virtual Spanner *create_ligature_spanner () = 0; virtual void typeset_ligature (Spanner *ligature, - Array primitives); /* abstract method */ + vector 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 events_drul_; + Drul_array events_drul_; Spanner *ligature_; - Array primitives_; + vector primitives_; Spanner *finished_ligature_; - Array finished_primitives_; + vector finished_primitives_; - Music *prev_start_event_; + Stream_event *prev_start_event_; // moment where ligature started. Moment ligature_start_mom_; Grob *last_bound_; - - void override_stencil_callback (); - void revert_stencil_callback (); }; #endif // LIGATURE_ENGRAVER_HH