]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/bar-engraver.cc
release: 1.3.82
[lilypond.git] / lily / bar-engraver.cc
index 45636011c048182d9a6a30caeb9e3c49f678c9be..bbb1af823809e0aef7203143358f96d9879621d2 100644 (file)
@@ -3,19 +3,20 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997, 1998, 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
+#include "bar.hh"
 #include "score-engraver.hh"
 #include "bar-engraver.hh"
-#include "staff-bar.hh"
 #include "musical-request.hh"
 #include "multi-measure-rest.hh"
 #include "command-request.hh"
 #include "timing-engraver.hh"
 #include "engraver-group-engraver.hh"
 #include "warn.hh"
+#include "item.hh"
 
 Bar_engraver::Bar_engraver()
 {
@@ -23,49 +24,33 @@ Bar_engraver::Bar_engraver()
   do_post_move_processing();
 }
 
-
-
-
 void
 Bar_engraver::create_bar ()
 {
   if (!bar_p_)
     {
-      bar_p_ = new Staff_bar;
-      bar_p_->set_elt_property ("break-aligned", SCM_BOOL_T);
-
-      // urg: "" != empty...
-      SCM default_type = get_property ("defaultBarType", 0);
+      bar_p_ = new Item (get_property ("basicBarProperties"));
+      
+      SCM default_type = get_property ("defaultBarType");
       if (gh_string_p (default_type))
        {
-         bar_p_->set_elt_property ("glyph", default_type); // gu.h
+         bar_p_->set_elt_property ("glyph", default_type); // ugh
        }
 
-#if 0
-      /*
-       urg.  Why did I implement this? And did I implement this so
-       clumsily?  */
-      SCM prop = get_property ("barAtLineStart", 0);
-      if (to_boolean (prop))
-       {
-         bar_p_->set_elt_property ("at-line-start", SCM_BOOL_T);
-       }
-#endif
-      announce_element (Score_element_info (bar_p_, 0));
+      announce_element (bar_p_, 0);
     }
 }
 
 /**
    Make a barline.  If there are both |: and :| requested, merge them
    to :|:.
-
 */
 void
 Bar_engraver::request_bar (String requested_type)
 {
   if (!now_mom ())
     {
-      SCM prop = get_property ("barAtLineStart", 0);
+      SCM prop = get_property ("barAtLineStart");
       if (!to_boolean (prop))
        return;
     }
@@ -103,9 +88,9 @@ Bar_engraver::do_removal_processing ()
 }
 
 void
-Bar_engraver::do_process_requests()
+Bar_engraver::do_process_music()
 {  
-  Translator * t = daddy_grav_l  ()->get_simple_translator ("Timing_engraver");
+  Translator * t = daddy_grav_l  ()->get_simple_translator ("Timing_engraver");        // UGH.!
 
   Timing_engraver * te = dynamic_cast<Timing_engraver*>(t);
   String which = (te) ? te->which_bar () : "";