/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 2010 Carl D. Sorensen
+ Copyright (C) 2010--2015 Carl D. Sorensen
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
TRANSLATOR_DECLARATIONS (Tab_tie_follow_engraver);
protected:
- DECLARE_ACKNOWLEDGER (glissando);
- DECLARE_ACKNOWLEDGER (slur);
- DECLARE_ACKNOWLEDGER (tab_note_head);
+ void acknowledge_glissando (Grob_info);
+ void acknowledge_slur (Grob_info);
+ void acknowledge_tab_note_head (Grob_info);
void stop_translation_timestep ();
};
-Tab_tie_follow_engraver::Tab_tie_follow_engraver ()
+Tab_tie_follow_engraver::Tab_tie_follow_engraver (Context *c)
+ : Engraver (c)
{
}
bool spanner_start = false;
for (vsize j = 0; j < slurs_.size (); j++)
{
- Item* left_item = slurs_[j]->get_bound (LEFT);
+ Item *left_item = slurs_[j]->get_bound (LEFT);
if (left_item)
{
SCM left_cause = left_item->get_property ("cause");
- Item *slur_cause = unsmob_item (left_cause);
- if (slur_cause == note_heads_[k])
+ Item *slur_cause = unsmob<Item> (left_cause);
+ if (slur_cause == note_heads_[k])
{
note_heads_[k]->set_property ("span-start", SCM_BOOL_T);
spanner_start = true;
}
slurs_.clear ();
glissandi_.clear ();
- note_heads_.clear();
+ note_heads_.clear ();
}
-ADD_ACKNOWLEDGER (Tab_tie_follow_engraver, slur);
-ADD_ACKNOWLEDGER (Tab_tie_follow_engraver, glissando);
-ADD_ACKNOWLEDGER (Tab_tie_follow_engraver, tab_note_head);
+void
+Tab_tie_follow_engraver::boot ()
+{
+ ADD_ACKNOWLEDGER (Tab_tie_follow_engraver, slur);
+ ADD_ACKNOWLEDGER (Tab_tie_follow_engraver, glissando);
+ ADD_ACKNOWLEDGER (Tab_tie_follow_engraver, tab_note_head);
+}
ADD_TRANSLATOR (Tab_tie_follow_engraver,
- /* doc */
- "Adjust TabNoteHead properties when a tie is followed"
- " by a slur or glissando.",
+ /* doc */
+ "Adjust TabNoteHead properties when a tie is followed"
+ " by a slur or glissando.",
- /* create */
- " ",
+ /* create */
+ " ",
- /* read */
+ /* read */
" ",
- /* write */
+ /* write */
" "
- );
+ );