- This callback is set in the children of the align element. It does
- not compute anything, but a side effect of a->do_side_processing ()
- is that the elements are placed correctly. */
-Real
-Align_interface::alignment_callback (Score_element *sc, Axis ax)
+ TODO: for vertical spacing, should also include a rod & spring
+ scheme of sorts into this: the alignment should default to a certain
+ distance between element refpoints, unless bbox force a bigger
+ distance.
+ */
+
+MAKE_SCHEME_CALLBACK (Align_interface, calc_positioning_done, 1);
+SCM
+Align_interface::calc_positioning_done (SCM smob)
+{
+ Grob *me = unsmob_grob (smob);
+ SCM axis = scm_car (me->get_property ("axes"));
+ Axis ax = Axis (scm_to_int (axis));
+
+ SCM force = me->get_property ("forced-distance");
+ if (scm_is_number (force))
+ Align_interface::align_to_fixed_distance (me, ax);
+ else
+ Align_interface::align_elements_to_extents (me, ax);
+
+ return SCM_BOOL_T;
+}
+
+/*
+ merge with align-to-extents?
+*/
+MAKE_SCHEME_CALLBACK(Align_interface, stretch_after_break, 1)
+SCM
+Align_interface::stretch_after_break (SCM grob)