2 lyric-engraver.cc -- implement Lyric_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 Jan Nieuwenhuizen <janneke@gnu.org>
10 #include "engraver.hh"
13 #include "paper-def.hh"
14 #include "font-metric.hh"
15 #include "side-position-interface.hh"
18 Generate texts for lyric syllables. We only do one lyric at a time.
19 Multiple copies of this engraver should be used to do multiple voices.
21 class Lyric_engraver : public Engraver
24 virtual void stop_translation_timestep ();
25 virtual bool try_music (Music *);
26 virtual void process_music ();
29 TRANSLATOR_DECLARATIONS(Lyric_engraver);
38 Lyric_engraver::Lyric_engraver ()
45 Lyric_engraver::try_music (Music*r)
47 if (r->is_mus_type ("lyric-event"))
58 Lyric_engraver::process_music ()
62 text_= make_item ("LyricText");
64 text_->set_property ("text", req_->get_property ("text"));
65 announce_grob (text_, req_->self_scm());
70 Lyric_engraver::stop_translation_timestep ()
81 ENTER_DESCRIPTION(Lyric_engraver,
84 /* accepts */ "lyric-event",