]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/timing-engraver.cc
release: 1.3.46
[lilypond.git] / lily / timing-engraver.cc
index 3fa208f15d6269026d7a76f5408a104a6f4fcbe1..aa5a4e697344efd3879e1e9c4643a98daae61e1f 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 "score-engraver.hh"
 #include "score-element-info.hh"
 #include "multi-measure-rest.hh"
 
-void
-Timing_engraver::fill_staff_info (Staff_info &inf)
-{
-  inf.time_C_ = &time_;
-}
-
-
 ADD_THIS_TRANSLATOR(Timing_engraver);
 
-
 void
 Timing_engraver::do_post_move_processing( )
 {
   bar_req_l_ = 0;
   Timing_translator::do_post_move_processing ();
+  
 }
 
 bool
@@ -44,7 +37,27 @@ Timing_engraver::do_try_music (Music*m)
   return Timing_translator::do_try_music (m);
 }
 
+#if 0
+String
+Timing_engraver::do_process_music ()
+{
+  if (gh_string_p (get_property  ("barType")))
+    ;
+  else if (!now_mom ())
+    {
+      daddy_trans_l_->set_property ("barType", ly_str02scm ("|"));
+    }
+  else
+
+  {
+  }
+}
+#endif
+
 
+/*
+  TODO make properties of this.
+ */
 String
 Timing_engraver::which_bar ()
 {
@@ -53,12 +66,16 @@ Timing_engraver::which_bar ()
       if (!now_mom ())
        return "|";
 
-      Scalar nonauto = get_property ("barNonAuto", 0);
-      if (!nonauto.to_bool ())
+      SCM nonauto = get_property ("barNonAuto");
+      if (!to_boolean (nonauto))
        {
-         Scalar always = get_property ("barAlways", 0);
-         if (!time_.whole_in_measure_ || always.to_bool ())
-           return get_property ("defaultBarType" ,0);
+         SCM always = get_property ("barAlways");
+         if (!measure_position ()
+             || (to_boolean (always)))
+           {
+             SCM def=get_property ("defaultBarType" );
+             return (gh_string_p (def))? ly_scm2string (def) : "";
+           }
        }
       return "";
     }