/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 2000--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ Copyright (C) 2000--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "separation-item.hh"
#include "skyline-pair.hh"
#include "staff-grouper-interface.hh"
+#include "stem.hh"
#include "stencil.hh"
#include "system.hh"
#include "warn.hh"
Interval
Axis_group_interface::relative_maybe_bound_group_extent (vector<Grob *> const &elts,
- Grob *common, Axis a, bool bound)
+ Grob *common, Axis a, bool bound)
{
Interval r;
for (vsize i = 0; i < elts.size (); i++)
Interval_t<int> rank_span = g->spanned_rank_interval ();
if (rank_span[LEFT] <= end && rank_span[RIGHT] >= start
&& g->pure_is_visible (start, end)
- && !to_boolean (g->get_property ("cross-staff")))
+ && !(to_boolean (g->get_property ("cross-staff"))
+ && Stem::has_interface (g)))
{
Interval dims = g->pure_height (common, start, end);
if (!dims.is_empty ())
if (Item *it = dynamic_cast<Item *> (elts[i]))
{
- Direction d = LEFT;
- do
+ for (LEFT_and_RIGHT (d))
{
Item *piece = it->find_prebroken_piece (d);
if (piece && to_boolean (scm_apply_1 (pure_relevant_p, piece->self_scm (), SCM_EOL)))
relevant_grobs.push_back (piece);
}
- while (flip (&d) != LEFT);
}
}
return me->get_maybe_pure_property ("default-staff-staff-spacing", pure, start, end);
}
-Real
-Axis_group_interface::minimum_distance (Grob *g1, Grob *g2, Axis a)
-{
- SCM sym = ly_symbol2scm ((a == Y_AXIS) ? "vertical-skylines" : "horizontal-skylines");
-
- Skyline_pair *s1 = Skyline_pair::unsmob (g1->get_property (sym));
- Skyline_pair *s2 = Skyline_pair::unsmob (g2->get_property (sym));
- if (s1 && s2)
- return (*s1)[DOWN].distance ((*s2)[UP]);
- return 0;
-}
-
ADD_INTERFACE (Axis_group_interface,
"An object that groups other layout objects.",