]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/page-breaking.cc
Merge branch 'master' into lilypond/translation
[lilypond.git] / lily / page-breaking.cc
index a961dce545967c7494df3713e864cbf059d97fb0..7dbac44278ef34c2f9cd0073c599932306c5212f 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2006--2009 Joe Neeman <joeneeman@gmail.com>
+  Copyright (C) 2006--2010 Joe Neeman <joeneeman@gmail.com>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -174,6 +174,7 @@ Page_breaking::Page_breaking (Paper_book *pb, Break_predicate is_break)
   systems_per_page_ = max (0, robust_scm2int (pb->paper_->c_variable ("systems-per-page"), 0));
   max_systems_per_page_ = max (0, robust_scm2int (pb->paper_->c_variable ("max-systems-per-page"), 0));
   min_systems_per_page_ = max (0, robust_scm2int (pb->paper_->c_variable ("min-systems-per-page"), 0));
+  orphan_penalty_ = robust_scm2int (pb->paper_->c_variable ("orphan-penalty"), 100000);
 
   if (systems_per_page_ && (max_systems_per_page_ || min_systems_per_page_))
     {
@@ -1407,3 +1408,9 @@ Page_breaking::min_whitespace_at_bottom_of_page (Line_details const &line) const
   // FIXME: take into account the height of the footer
   return max (0.0, max (padding, min_distance + line.extent_[DOWN]));
 }
+
+int
+Page_breaking::orphan_penalty () const
+{
+  return orphan_penalty_;
+}