]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/base-span-bar-engraver.cc
release: 1.3.30
[lilypond.git] / lily / base-span-bar-engraver.cc
index 53800c6681fa6eca7c049ad4708354dc26723530..d233d514ca08008f7f69d7b5d44986abb9c8be8e 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "dimension-cache.hh"
@@ -16,7 +16,6 @@ Base_span_bar_engraver::Base_span_bar_engraver()
 {
   spanbar_p_ =0;
   use_priority_b_ = true;
-  break_priority_i_ = 0;
 }
 
 Span_bar*
@@ -29,7 +28,7 @@ Base_span_bar_engraver::get_span_bar_p() const
 void
 Base_span_bar_engraver::acknowledge_element (Score_element_info i)
 {
-  int depth = i.origin_trans_l_arr_.size();
+  int depth = i.origin_trans_l_arr (this).size();
   if (depth > 1
       && dynamic_cast<Bar *> (i.elem_l_)) 
     {
@@ -45,22 +44,26 @@ Base_span_bar_engraver::acknowledge_element (Score_element_info i)
 
        /*
 
-         use a property?  get_property ("singleStaffBracket", 0) ?
+         use a property?  get_property ("singleStaffBracket"); ?
 
          --hwn
         */
        {
          spanbar_p_ = get_span_bar_p();
          spanbar_p_->set_parent (bar_l_arr_[0], Y_AXIS);
-         String visnam =  String(name()) + "_visibility";
+
+         /*
+           UGH. UGH UUHGK GUHG G
+           (ly_eval_str ??)
+          */
+         String visnam =  String(name()) + "-visibility";
          
          spanbar_p_->set_elt_property ("visibility-lambda",
-                                       ly_ch_C_eval_scm (visnam.ch_C()));
+                                       ly_eval_str (visnam.ch_C()));
 
          if (use_priority_b_)
            {
-             spanbar_p_->set_elt_property ("break-priority",
-                                           gh_int2scm (break_priority_i_));
+             spanbar_p_->set_elt_property ("break-aligned", SCM_BOOL_T);
            }
          else
            {
@@ -68,8 +71,9 @@ Base_span_bar_engraver::acknowledge_element (Score_element_info i)
            }
          
          announce_element (Score_element_info (spanbar_p_,0));
-         if (spanbar_p_->type_str_.empty_b ())
-           spanbar_p_-> type_str_ = bar_l_arr_[0]->type_str_;
+         if (!gh_string_p (spanbar_p_->get_elt_property ("glyph")))
+           spanbar_p_-> set_elt_property ("glyph",
+                                          bar_l_arr_[0]->get_elt_property ("glyph"));
        }
     }
 }