]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/constrained-breaking.hh
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / lily / include / constrained-breaking.hh
index 91baa4421c94141974f8248d46d3fa6d92c6deb2..8f2a4de2effeea35c0e0fc030069d39d01e5cecf 100644 (file)
 #define CONSTRAINED_BREAKING_HH
 
 #include "break-algorithm.hh"
-
-enum Fordfor {
-  FORBID = -1,
-  DEFAULT = 0,
-  FORCE = 1
-};
+#include "lily-guile.hh"
 
 struct Line_details {
   Real force_;
-  Real extent_;   /* Y-exent of the system */
+  Real extent_;   /* Y-extent of the system */
   Real padding_;  /* compulsory space after this system (if we're not last on a page) */
   Real space_;    /* spring length (stretches over extent_ but not over padding_) */
   Real inverse_hooke_;
 
-  Fordfor line_break_;
-  Fordfor page_break_;
-  Fordfor page_turn_;
+  SCM break_permission_;
+  SCM page_permission_;
+  SCM turn_permission_;
   Real break_penalty_;
   Real page_penalty_;
   Real turn_penalty_;
 
-  Line_details::Line_details ()
+  Line_details ()
   {
     force_ = infinity_f;
     extent_ = 0;
     padding_ = 0;
     space_ = 0;
     inverse_hooke_ = 1;
-    line_break_ = DEFAULT;
-    page_break_ = DEFAULT;
-    page_turn_ = DEFAULT;
+    break_permission_ = ly_symbol2scm ("allow");
+    page_permission_ = ly_symbol2scm ("allow");
+    turn_permission_ = ly_symbol2scm ("allow");
     break_penalty_ = 0;
     page_penalty_ = 0;
     turn_penalty_ = 0;