Docs: Add new procedure for barNumberVisibility
[lilypond/mpolesky.git] / lily / event-chord-iterator.cc
blobc678da031e71905b46056da957bafb3afb97f465
1 /*
2 event-chord-iterator.cc -- implement Event_chord_iterator
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
9 #include "event-chord-iterator.hh"
11 #include "context.hh"
12 #include "dispatcher.hh"
13 #include "duration.hh"
14 #include "input.hh"
15 #include "international.hh"
16 #include "music.hh"
17 #include "warn.hh"
19 Event_chord_iterator::Event_chord_iterator ()
23 void
24 Event_chord_iterator::construct_children ()
26 Simple_music_iterator::construct_children ();
27 descend_to_bottom_context ();
30 void
31 Event_chord_iterator::process (Moment m)
33 if (last_processed_mom_ < Moment (0))
35 for (SCM s = get_music ()->get_property ("elements");
36 scm_is_pair (s); s = scm_cdr (s))
38 Music *mus = unsmob_music (scm_car (s));
39 report_event (mus);
41 for (SCM s = get_music ()->get_property ("events");
42 scm_is_pair (s); s = scm_cdr (s))
44 Stream_event *ev = unsmob_stream_event (scm_car (s));
45 get_outlet ()->event_source ()->broadcast (ev);
48 Simple_music_iterator::process (m);
51 IMPLEMENT_CTOR_CALLBACK (Event_chord_iterator);