]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/bar.cc
release: 0.1.11
[lilypond.git] / lily / bar.cc
index b4364e6cd5eb4bde634ce27a30be63bb2a0e941b..cbf84388695b42dd74c1f8ab4fc48b4e45a704d7 100644 (file)
 
 Bar::Bar()
 {
-    type_str_ = "|";
-    spanned_i_ = 0;
+  breakable_b_ = true;
+  type_str_ = "|";
+  spanned_i_ = 0;
 }
 
 
-IMPLEMENT_STATIC_NAME(Bar);
+
 IMPLEMENT_IS_TYPE_B1(Bar,Item);
 
 void
-Bar::do_print()const
+Bar::do_print() const
 {
-    mtor << type_str_;
+  DOUT << type_str_;
 }
 
 Molecule*
-Bar::brew_molecule_p()const
+Bar::brew_molecule_p() const
 {    
-    Paper_def *p = paper();
-    Symbol s = p->lookup_l()->bar( type_str_, 
-                                  p->get_var("bar_size") );
-    Molecule*output = new Molecule(Atom(s));
-    return output;
+  Paper_def *p = paper();
+  Symbol s = p->lookup_l()->bar (type_str_, 
+                                  p->get_var ("bar_size"));
+  Molecule*output = new Molecule (Atom (s));
+  return output;
 }
 
 /**
+  Prescriptions for splitting bars.
   TODO: parametrise this (input-settable)
  */
-char const *bar_breaks[][3] ={
-    {":|", ":|:", "|:"},
-    {"|", "|", ""},
-    {"", "|:", "|:"},
-    {"||.", "||.", ""},
-    {0,0,0}
+static char const *bar_breaks[][3] ={
+  {":|", ":|:", "|:"},
+  {"|", "|", ""},
+  {"", "|:", "|:"},
+  {"||.", "||.", ""},
+  {":|", ":|", ""},
+  {0,0,0}
 };
 
 void
 Bar::do_pre_processing()
 {
-    for (int i=0; bar_breaks[i][0]; i++) {
+  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];
     }
   
-    // span_score_bar needs dims.
-//    transparent_b_ = empty_b_ = (type_str_ == "");
-}
+  /*
+    span_score_bar needs dims, so don't do
+  
+    transparent_b_ = empty_b_ = (type_str_ == "");
     
+    */
+}
+