X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=lily%2Fpage-breaking.cc;h=7dbac44278ef34c2f9cd0073c599932306c5212f;hb=e2c7a2ab964d7ab2b4d993634303327adf5e39f2;hp=a961dce545967c7494df3713e864cbf059d97fb0;hpb=337f9c142a82cc9e844ea3ce4beacfc4c24d5993;p=lilypond.git diff --git a/lily/page-breaking.cc b/lily/page-breaking.cc index a961dce545..7dbac44278 100644 --- a/lily/page-breaking.cc +++ b/lily/page-breaking.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2006--2009 Joe Neeman + Copyright (C) 2006--2010 Joe Neeman 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_; +}