-int
-Align_interface::stretchable_children_count (Grob const *me)
-{
- extract_grob_set (me, "elements", elts);
- int ret = 0;
-
- /* start at 1: we will never move the first child while stretching */
- for (vsize i = 1; i < elts.size (); i++)
- if (!to_boolean (elts[i]->get_property ("keep-fixed-while-stretching"))
- && !elts[i]->extent (elts[i], Y_AXIS).is_empty ())
- ret++;
-
- return ret;
-}
-
-MAKE_SCHEME_CALLBACK (Align_interface, calc_max_stretch, 1)
-SCM
-Align_interface::calc_max_stretch (SCM smob)
-{
- Grob *me = unsmob_grob (smob);
- Spanner *spanner_me = dynamic_cast<Spanner*> (me);
- Real ret = 0;
-
- if (spanner_me && stretchable_children_count (me) > 0)
- {
- Paper_column *left = dynamic_cast<Paper_column*> (spanner_me->get_bound (LEFT));
- Real height = me->extent (me, Y_AXIS).length ();
- SCM line_break_details = left->get_property ("line-break-system-details");
- SCM fixed_offsets = scm_assq (ly_symbol2scm ("alignment-offsets"),
- line_break_details);
-
- /* if there are fixed offsets, we refuse to stretch */
- if (fixed_offsets != SCM_BOOL_F)
- ret = 0;
- else
- ret = height * height / 80.0; /* why this, exactly? -- jneem */
- }
- return scm_from_double (ret);
-}
-
-/*
- Find Y-axis parent of G that has a #'forced-distance property. This
- has the effect of finding the piano-staff given an object in that
- piano staff.
-
- FIXME: piano staves no longer have forced-distance. The code that
- relies on this function (in line-spanner) is broken.
-*/
-Grob *
-find_fixed_alignment_parent (Grob *g)
-{
- (void) g;
- programming_error ("deprecated. We don't use forced-distance anymore");
- return 0;
-}
-