]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/bar.cc
release: 1.3.94
[lilypond.git] / lily / bar.cc
index 5419f3fa4b37f22d27390d30ff29c8f54b8847b6..11bcc3830259c46a5b3537d607e16dd34d775f06 100644 (file)
@@ -20,7 +20,7 @@
 #include "item.hh"
 #include "staff-symbol-referencer.hh"
 
-MAKE_SCHEME_CALLBACK(Bar,brew_molecule);
+MAKE_SCHEME_CALLBACK(Bar,brew_molecule,1);
 
 SCM 
 Bar::brew_molecule (SCM smob) 
@@ -68,10 +68,6 @@ Bar::compound_barline (Score_element*me, String str, Real h)
     {
       return me->lookup_l ()->blank (Box (Interval(0, 0), Interval (-h/2, h/2)));
     }
-  if (str == "scorepostbreak")
-    {
-      return simple_barline (me, me->paper_l ()->get_var ("barthick_score"), h);
-    }
   else if (str == "|")
     {
       return thin;
@@ -126,7 +122,7 @@ Bar::simple_barline (Score_element*me,Real w, Real h)
   return me->lookup_l ()->filledbox (Box (Interval(0,w), Interval(-h/2, h/2)));
 }
 
-MAKE_SCHEME_CALLBACK(Bar,before_line_breaking );
+MAKE_SCHEME_CALLBACK(Bar,before_line_breaking ,1);
 
 SCM
 Bar::before_line_breaking  (SCM smob)
@@ -137,28 +133,17 @@ Bar::before_line_breaking  (SCM smob)
   SCM g = me->get_elt_property ("glyph");
   SCM orig = g;
   Direction bsd = item->break_status_dir ();
-  if (gh_string_p (g))
+  if (gh_string_p (g) && bsd)
     {
-      if (bsd)
-       {
-         SCM breakdir = gh_int2scm (bsd);
-         g = scm_eval2 (gh_list (ly_symbol2scm ("break-barline"),
-                                g,
-                                breakdir,
-                                SCM_UNDEFINED),
-                        SCM_EOL);
-       }
-    }
-  else
-    {
-      g = SCM_EOL;
+      SCM proc = me->get_elt_property ("break-glyph-function");
+      g = gh_call2 (proc, g, gh_int2scm (bsd));
     }
+
   
   if (!gh_string_p (g))
     {
       me->set_elt_property ("molecule-callback", SCM_BOOL_T);
-      me->set_extent_callback (0, X_AXIS);
-
+      me->set_extent_callback (SCM_EOL, X_AXIS);
       // leave y_extent for spanbar? 
     }
 
@@ -183,7 +168,7 @@ Bar::has_interface (Score_element*m)
 }
 
 
-MAKE_SCHEME_CALLBACK(Bar,get_staff_bar_size);
+MAKE_SCHEME_CALLBACK(Bar,get_staff_bar_size,1);
 SCM
 Bar::get_staff_bar_size (SCM smob) 
 {