-/*
- grace-music.cc -- implement Grace_music
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1999--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
+/*
+ grace-music.cc -- implement Grace_music
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
-#include "grace-music.hh"
-#include "grace-iterator.hh"
+#include "music.hh"
+#include "music-wrapper.hh"
-Moment
-Grace_music::start_mom () const
+class Grace_music
{
- Moment *l = unsmob_moment (Music_wrapper::length_callback (self_scm ()));
- Moment gl;
- gl.grace_part_ = -(l->main_part_ + l->grace_part_ );
- return gl;
-}
+public:
+ DECLARE_SCHEME_CALLBACK (start_callback, (SCM));
+};
-Grace_music::Grace_music (SCM x)
- : Music_wrapper (x)
+MAKE_SCHEME_CALLBACK (Grace_music, start_callback, 1);
+SCM
+Grace_music::start_callback (SCM m)
{
+ 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);