]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/paper-column.cc
Made tupletSpannerDuration work again.
[lilypond.git] / lily / paper-column.cc
index f7a1ae5e8b9108d54a2de1397b10138192bd692e..fccdba6e7f694d4549f0008438126e17fbc6ba0f 100644 (file)
@@ -65,6 +65,14 @@ Paper_column::Paper_column (Paper_column const &src, int count)
   rank_ = src.rank_;
 }
 
+int
+Paper_column::compare (Grob * const &a,
+                      Grob * const &b)
+{
+  return sign (dynamic_cast<Paper_column*> (a)->rank_
+              - dynamic_cast<Paper_column*> (b)->rank_);
+}
+
 Moment
 Paper_column::when_mom (Grob *me)
 {
@@ -95,7 +103,7 @@ Paper_column::is_used (Grob *me)
   if (bbm.size ())
     return true;
   
-  if (Item::is_breakable (me))
+  if (Paper_column::is_breakable (me))
     return true;
 
   if (to_boolean (me->get_property ("used")))
@@ -103,6 +111,12 @@ Paper_column::is_used (Grob *me)
   return false;
 }
 
+bool
+Paper_column::is_breakable (Grob *me)
+{
+  return scm_is_symbol (me->get_property ("line-break-permission"));
+}
+
 /*
   Print a vertical line and  the rank number, to aid debugging.
 */
@@ -113,10 +127,10 @@ Paper_column::print (SCM p)
 {
   Grob *me = unsmob_grob (p);
 
-  std::string r = to_string (Paper_column::get_rank (me));
+  string r = to_string (Paper_column::get_rank (me));
 
   Moment *mom = unsmob_moment (me->get_property ("when"));
-  std::string when = mom ? mom->to_string () : "?/?";
+  string when = mom ? mom->to_string () : "?/?";
 
   SCM properties = Font_interface::text_font_alist_chain (me);
 
@@ -157,7 +171,7 @@ Paper_column::before_line_breaking (SCM grob)
   if (!ga)
     return SCM_UNSPECIFIED;
 
-  Link_array__Grob_ &array (ga->array_reference ());
+  vector<Grob*> &array (ga->array_reference ());
 
   for (vsize i = array.size (); i--;)
     {
@@ -193,7 +207,12 @@ ADD_INTERFACE (Paper_column,
               "between-cols "
               "bounded-by-me "
               "line-break-system-details "
-              "page-penalty "
+              "line-break-penalty "
+              "line-break-permission "
+              "page-break-penalty "
+              "page-break-permission "
+              "page-turn-penalty "
+              "page-turn-permission "
               "shortest-playing-duration "
               "shortest-starter-duration "
               "used "