2 staff-collecting-engraver.cc -- implement Staff_collecting_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 2001--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #include "staff-symbol.hh"
11 #include "engraver.hh"
15 class Staff_collecting_engraver : public Engraver
18 TRANSLATOR_DECLARATIONS (Staff_collecting_engraver);
19 virtual void acknowledge_grob (Grob_info);
22 Staff_collecting_engraver::Staff_collecting_engraver ()
28 Staff_collecting_engraver::acknowledge_grob (Grob_info gi)
30 if (Staff_symbol::has_interface (gi.grob_))
32 SCM staffs = get_property ("stavesFound");
33 staffs = scm_cons (gi.grob_->self_scm (), staffs);
35 context ()->set_property ("stavesFound", staffs);
40 ADD_TRANSLATOR (Staff_collecting_engraver,
41 /* descr */ "Maintain the stavesFound variable",
45 /* acks */ "staff-symbol-interface",
46 /* reads */ "stavesFound",
47 /* write */ "stavesFound");