2 ligature-bracket-engraver.cc -- implement Ligature_bracket_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 2002--2003 Juergen Reuter <reuter@ipd.uka.de>
9 #include "ligature-engraver.hh"
10 #include "note-column.hh"
11 #include "tuplet-bracket.hh"
15 * This engraver marks ligatures of any kind by just printing a
16 * horizontal square bracket on top of each ligature. See class
17 * Ligature_engraver for more information on the interaction between
18 * this class and its superclass.
20 class Ligature_bracket_engraver : public Ligature_engraver
23 virtual Spanner *create_ligature_spanner ();
24 virtual void acknowledge_grob (Grob_info);
25 virtual void typeset_ligature (Spanner *ligature, Array<Grob_info>);
28 TRANSLATOR_DECLARATIONS(Ligature_bracket_engraver);
31 void typeset_ligature_bracket ();
35 Ligature_bracket_engraver::Ligature_bracket_engraver ()
40 Ligature_bracket_engraver::create_ligature_spanner ()
42 return make_spanner ("LigatureBracket");
46 Ligature_bracket_engraver::typeset_ligature (Spanner *ligature, Array<Grob_info>)
48 typeset_grob (ligature);
52 Ligature_bracket_engraver::acknowledge_grob (Grob_info info)
54 if (current_ligature ())
56 if (Note_column::has_interface (info.grob_))
58 Tuplet_bracket::add_column (current_ligature (),
59 dynamic_cast<Item*> (info.grob_));
61 else Ligature_engraver::acknowledge_grob (info);
65 ENTER_DESCRIPTION(Ligature_bracket_engraver,
66 /* descr */ "Handles Ligature_events by engraving Ligature brackets.",
67 /* creats*/ "TupletBracket",
68 /* accepts */ "ligature-event abort-event",
69 /* acks */ "rest-interface note-column-interface",