2 ligature-engraver.hh -- declare Ligature_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 2002--2005 Juergen Reuter <reuter@ipd.uka.de>
8 #ifndef LIGATURE_ENGRAVER_HH
9 #define LIGATURE_ENGRAVER_HH
11 #include "engraver.hh"
16 * FIXME: Spanner *create_ligature_spanner () and virtual void
17 * typeset_ligature (...) are abstract methods, such that we would
18 * like to declare them abstract:
20 * virtual Spanner *create_ligature_spanner () = 0;
21 * virtual void typeset_ligature (...) = 0;
23 * Unfortunately, clone_const_helper() (as expanded from the
24 * TRANSLATOR_DECLARATIONS macro) requires this class to be
25 * instantiatable, such that it may not have any abstract virtual
26 * functions. As a workaround, the actually abstract methods are
27 * implemented, but produce a programming_error whenever called. --jr
30 class Ligature_engraver : public Engraver
33 void stop_translation_timestep ();
34 virtual void finalize ();
37 DECLARE_ACKNOWLEDGER(rest);
38 DECLARE_ACKNOWLEDGER(note_head);
39 virtual bool try_music (Music *);
40 void process_music ();
41 virtual Spanner *create_ligature_spanner (); /* abstract method */
42 virtual void typeset_ligature (Spanner *ligature,
43 Array<Grob_info> primitives); /* abstract method */
44 virtual Spanner *current_ligature ();
45 SCM brew_ligature_primitive_proc;
48 TRANSLATOR_DECLARATIONS (Ligature_engraver);
51 Drul_array<Music *> events_drul_;
54 Array<Grob_info> primitives_;
56 Spanner *finished_ligature_;
57 Array<Grob_info> finished_primitives_;
59 Music *prev_start_event_;
61 // moment where ligature started.
62 Moment ligature_start_mom_;
66 void override_stencil_callback ();
67 void revert_stencil_callback ();
70 #endif // LIGATURE_ENGRAVER_HH