-ADD_INTERFACE (Tuplet_bracket,
- "A bracket with a number in the middle, used for tuplets. "
- "When the bracket spans a line break, the value of "
- "@code{break-overshoot} determines how far it extends "
- "beyond the staff. "
- "At a line break, the markups in the @code{edge-text} are printed "
- "at the edges. ",
-
-
- /* properties */
- "bracket-flare "
- "bracket-visibility "
- "break-overshoot "
- "connect-to-neighbor "
- "control-points "
- "direction "
- "edge-height "
- "edge-text "
- "gap "
- "positions "
- "note-columns "
- "padding "
- "tuplet-number "
- "shorten-pair "
- "staff-padding "
- "thickness "
- "tuplets ");
+MAKE_SCHEME_CALLBACK (Tuplet_bracket, calc_cross_staff, 1);
+SCM
+Tuplet_bracket::calc_cross_staff (SCM smob)
+{
+ Grob *me = unsmob<Grob> (smob);
+ extract_grob_set (me, "note-columns", cols);
+ extract_grob_set (me, "tuplets", tuplets);
+
+ Grob *commony = common_refpoint_of_array (cols, me, Y_AXIS);
+ commony = common_refpoint_of_array (tuplets, commony, Y_AXIS);
+ if (Grob *st = Staff_symbol_referencer::get_staff_symbol (me))
+ commony = st->common_refpoint (commony, Y_AXIS);
+ if (me->check_cross_staff (commony))
+ return SCM_BOOL_T;
+
+ bool equally_long = false;
+ Grob *par_beam = parallel_beam (me, cols, &equally_long);
+
+ if (par_beam && to_boolean (par_beam->get_property ("cross-staff")))
+ return SCM_BOOL_T;