Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1473)

Unified Diff: lily/item-scheme.cc

Issue 5201043: Creates a LeftBarStub that stops lyrics from bumping into the SystemStartBar.
Patch Set: Allows extremal LeftBarStubs to be flush with system start. Created 12 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lily/item.cc ('k') | lily/left-bar-stub-engraver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+}
+
« no previous file with comments | « lily/item.cc ('k') | lily/left-bar-stub-engraver.cc » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b