/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 1997--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ Copyright (C) 1997--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
if (!model_bar)
model_bar = me;
- vector_sort (extents, Interval::left_less);
-
Stencil span_bar;
for (vsize i = 1; i < extents.size (); i++)
{
return ly_string2scm (type);
}
+void
+Span_bar::notify_grobs_of_my_existence (Grob *me)
+{
+ extract_grob_set (me, "elements", elts);
+ vector<Grob *> sortable (elts.begin (), elts.end ());
+ vector_sort (sortable, Grob::vertical_less);
+ for (vsize i = 0; i < sortable.size (); i++)
+ sortable[i]->set_property ("has-span-bar",
+ scm_cons (i != sortable.size () - 1 ? me->self_scm () : scm_from_bool (false),
+ i != 0 ? me->self_scm () : scm_from_bool (false)));
+}
+
Interval
Span_bar::get_spanned_interval (Grob *me)
{