]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/grace-music.cc
new file.
[lilypond.git] / lily / grace-music.cc
index 9e88f7b835cb21d35933b7e8c969f618c2643b90..382efcf8bcb14ce824ffd47f4d2af79d5976dbe6 100644 (file)
@@ -1,48 +1,27 @@
 /*   
-  grace-music.cc --  implement Grace_music
+     grace-music.cc -- implement Grace_music
   
-  source file of the GNU LilyPond music typesetter
+     source file of the GNU LilyPond music typesetter
   
-  (c) 1999--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+     (c) 1999--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
- */
+*/
 
-#include "grace-music.hh"
-#include "grace-iterator.hh"
+#include "music.hh"
+#include "music-wrapper.hh"
 
-void
-Grace_music::compress (Moment m) 
+class Grace_music
 {
-  Music_wrapper::compress (m); 
-}
+public:
+  DECLARE_SCHEME_CALLBACK(start_callback, (SCM));
+};
 
-Moment
-Grace_music::length_mom () const
+MAKE_SCHEME_CALLBACK(Grace_music, start_callback, 1);
+SCM
+Grace_music::start_callback (SCM m) 
 {
-  Moment l = Music_wrapper::length_mom ();
+  Moment *l = unsmob_moment (Music_wrapper::length_callback (m));
   Moment gl;
-  gl.grace_mom_ = l.main_part_ + l.grace_mom_ ;
-  return gl;
-}
-
-
-Moment
-Grace_music::start_mom () const
-{
-  return Music::start_mom ();
-}
-
-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 ("iterator-ctor",
-                   Grace_iterator::constructor_cxx_function);
+  gl.grace_part_ = -(l->main_part_ + l->grace_part_ );
+  return gl.smobbed_copy ();
 }
-
-ADD_MUSIC (Grace_music);