X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fconstrained-breaking.cc;h=233011587f5f2bb0e56cc599e00a66544b51b65e;hb=8cbb38db1591ab95a178643e7bf41db018aa22c0;hp=29c00e1b0334c1b6fd1946e125310f51cbcc93f6;hpb=0d864ca56704009bda2a872cefd7038ca1d94ada;p=lilypond.git diff --git a/lily/constrained-breaking.cc b/lily/constrained-breaking.cc index 29c00e1b03..233011587f 100644 --- a/lily/constrained-breaking.cc +++ b/lily/constrained-breaking.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2006--2010 Joe Neeman + Copyright (C) 2006--2011 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 @@ -126,7 +126,6 @@ Constrained_breaking::space_line (vsize i, vsize j) { bool ragged_right = to_boolean (pscore_->layout ()->c_variable ("ragged-right")); bool ragged_last = to_boolean (pscore_->layout ()->c_variable ("ragged-last")); - Column_x_positions col; vector line (all_.begin () + breaks_[i], all_.begin () + breaks_[j] + 1); @@ -519,6 +518,8 @@ Constrained_breaking::fill_line_details (Line_details *const out, vsize start, v out->title_space_ = system_markup_space_; out->inverse_hooke_ = out->full_height () + system_system_space_; + out->footnotes_ = sys->get_footnotes_in_range (start_rank, end_rank); + out->refpoint_extent_ = sys->pure_refpoint_extent (start_rank, end_rank); if (out->refpoint_extent_.is_empty ()) out->refpoint_extent_ = Interval (0, 0); @@ -550,6 +551,12 @@ Line_details::Line_details (Prob *pb, Output_def *paper) Page_layout_problem::read_spacing_spec (spec, &min_distance_, ly_symbol2scm ("minimum-distance")); Page_layout_problem::read_spacing_spec (title_spec, &title_min_distance_, ly_symbol2scm ("minimum-distance")); + SCM footnotes = pb->get_property ("footnotes"); + + if (scm_is_pair (footnotes)) + for (SCM s = footnotes; scm_is_pair (s); s = scm_cdr (s)) + footnotes_.push_back (unsmob_stencil (scm_cadar (s))); + last_column_ = 0; force_ = 0; Interval stencil_extent = unsmob_stencil (pb->get_property ("stencil"))->extent (Y_AXIS); @@ -589,6 +596,18 @@ Line_details::tallness () const return tallness_; } +Real +Line_details::spring_length (Line_details const &next_line) const +{ + // space_ measures the spring which goes from the bottom refpoint + // of this to the top refpoint of next_line. We want to return + // the stretchable space between the bottom of this's extent to + // the top of next_line's extent. + Real refpoint_dist = tallness_ + refpoint_extent_[DOWN] - next_line.refpoint_extent_[UP]; + Real space = next_line.title_ ? title_space_ : space_; + return max (0.0, space - refpoint_dist); +} + Line_shape::Line_shape (Interval begin, Interval rest) { begin_ = begin;