]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/bar.cc
release: 1.1.25
[lilypond.git] / lily / bar.cc
index 05a855714861d389d68f24b6ad50eff4f3e5f31a..824e2316a1116f6f545408250a30eee448727ca3 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "bar.hh"
 #include "lookup.hh"
 #include "debug.hh"
 
-Bar::Bar()
+
+Bar::Bar ()
 {
   breakable_b_ = true;
   type_str_ = "|";
-  spanned_i_ = 0;
 }
 
-
-
-IMPLEMENT_IS_TYPE_B1(Bar,Item);
-
 void
-Bar::do_print() const
+Bar::do_print () const
 {
+#ifndef NPRINT
   DOUT << type_str_;
+#endif
 }
 
 Molecule*
-Bar::brew_molecule_p() const
+Bar::do_brew_molecule_p () const
 {    
-  Paper_def *p = paper();
-  Atom s = p->lookup_l()->bar (type_str_, 
-                                p->get_var ("bar_size"));
-  Molecule*output = new Molecule (Atom (s));
+  Paper_def *p = paper ();
+  Molecule *output = new Molecule (lookup_l ()->bar (type_str_, p->get_var ("barsize")));
+  
   return output;
 }
 
@@ -47,19 +44,22 @@ Bar::brew_molecule_p() const
 static char const *bar_breaks[][3] ={
   {":|", ":|:", "|:"},
   {"|", "|", ""},
+  {"", "|s", "|"},
   {"", "|:", "|:"},
-  {"||.", "||.", ""},
+  {"|.", "|.", ""},
   {":|", ":|", ""},
+  {"||", "||", ""},
+  {".|.", ".|.", ""},
   {0,0,0}
 };
 
 void
-Bar::do_pre_processing()
+Bar::do_pre_processing ()
 {
   for (int i=0; bar_breaks[i][0]; i++) 
     {
-       if (bar_breaks[i][1] == type_str_)
-           type_str_ = bar_breaks[i][break_status_i()+1];
+      if (bar_breaks[i][1] == type_str_)
+       type_str_ = bar_breaks[i][break_status_dir ()+1];
     }
   
   /*