X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fgrob-scheme.cc;h=572a49ac84afcf788be814ce2a00c2e6c0fde05f;hb=926115ff42def8bc1ce767029e4f03c8072994ba;hp=0924b0a58dab8699abde6cc5b2c87b104f86a6a5;hpb=cee6cea4ed55eb4fa1f9d83c997ebc19744a6e1a;p=lilypond.git diff --git a/lily/grob-scheme.cc b/lily/grob-scheme.cc index 0924b0a58d..572a49ac84 100644 --- a/lily/grob-scheme.cc +++ b/lily/grob-scheme.cc @@ -23,7 +23,6 @@ #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 () @@ -51,7 +50,6 @@ LY_DEFINE (ly_grob_set_property_x, "ly:grob-set-property!", LY_ASSERT_TYPE (ly_is_symbol, sym, 2); if (!ly_is_procedure (val) - && !unsmob (val) && !type_check_assignment (sym, val, ly_symbol2scm ("backend-type?"))) error ("typecheck failed"); @@ -482,3 +480,18 @@ LY_DEFINE (ly_grob_get_vertical_axis_group_index, "ly:grob-get-vertical-axis-gro 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); + + LY_ASSERT_SMOB (Grob, grob, 1); + + Interval_t iv = gr->spanned_rank_interval (); + + return scm_cons (scm_from_int(iv[LEFT]), scm_from_int(iv[RIGHT])); +}