/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 2013--2014 Aleksandr Andreev <aleksandr.andreev@gmail.com>
+ Copyright (C) 2013--2015 Aleksandr Andreev <aleksandr.andreev@gmail.com>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
virtual Spanner *create_ligature_spanner ();
virtual void build_ligature (Spanner *ligature,
vector<Grob_info> const &primitives);
- DECLARE_TRANSLATOR_LISTENER (ligature);
public:
TRANSLATOR_DECLARATIONS (Kievan_ligature_engraver);
+ TRANSLATOR_INHERIT (Coherent_ligature_engraver);
private:
void fold_up_primitives (vector<Grob_info> const &primitives, Real padding, Real &min_length);
};
-IMPLEMENT_TRANSLATOR_LISTENER (Kievan_ligature_engraver, ligature);
-void
-Kievan_ligature_engraver::listen_ligature (Stream_event *ev)
-{
- Ligature_engraver::listen_ligature (ev);
-}
-
-Kievan_ligature_engraver::Kievan_ligature_engraver ()
+Kievan_ligature_engraver::Kievan_ligature_engraver (Context *c)
+ : Coherent_ligature_engraver (c)
{
}
first = current;
// must keep track of accidentals in spacing problem
- Grob *acc_gr = unsmob_grob (current->get_object ("accidental-grob"));
+ Grob *acc_gr = unsmob<Grob> (current->get_object ("accidental-grob"));
if (acc_gr && i > 0)
{
Interval acc_ext = acc_gr->extent (acc_gr, X_AXIS);
if (i < primitives.size () - 1)
{
Item *next = dynamic_cast<Item *> (primitives[i + 1].grob ());
- Grob *acc_gr = unsmob_grob (next->get_object ("accidental-grob"));
+ Grob *acc_gr = unsmob<Grob> (next->get_object ("accidental-grob"));
if (acc_gr)
{
Interval acc_ext = acc_gr->extent (acc_gr, X_AXIS);
}
-ADD_ACKNOWLEDGER (Kievan_ligature_engraver, rest);
-ADD_ACKNOWLEDGER (Kievan_ligature_engraver, ligature_head);
+
+void
+Kievan_ligature_engraver::boot ()
+{
+ ADD_LISTENER (Kievan_ligature_engraver, ligature);
+ ADD_ACKNOWLEDGER (Kievan_ligature_engraver, rest);
+ ADD_ACKNOWLEDGER (Kievan_ligature_engraver, ligature_head);
+}
ADD_TRANSLATOR (Kievan_ligature_engraver,
/* doc */