]> git.donarmstrong.com Git - lilypond.git/blob - lily/page-breaking-scheme.cc
Run grand-replace for 2010.
[lilypond.git] / lily / page-breaking-scheme.cc
1 /*
2   This file is part of LilyPond, the GNU music typesetter.
3
4   Copyright (C) 2006--2010 Joe Neeman <joeneeman@gmail.com>
5
6   LilyPond is free software: you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation, either version 3 of the License, or
9   (at your option) any later version.
10
11   LilyPond is distributed in the hope that it will be useful,
12   but WITHOUT ANY WARRANTY; without even the implied warranty of
13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   GNU General Public License for more details.
15
16   You should have received a copy of the GNU General Public License
17   along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #include "paper-book.hh"
21 #include "page-turn-page-breaking.hh"
22 #include "optimal-page-breaking.hh"
23 #include "minimal-page-breaking.hh"
24
25 LY_DEFINE (ly_page_turn_breaking, "ly:page-turn-breaking",
26            1, 0, 0, (SCM pb),
27            "Optimally break (pages and lines) the @code{Paper_book} object"
28            " @var{pb} such that page turns only happen in specified places,"
29            " returning its pages.")
30 {
31   Page_turn_page_breaking b (unsmob_paper_book (pb));
32   return b.solve ();
33 }
34
35 LY_DEFINE (ly_optimal_breaking, "ly:optimal-breaking",
36            1, 0, 0, (SCM pb),
37            "Optimally break (pages and lines) the @code{Paper_book} object"
38            " @var{pb} to minimize badness in bother vertical and horizontal"
39            " spacing.")
40 {
41   Optimal_page_breaking b (unsmob_paper_book (pb));
42   return b.solve ();
43 }
44
45 LY_DEFINE (ly_minimal_breaking, "ly:minimal-breaking",
46            1, 0, 0, (SCM pb),
47            "Break (pages and lines) the @code{Paper_book} object @var{pb}"
48            " without looking for optimal spacing: stack as many lines on"
49            " a page before moving to the next one.")
50 {
51   Minimal_page_breaking b (unsmob_paper_book (pb));
52   return b.solve ();
53 }