From 0e0fe9d1bc4c3a1379e41667b98a11cb9229d371 Mon Sep 17 00:00:00 2001 From: Joe Neeman Date: Tue, 8 Aug 2006 10:12:09 +0000 Subject: [PATCH] Oops, missed a file. --- ChangeLog | 2 ++ lily/include/constrained-breaking.hh | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2cdff9a358..e202e41a6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2006-08-08 Joe Neeman + * lily/include/constrained-breaking.hh: add Line_details (Prob*) + * scm/page.scm (make-page): make it friendlier to call (esp. from C++) * scm/layout-page-layout.scm (make-page-from-systems): new function diff --git a/lily/include/constrained-breaking.hh b/lily/include/constrained-breaking.hh index 59f0a26a9d..b0c1f7891d 100644 --- a/lily/include/constrained-breaking.hh +++ b/lily/include/constrained-breaking.hh @@ -13,6 +13,7 @@ #include "break-algorithm.hh" #include "lily-guile.hh" #include "matrix.hh" +#include "prob.hh" struct Line_details { Real force_; @@ -43,6 +44,21 @@ struct Line_details { page_penalty_ = 0; turn_penalty_ = 0; } + + Line_details (Prob *pb) + { + force_ = 0; + extent_ = unsmob_stencil (pb->get_property ("stencil")) ->extent (Y_AXIS); + padding_ = 0; + space_ = 1.0; + inverse_hooke_ = 1.0; + break_permission_ = ly_symbol2scm ("allow"); + page_permission_ = pb->get_property ("page-break-permission"); + turn_permission_ = pb->get_property ("page-turn-permission"); + break_penalty_ = 0; + page_penalty_ = robust_scm2double (pb->get_property ("page-break-penalty"), 0); + turn_penalty_ = robust_scm2double (pb->get_property ("page-turn-penalty"), 0); + } }; /* -- 2.39.2