- Real my_offset = right_point - distance_to_next;
-
- col->system_ = which;
- col->translate_axis (my_offset - col->relative_coordinate (common, X_AXIS), X_AXIS);
- }
-}
-
-
-
-/*
- Return whether COL is fixed to its neighbors by some kind of spacing
- constraint.
-
-
- If in doubt, then we're not loose; the spacing engine should space
- for it, risking suboptimal spacing.
-
- (Otherwise, we might risk core dumps, and other weird stuff.)
-*/
-static bool
-loose_column (Grob *l, Grob *c, Grob *r)
-{
- extract_grob_set (c, "right-neighbors", rns);
- extract_grob_set (c, "left-neighbors", lns);
-
- /*
- If this column doesn't have a proper neighbor, we should really
- make it loose, but spacing it correctly is more than we can
- currently can handle.
-
- (this happens in the following situation:
-
- |
- | clef G
- *
-
- | | ||
- | | ||
- O O ||
-
-
- the column containing the clef is really loose, and should be
- attached right to the first column, but that is a lot of work for
- such a borderline case.)
-
- */
- if (lns.is_empty () || rns.is_empty ())
- return false;
-
- Item *l_neighbor = dynamic_cast<Item *> (lns[0]);
- Item *r_neighbor = dynamic_cast<Item *> (rns[0]);
-
- if (!l_neighbor || !r_neighbor)
- return false;
-
- l_neighbor = l_neighbor->get_column ();
- r_neighbor = dynamic_cast<Item *> (Note_spacing::right_column (r_neighbor));
-
- if (l == l_neighbor && r == r_neighbor)
- return false;
-
- if (!l_neighbor || !r_neighbor)
- return false;