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>
9 #ifndef LIGATURE_ENGRAVER_HH
10 #define LIGATURE_ENGRAVER_HH
12 #include "engraver.hh"
15 * FIXME: Spanner *create_ligature_spanner () and virtual void
16 * typeset_ligature (...) are abstract methods, such that we would
17 * like to declare them abstract:
19 * virtual Spanner *create_ligature_spanner () = 0;
20 * virtual void typeset_ligature (...) = 0;
22 * Unfortunately, clone_const_helper() (as expanded from the
23 * TRANSLATOR_DECLARATIONS macro) requires this class to be
24 * instantiatable, such that it may not have any abstract virtual
25 * functions. As a workaround, the actually abstract methods are
26 * implemented, but produce a programming_error whenever called. --jr
29 class Ligature_engraver : public Engraver
32 virtual void stop_translation_timestep ();
33 virtual void finalize ();
35 virtual void acknowledge_grob (Grob_info);
36 virtual bool try_music (Music*);
37 virtual void process_music ();
38 virtual Spanner *create_ligature_spanner (); /* abstract method */
39 virtual void typeset_ligature (Spanner *ligature,
40 Array<Grob_info> primitives); /* abstract method */
41 virtual Spanner *current_ligature ();
42 SCM brew_ligature_primitive_proc;
45 TRANSLATOR_DECLARATIONS(Ligature_engraver);
48 Drul_array<Music*> reqs_drul_;
51 Array<Grob_info> primitives_;
53 Spanner *finished_ligature_;
54 Array<Grob_info> finished_primitives_;
56 Music *prev_start_req_;
58 // moment where ligature started.
59 Moment ligature_start_mom_;
63 void override_stencil_callback ();
64 void revert_stencil_callback ();
67 #endif // LIGATURE_ENGRAVER_HH