]> git.donarmstrong.com Git - lilypond.git/blob - lily/page-breaking-scheme.cc
Merge branch 'Rmaster' into topic/master-translation
[lilypond.git] / lily / page-breaking-scheme.cc
1 /*
2   page-breaking-scheme.cc -- implement bindings to the various
3   page-breakers
4
5   source file of the GNU LilyPond music typesetter
6
7   (c) 2006--2007 Joe Neeman <joeneeman@gmail.com>
8 */
9
10 #include "paper-book.hh"
11 #include "page-turn-page-breaking.hh"
12 #include "optimal-page-breaking.hh"
13
14 LY_DEFINE (ly_page_turn_breaking, "ly:page-turn-breaking",
15            1, 0, 0, (SCM pb),
16            "Optimally break (pages and lines) the @code{Paper_book} object"
17            " @var{pb} such that page turns only happen in specified places,"
18            " returning its pages.")
19 {
20   Page_turn_page_breaking b (unsmob_paper_book (pb));
21   return b.solve ();
22 }
23
24 LY_DEFINE (ly_optimal_breaking, "ly:optimal-breaking",
25            1, 0, 0, (SCM pb),
26            "Optimally break (pages and lines) the @code{Paper_book} object"
27            " @var{pb} to minimize badness in bother vertical and horizontal"
28            " spacing.")
29 {
30   Optimal_page_breaking b (unsmob_paper_book (pb));
31   return b.solve ();
32 }