source file of the GNU LilyPond music typesetter
- (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1997--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
Jan Nieuwenhuizen <janneke@gnu.org>
*/
#include "context.hh"
#include "engraver.hh"
-#include "event.hh"
#include "font-metric.hh"
#include "item.hh"
#include "multi-measure-rest.hh"
/**
Generate texts for lyric syllables. We only do one lyric at a time.
Multiple copies of this engraver should be used to do multiple voices.
- */
+*/
class Lyric_engraver : public Engraver
{
protected:
}
bool
-Lyric_engraver::try_music (Music*r)
+Lyric_engraver::try_music (Music *r)
{
if (!event_)
{
}
}
-
-Context*
+Context *
get_voice_to_lyrics (Context *lyrics)
{
SCM avc = lyrics->get_property ("associatedVoiceContext");
- if (Context *c = unsmob_context (avc))
+ if (Context *c = unsmob_context (avc))
return c;
SCM voice_name = lyrics->get_property ("associatedVoice");
get_current_note_head (Context *voice)
{
for (SCM s = voice->get_property ("busyGrobs");
- ly_c_pair_p (s); s = ly_cdr (s))
+ scm_is_pair (s); s = scm_cdr (s))
{
- Item *g = dynamic_cast<Item*> (unsmob_grob (ly_cdar (s)));
-
+ Item *g = dynamic_cast<Item *> (unsmob_grob (scm_cdar (s)));
+
if (g && !g->get_column ()
&& Note_head::has_interface (g))
return g;
}
-
+
return 0;
}
event_ = 0;
}
-
-ENTER_DESCRIPTION (Lyric_engraver,
-/* descr */ "",
-/* creats*/ "LyricText",
-/* accepts */ "lyric-event",
-/* acks */ "",
-/* reads */ "",
-/* write */ "");
+ADD_TRANSLATOR (Lyric_engraver,
+ /* descr */ "",
+ /* creats*/ "LyricText",
+ /* accepts */ "lyric-event",
+ /* acks */ "",
+ /* reads */ "",
+ /* write */ "");