+void
+Spacing_spanner::set_distances_for_loose_col (Grob *me, Grob *c,
+ Drul_array<Item *> next_door,
+ Spacing_options const *options)
+{
+ Direction d = LEFT;
+ Drul_array<Real> dists (0, 0);
+
+ do
+ {
+ Item *lc = dynamic_cast<Item *> ((d == LEFT) ? next_door[LEFT] : c);
+ Item *rc = dynamic_cast<Item *> (d == LEFT ? c : next_door[RIGHT]);
+
+ extract_grob_set (lc, "spacing-wishes", wishes);
+ for (vsize k = wishes.size (); k--;)
+ {
+ Grob *sp = wishes[k];
+ if (Spacing_interface::left_column (sp) != lc
+ || Spacing_interface::right_column (sp) != rc)
+ continue;
+
+ if (Note_spacing::has_interface (sp))
+ {
+ /*
+ The note spacing should be taken from the musical
+ columns.
+ */
+ Real base = note_spacing (me, lc, rc, options);
+ Spring spring = Note_spacing::get_spacing (sp, rc, base, options->increment_);
+
+ dists[d] = max (dists[d], spring.min_distance ());
+ }
+ else if (Staff_spacing::has_interface (sp))
+ {
+ Spring spring = Staff_spacing::get_spacing (sp, rc);
+
+ dists[d] = max (dists[d], spring.min_distance ());
+ }
+ else
+ programming_error ("Subversive spacing wish");
+ }
+ }
+ while (flip (&d) != LEFT);
+
+ Rod r;
+ r.distance_ = dists[LEFT] + dists[RIGHT];
+ r.item_drul_ = next_door;
+
+ r.add_to_cols ();
+}
+
+