Use ly:staff-symbol-staff-space.
[lilypond/mpolesky.git] / lily / music-wrapper-iterator.cc
blob304497a4893589da0cfb528f8ab3338f81d70ced
1 /*
2 music-wrapper-iterator.cc -- implement Music_wrapper_iterator
4 source file of the GNU LilyPond music typesetter
6 (c) 1998--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
9 #include "music-wrapper-iterator.hh"
10 #include "music-wrapper.hh"
11 #include "music.hh"
13 Music_wrapper_iterator::Music_wrapper_iterator ()
15 child_iter_ = 0;
18 void
19 Music_wrapper_iterator::do_quit ()
21 if (child_iter_)
22 child_iter_->quit ();
25 void
26 Music_wrapper_iterator::derived_mark () const
28 if (child_iter_)
29 scm_gc_mark (child_iter_->self_scm ());
32 void
33 Music_wrapper_iterator::derived_substitute (Context *f, Context *t)
35 if (child_iter_)
36 child_iter_->substitute_outlet (f, t);
39 void
40 Music_wrapper_iterator::construct_children ()
42 Music *my_music = get_music ();
43 Music *child = unsmob_music (my_music->get_property ("element"));
44 child_iter_ = (child)
45 ? unsmob_iterator (get_iterator (child))
46 : 0;
49 bool
50 Music_wrapper_iterator::ok () const
52 return child_iter_ && child_iter_->ok ();
55 void
56 Music_wrapper_iterator::process (Moment m)
58 if (child_iter_)
59 child_iter_->process (m);
62 Moment
63 Music_wrapper_iterator::pending_moment () const
65 if (child_iter_)
66 return child_iter_->pending_moment ();
67 else
68 return Music_iterator::pending_moment ();
71 IMPLEMENT_CTOR_CALLBACK (Music_wrapper_iterator);
73 bool
74 Music_wrapper_iterator::run_always () const
76 return (child_iter_ && child_iter_->run_always ());