X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fgrace-music.cc;h=3ed2d14aafd1768d414df1dbc564cbc799a886a3;hb=9091c04d20d3db4932ce023719973146ccc9d6ea;hp=3cf9414727ead46dbcc00c6d3b1c88622413035f;hpb=051d7e7cbdbbe5f5337ab2b477b0bd1e72eedd04;p=lilypond.git diff --git a/lily/grace-music.cc b/lily/grace-music.cc index 3cf9414727..3ed2d14aaf 100644 --- a/lily/grace-music.cc +++ b/lily/grace-music.cc @@ -1,43 +1,28 @@ -/* - grace-music.cc -- implement Grace_music - - source file of the GNU LilyPond music typesetter - - (c) 1999--2002 Han-Wen Nienhuys - - */ +/* + grace-music.cc -- implement Grace_music -#include "grace-music.hh" -#include "grace-iterator.hh" + source file of the GNU LilyPond music typesetter -void -Grace_music::compress (Moment m) -{ - Music_wrapper::compress (m); -} + (c) 1999--2005 Han-Wen Nienhuys +*/ -Moment -Grace_music::get_length () const -{ - Moment m ; - return m; -} +#include "music.hh" +#include "music-wrapper.hh" +#include "moment.hh" -Moment -Grace_music::start_mom () const +class Grace_music { - Moment l = Music_wrapper::get_length (); - Moment gl; - gl.grace_part_ = -(l.main_part_ + l.grace_part_ ); - return gl; -} +public: + DECLARE_SCHEME_CALLBACK (start_callback, (SCM)); +}; -Grace_music::Grace_music () +MAKE_SCHEME_CALLBACK (Grace_music, start_callback, 1); +SCM +Grace_music::start_callback (SCM m) { - set_mus_property ("iterator-ctor", - Grace_iterator::constructor_proc); + 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);