source file of the GNU LilyPond music typesetter
- (c) 1998--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1998--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
Fingering_engraver::acknowledge_grob (Grob_info inf)
{
- if (Stem::has_interface (inf.grob_l_))
+ if (Stem::has_interface (inf.grob_))
{
for (int i=0; i < fingerings_.size (); i++)
{
- Side_position_interface::add_support (fingerings_[i],inf.grob_l_);
+ Side_position_interface::add_support (fingerings_[i],inf.grob_);
}
}
- else if (Rhythmic_head::has_interface (inf.grob_l_))
+ else if (Rhythmic_head::has_interface (inf.grob_))
{
Music * mc =inf.music_cause ();
Pitch * mp = mc? unsmob_pitch (mc->get_mus_property ("pitch")) :0;
for (int i=0; i < fingerings_.size (); i++)
{
Grob*t = fingerings_[i];
- Side_position_interface::add_support (t,inf.grob_l_);
+ Side_position_interface::add_support (t,inf.grob_);
Pitch *fp = unsmob_pitch (t->get_grob_property ("pitch"));
if (fp)
{
if (*fp == *mp)
{
Axis other = other_axis (Side_position_interface::get_axis (t));
- t->set_parent (inf.grob_l_, other);
+ t->set_parent (inf.grob_, other);
}
}
else
{
if (!t->get_parent (X_AXIS))
- t->set_parent (inf.grob_l_, X_AXIS);
+ t->set_parent (inf.grob_, X_AXIS);
}
}
}
for (int i= pitch_sorted_reqs.size(); i--;)
{
SCM dir = pitch_sorted_reqs[i]->get_mus_property ("direction");
- if (isdir_b (dir) && to_dir (dir)) {
+ if (ly_dir_p (dir) && to_dir (dir)) {
if (to_dir (dir) == UP)
up_reqs_.push (pitch_sorted_reqs[i]);
else if (to_dir (dir) == DOWN)
Side_position_interface::set_axis (fingering, a);
- fingering->add_offset_callback (Side_position_interface::aligned_on_self_proc, other);
- fingering->add_offset_callback (Side_position_interface::centered_on_parent_proc, other);
- fingering->set_grob_property ("script-priority",
- gh_int2scm (100 + d* i));
+ fingering->add_offset_callback (Self_alignment_interface::aligned_on_self_proc, other);
+ fingering->add_offset_callback (Self_alignment_interface::centered_on_parent_proc, other);
+
+ // Hmm
+ int priority = 200;
+ SCM s = fingering->get_grob_property ("script-priority");
+ if (gh_number_p (s))
+ priority = gh_scm2int (s);
+
+ /* Make sure they're in order of user input by adding index i. */
+ priority += d*i;
+
+ fingering->set_grob_property ("script-priority", gh_int2scm (priority));
- if (!isdir_b (fingering->get_grob_property ("direction")))
+ if (!ly_dir_p (fingering->get_grob_property ("direction")))
{
if (d)
fingering->set_grob_property ("direction", gh_int2scm (d));
}
fingering->set_grob_property ("text", r->get_mus_property ("text"));
-
- SCM nonempty = get_property ("textNonEmpty");
- if (to_boolean (nonempty))
- /*
- empty fingering: signal that no rods should be applied.
- */
- fingering->set_grob_property ("no-spacing-rods" , SCM_BOOL_F);
- announce_grob (fingering, r);
+ announce_grob (fingering, r->self_scm());
fingerings_.push (fingering);
}
/* descr */ "Create fingering-scripts",
/* creats*/ "Fingering",
/* acks */ "rhythmic-head-interface stem-interface",
-/* reads */ "scriptHorizontal textNonEmpty",
+/* reads */ "scriptHorizontal",
/* write */ "");