Index: lily/item-scheme.cc |
diff --git a/lily/item-scheme.cc b/lily/item-scheme.cc |
index 11604bb33aa8b16fb89dfc8fd4fc007e0d5d2d5e..9d0a29ffdf8661f0fe4fd836fdace10db0c5d853 100644 |
--- a/lily/item-scheme.cc |
+++ b/lily/item-scheme.cc |
@@ -19,6 +19,7 @@ |
*/ |
#include "item.hh" |
+#include "hara-kiri-group-spanner.hh" |
LY_DEFINE (ly_item_p, "ly:item?", |
1, 0, 0, (SCM g), |
@@ -39,3 +40,19 @@ LY_DEFINE (ly_item_break_dir, "ly:item-break-dir", |
Item *me = unsmob_item (it); |
return scm_from_int (me->break_status_dir ()); |
} |
+ |
+LY_DEFINE (ly_item_extremal, "ly:item-extremal", |
+ 3, 0, 0, (SCM it, SCM beg, SCM end), |
+ "The break status direction of item @var{it}. @w{@code{-1}} means" |
+ " end of line, @code{0}@tie{}unbroken, and" |
+ " @code{1}@tie{}beginning of line.") |
+{ |
+ LY_ASSERT_TYPE (unsmob_item, it, 1); |
+ LY_ASSERT_TYPE (scm_is_integer, beg, 2); |
+ LY_ASSERT_TYPE (scm_is_integer, end, 3); |
+ |
+ Item *me = unsmob_item (it); |
+ Grob *vag = Grob::get_vertical_axis_group (me); |
+ return Hara_kiri_group_spanner::is_extremal (vag->self_scm (), beg, end); |
+} |
+ |