]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/grace-music.cc
Run `make grand-replace'.
[lilypond.git] / lily / grace-music.cc
index 27c88c6f7b66ab283946a1b23ca5ee1dad9f9c34..899dae7dcff1c55e582e93133db6da566845cc24 100644 (file)
@@ -1,48 +1,26 @@
-/*   
-  grace-music.cc --  implement Grace_music
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 1999--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-#include "grace-music.hh"
-#include "grace-iterator.hh"
+/*
+  grace-music.cc -- implement Grace_music
 
-void
-Grace_music::compress (Moment m) 
-{
-  Music_wrapper::compress (m); 
-}
-
-Moment
-Grace_music::length_mom () const
-{
-  Moment l = Music_wrapper::length_mom ();
-  Moment gl;
-  gl.grace_part_ = l.main_part_ + l.grace_part_ ;
-  return gl;
-}
+  source file of the GNU LilyPond music typesetter
 
+  (c) 1999--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
+*/
 
-Moment
-Grace_music::start_mom () const
-{
-  return - length_mom ();
-}
+#include "music.hh"
+#include "music-wrapper.hh"
 
-Grace_music::Grace_music ()
+class Grace_music
 {
-  set_mus_property ("iterator-ctor",
-                   Grace_iterator::constructor_cxx_function);
-}
+public:
+  DECLARE_SCHEME_CALLBACK (start_callback, (SCM));
+};
 
-Grace_music::Grace_music (SCM p)
-  : Music_wrapper (p)
+MAKE_SCHEME_CALLBACK (Grace_music, start_callback, 1);
+SCM
+Grace_music::start_callback (SCM m)
 {
-  set_mus_property ("iterator-ctor",
-                   Grace_iterator::constructor_cxx_function);
+  Moment *l = unsmob_moment (Music_wrapper::length_callback (m));
+  Moment gl;
+  gl.grace_part_ = -(l->main_part_ + l->grace_part_);
+  return gl.smobbed_copy ();
 }
-
-ADD_MUSIC (Grace_music);