source file of the GNU LilyPond music typesetter
- (c) 2000--2005 Jan Nieuwenhuizen <janneke@gnu.org>
+ (c) 2000--2006 Jan Nieuwenhuizen <janneke@gnu.org>
Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
TRANSLATOR_DECLARATIONS (Part_combine_engraver);
protected:
- virtual void acknowledge_grob (Grob_info);
- PRECOMPUTED_VIRTUAL void process_music ();
- PRECOMPUTED_VIRTUAL void stop_translation_timestep ();
+ DECLARE_ACKNOWLEDGER (note_head);
+ DECLARE_ACKNOWLEDGER (stem);
+
+ void process_music ();
+ void stop_translation_timestep ();
virtual bool try_music (Music *);
private:
Item *text_;
else if (what == ly_symbol2scm ("unisono"))
text = get_property ("aDueText");
- if (Text_interface::markup_p (text))
+ if (Text_interface::is_markup (text))
{
text_ = make_item ("CombineTextScript", event_->self_scm ());
text_->set_property ("text", text);
}
void
-Part_combine_engraver::acknowledge_grob (Grob_info i)
+Part_combine_engraver::acknowledge_note_head (Grob_info i)
{
if (text_)
{
- if (Note_head::has_interface (i.grob ()))
- {
- Grob *t = text_;
- Side_position_interface::add_support (t, i.grob ());
- if (Side_position_interface::get_axis (t) == X_AXIS
- && !t->get_parent (Y_AXIS))
- t->set_parent (i.grob (), Y_AXIS);
- }
- if (Stem::has_interface (i.grob ()))
- {
- Side_position_interface::add_support (text_, i.grob ());
- }
+ Grob *t = text_;
+ Side_position_interface::add_support (t, i.grob ());
+ if (Side_position_interface::get_axis (t) == X_AXIS
+ && !t->get_parent (Y_AXIS))
+ t->set_parent (i.grob (), Y_AXIS);
}
}
+void
+Part_combine_engraver::acknowledge_stem (Grob_info i)
+{
+ if (text_)
+ Side_position_interface::add_support (text_, i.grob ());
+}
+
void
Part_combine_engraver::stop_translation_timestep ()
{
}
#include "translator.icc"
-
+ADD_ACKNOWLEDGER (Part_combine_engraver, note_head);
+ADD_ACKNOWLEDGER (Part_combine_engraver, stem);
ADD_TRANSLATOR (Part_combine_engraver,
- /* descr */ "Part combine engraver for orchestral scores: "
+ /* doc */ "Part combine engraver for orchestral scores: "
"Print markings a2, Solo, Solo II, and unisono ",
- /* creats*/ "CombineTextScript",
- /* accepts */ "part-combine-event",
- /* acks */ "multi-measure-rest-interface "
- "slur-interface stem-interface note-head-interface",
- /* reads */ "printPartCombineTexts soloText soloIIText "
+ /* create */ "CombineTextScript",
+ /* accept */ "part-combine-event",
+ /* read */ "printPartCombineTexts soloText soloIIText "
"aDueText",
/* write */ "");