]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/paper-column.cc
* scm/output-lib.scm (grace-spacing::calc-shortest-duration): new function.
[lilypond.git] / lily / paper-column.cc
index 6fa9ee6ab7152d90474c6facb4ed75e2e1fadb96..4da6ff3ef9351419387914458f6f7cc879ca0296 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.
 */
@@ -192,8 +206,14 @@ ADD_INTERFACE (Paper_column,
               /* properties */
               "between-cols "
               "bounded-by-me "
+              "grace-spacing " 
               "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 "