/*
extender-engraver.cc -- implement Extender_engraver
- (c) 1999 Glen Prideaux <glenprideaux@iname.com>,
- Han-Wen Nienhuys, Jan Nieuwenhuizen.
+ source file of the GNU LilyPond music typesetter
+ (c) 1999--2003 Glen Prideaux <glenprideaux@iname.com>,
+ Han-Wen Nienhuys <hanwen@cs.uu.nl>,
+ Jan Nieuwenhuizen <janneke@gnu.org>
*/
#include "flower-proto.hh"
-#include "musical-request.hh"
+#include "event.hh"
#include "lyric-extender.hh"
#include "paper-column.hh"
#include "item.hh"
gap between syllables.
We remember the last Item that come across. When we get a
- request, we create the spanner, and attach the left point to the
+ event, we create the spanner, and attach the left point to the
last lyrics, and the right point to any lyrics we receive by
then. */
class Extender_engraver : public Engraver
{
Grob *last_lyric_;
Grob *current_lyric_;
- Extender_req* req_;
+ Music* req_;
Spanner* extender_;
public:
TRANSLATOR_DECLARATIONS(Extender_engraver);
bool
Extender_engraver::try_music (Music* r)
{
- if (Extender_req* p = dynamic_cast <Extender_req *> (r))
- {
- if (req_)
- return false;
+ if (req_)
+ return false;
- req_ = p;
- return true;
- }
- return false;
+ req_ = r;
+ return true;
}
void
{
if (!last_lyric_)
{
- req_->origin ()->warning (_ ("Nothing to connect extender to on the left. Ignoring extender request."));
+ req_->origin ()->warning (_ ("Nothing to connect extender to on the left. Ignoring extender event."));
return;
}
ENTER_DESCRIPTION(Extender_engraver,
/* descr */ "Create lyric extenders",
/* creats*/ "LyricExtender",
-/* acks */ "lyric-syllable-interface",
+/* accepts */ "extender-event",
+/* acks */ "lyric-syllable-interface",
/* reads */ "",
/* write */ "");