X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fsequential-iterator.cc;h=8679bcbbe158843dbdaeffa00b84cf1d6699429b;hb=2885f759ba07d814656c040ed3b3f6f9c81f1b2e;hp=cf88a52d1dd1248b1e2d90b75da654b850f1a4a4;hpb=58bcc84c9480dae1b21bc24d8396b91fe19e0131;p=lilypond.git diff --git a/lily/sequential-iterator.cc b/lily/sequential-iterator.cc index cf88a52d1d..8679bcbbe1 100644 --- a/lily/sequential-iterator.cc +++ b/lily/sequential-iterator.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--2005 Han-Wen Nienhuys + (c) 1997--2007 Han-Wen Nienhuys */ #include "sequential-iterator.hh" @@ -42,7 +42,12 @@ Sequential_iterator::Sequential_iterator () SCM Sequential_iterator::get_music_list () const { - return SCM_EOL; + Music *m = get_music (); + SCM proc = m->get_property ("elements-callback"); + if (scm_procedure_p (proc)) + return scm_call_1 (proc, m->self_scm ()); + else + return SCM_EOL; } void @@ -52,7 +57,6 @@ Sequential_iterator::do_quit () iter_->quit (); } - void Sequential_iterator::derived_mark () const { @@ -124,9 +128,7 @@ Sequential_iterator::construct_children () } while (iter_ && !iter_->ok ()) - { - next_element (true); - } + next_element (true); last_mom_ = Moment (-1); here_mom_ = get_music ()->start_mom (); @@ -174,7 +176,7 @@ Sequential_iterator::next_element (bool) in that chunk should be in len.grace_part_ */ - last_mom_ = here_mom_;; + last_mom_ = here_mom_; here_mom_ += len; } @@ -233,9 +235,7 @@ Sequential_iterator::pending_moment () const Grace_fixup *gf = get_grace_fixup (); if (gf && gf->length_ + iter_->music_start_mom () == cp) - { - return here_mom_ + gf->length_ + Moment (0, gf->grace_start_); - } + return here_mom_ + gf->length_ + Moment (0, gf->grace_start_); /* Fix-up a grace note at the start of the music. @@ -249,12 +249,6 @@ Sequential_iterator::ok () const return iter_; } -Music_iterator * -Sequential_iterator::try_music_in_children (Music *m) const -{ - return iter_ ? iter_->try_music (m) : 0; -} - IMPLEMENT_CTOR_CALLBACK (Sequential_iterator); bool