X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fpage-spacing.hh;h=92fba0210a238972787dec8a1af5deb467e0b0ea;hb=9e781b7dc83b60a543ce218aa1a5f139f74c760f;hp=f57060a647cde67ec15f6eb39e2cfceb16d210d8;hpb=e1a149d0cc60b02e86209387958f4028567dd366;p=lilypond.git diff --git a/lily/include/page-spacing.hh b/lily/include/page-spacing.hh index f57060a647..92fba0210a 100644 --- a/lily/include/page-spacing.hh +++ b/lily/include/page-spacing.hh @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2006--2010 Joe Neeman + Copyright (C) 2006--2014 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 @@ -43,7 +43,6 @@ const Real BAD_SPACING_PENALTY = 1e6; const Real TERRIBLE_SPACING_PENALTY = 1e8; - /* for page_count > 2, we use a dynamic algorithm similar to constrained-breaking -- we have a class that stores the intermediate calculations so they can be reused for querying different page counts. @@ -51,7 +50,7 @@ const Real TERRIBLE_SPACING_PENALTY = 1e8; class Page_spacer { public: - Page_spacer (vector const &lines, vsize first_page_num, Page_breaking const*); + Page_spacer (vector const &lines, vsize first_page_num, Page_breaking const *); Page_spacing_result solve (vsize page_count); Page_spacing_result solve (); @@ -102,6 +101,7 @@ struct Page_spacing Real rod_height_; Real spring_len_; Real inverse_spring_k_; + bool has_footnotes_; Line_details last_line_; Line_details first_line_; @@ -111,11 +111,13 @@ struct Page_spacing { page_height_ = page_height; breaker_ = breaker; + has_footnotes_ = false; clear (); } void calc_force (); void resize (Real new_height); + Real account_for_footnotes (Line_details const &line); void append_system (const Line_details &line); void prepend_system (const Line_details &line); void clear ();