#include "item.hh"
#include "output-def.hh"
#include "paper-score.hh"
-#include "simple-closure.hh"
#include "system.hh"
#include "unpure-pure-container.hh"
#include "warn.hh" // error ()
LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
if (!ly_is_procedure (val)
- && !unsmob<Simple_closure> (val)
&& !type_check_assignment (sym, val, ly_symbol2scm ("backend-type?")))
error ("typecheck failed");
return scm_from_int (Grob::get_vertical_axis_group_index (gr));
}
+
+LY_DEFINE (ly_grob_spanned_rank_interval, "ly:grob-spanned-rank-interval",
+ 1, 0, 0, (SCM grob),
+ "Returns a pair with the @code{rank} of the furthest left"
+ " column and the @code{rank} of the furthest right column"
+ " spanned by @code{grob}.")
+{
+ Grob *gr = unsmob<Grob> (grob);
+
+ LY_ASSERT_SMOB (Grob, grob, 1);
+
+ Interval_t<int> iv = gr->spanned_rank_interval ();
+
+ return scm_cons (scm_from_int(iv[LEFT]), scm_from_int(iv[RIGHT]));
+}