X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fgrace-music.cc;h=3ed2d14aafd1768d414df1dbc564cbc799a886a3;hb=3032301cc8609347d997cd4367aa7ab055196e80;hp=9e88f7b835cb21d35933b7e8c969f618c2643b90;hpb=5b6181075e3615dce049711973d3cd5caa60e5db;p=lilypond.git diff --git a/lily/grace-music.cc b/lily/grace-music.cc index 9e88f7b835..3ed2d14aaf 100644 --- a/lily/grace-music.cc +++ b/lily/grace-music.cc @@ -1,48 +1,28 @@ -/* - grace-music.cc -- implement Grace_music - - source file of the GNU LilyPond music typesetter - - (c) 1999--2001 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::length_mom () const -{ - Moment l = Music_wrapper::length_mom (); - Moment gl; - gl.grace_mom_ = l.main_part_ + l.grace_mom_ ; - return gl; -} +#include "music.hh" +#include "music-wrapper.hh" +#include "moment.hh" -Moment -Grace_music::start_mom () const +class Grace_music { - return Music::start_mom (); -} - -Grace_music::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);