X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fpage-breaking-scheme.cc;h=653815dd3031a4af1d460e2db4feeb4249eabfcb;hb=74e906db27770282e2d3c180298e5968ebff9360;hp=2241b503a760079d4a2ffc2776a00244d1379b7a;hpb=a667c0fbd789c30b782bae277456bb1f940ddccc;p=lilypond.git diff --git a/lily/page-breaking-scheme.cc b/lily/page-breaking-scheme.cc index 2241b503a7..653815dd30 100644 --- a/lily/page-breaking-scheme.cc +++ b/lily/page-breaking-scheme.cc @@ -1,15 +1,26 @@ /* - page-breaking-scheme.cc -- implement bindings to the various - page-breakers + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 2006--2011 Joe Neeman - (c) 2006--2007 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 + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #include "paper-book.hh" #include "page-turn-page-breaking.hh" #include "optimal-page-breaking.hh" +#include "minimal-page-breaking.hh" LY_DEFINE (ly_page_turn_breaking, "ly:page-turn-breaking", 1, 0, 0, (SCM pb), @@ -30,3 +41,13 @@ LY_DEFINE (ly_optimal_breaking, "ly:optimal-breaking", Optimal_page_breaking b (unsmob_paper_book (pb)); return b.solve (); } + +LY_DEFINE (ly_minimal_breaking, "ly:minimal-breaking", + 1, 0, 0, (SCM pb), + "Break (pages and lines) the @code{Paper_book} object @var{pb}" + " without looking for optimal spacing: stack as many lines on" + " a page before moving to the next one.") +{ + Minimal_page_breaking b (unsmob_paper_book (pb)); + return b.solve (); +}