Merge branch 'fret-diagram-details'
[lilypond/csorensen.git] / lily / grace-iterator.cc
blob237ebc81eeecb9b69b4cf697af1d8c224d6b63f1
1 /*
2 grace-music.cc -- implement Grace_music
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
9 #include "grace-iterator.hh"
10 #include "global-context.hh"
11 #include "warn.hh"
13 void
14 Grace_iterator::process (Moment m)
16 Moment main;
17 main.main_part_ = -start_mom_.grace_part_ + m.grace_part_;
18 Music_wrapper_iterator::process (main);
20 /* We can safely do this, since \grace should always be inside
21 sequential. */
22 descend_to_child (child_iter_->get_outlet ());
25 Moment
26 Grace_iterator::pending_moment () const
28 Moment cp = Music_wrapper_iterator::pending_moment ();
30 Moment pending;
31 pending.grace_part_ = start_mom_.grace_part_ + cp.main_part_;
33 return pending;
36 IMPLEMENT_CTOR_CALLBACK (Grace_iterator);