]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/page-breaking-scheme.cc
unsmob_pitch -> Pitch::unsmob and related
[lilypond.git] / lily / page-breaking-scheme.cc
index 93ac8954de32c277c4bc7747fa11844463144005..79619e7d92db4cfd66667ce2e83c157a0abcb331 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2006--2011 Joe Neeman <joeneeman@gmail.com>
+  Copyright (C) 2006--2014 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
@@ -19,6 +19,7 @@
 
 #include "paper-book.hh"
 #include "page-turn-page-breaking.hh"
+#include "one-line-page-breaking.hh"
 #include "optimal-page-breaking.hh"
 #include "minimal-page-breaking.hh"
 
@@ -28,7 +29,7 @@ LY_DEFINE (ly_page_turn_breaking, "ly:page-turn-breaking",
            " @var{pb} such that page turns only happen in specified places,"
            " returning its pages.")
 {
-  Page_turn_page_breaking b (unsmob_paper_book (pb));
+  Page_turn_page_breaking b (Paper_book::unsmob (pb));
   return b.solve ();
 }
 
@@ -38,7 +39,7 @@ LY_DEFINE (ly_optimal_breaking, "ly:optimal-breaking",
            " @var{pb} to minimize badness in bother vertical and horizontal"
            " spacing.")
 {
-  Optimal_page_breaking b (unsmob_paper_book (pb));
+  Optimal_page_breaking b (Paper_book::unsmob (pb));
   return b.solve ();
 }
 
@@ -48,6 +49,16 @@ LY_DEFINE (ly_minimal_breaking, "ly:minimal-breaking",
            " 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));
+  Minimal_page_breaking b (Paper_book::unsmob (pb));
+  return b.solve ();
+}
+
+LY_DEFINE (ly_one_line_breaking, "ly:one-line-breaking",
+           1, 0, 0, (SCM pb),
+           "Put each score on a single line, and put each line on its own"
+           " page.  The paper-width setting will be modified so that"
+           " every page will be wider than the widest line.")
+{
+  One_line_page_breaking b (Paper_book::unsmob (pb));
   return b.solve ();
 }