]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/grace-music.cc
* lily/beam.cc (shift_region_to_valid): fix stupido bug.
[lilypond.git] / lily / grace-music.cc
index a072d37a597ef650ab9777d63f2f96b825dcd7ff..3aea71c70682302bb863ae8d1916e38f7e22347d 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 1999--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1999--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
 #include "grace-iterator.hh"
 
 void
-Grace_music::compress (Moment)
+Grace_music::compress (Moment m) 
 {
-  
+  Music_wrapper::compress (m); 
 }
 
 Moment
 Grace_music::length_mom () const
 {
-  return 0;
+  Moment m ;
+  return m;
+}
+
+
+Moment
+Grace_music::start_mom () const
+{
+  Moment l = Music_wrapper::length_mom ();
+  Moment gl;
+  gl.grace_part_ = -(l.main_part_ + l.grace_part_ );
+  return gl;
 }
 
-Grace_music::Grace_music (Music *p)
+Grace_music::Grace_music ()
+{
+  set_mus_property ("iterator-ctor",
+                   Grace_iterator::constructor_cxx_function);
+}
+
+Grace_music::Grace_music (SCM p)
   : Music_wrapper (p)
 {
-  set_mus_property ("type",
+  set_mus_property ("iterator-ctor",
                    Grace_iterator::constructor_cxx_function);
 }
+
+ADD_MUSIC (Grace_music);