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>
9 #include "staff-symbol.hh"
10 #include "engraver.hh"
14 class Staff_collecting_engraver
: public Engraver
17 TRANSLATOR_DECLARATIONS (Staff_collecting_engraver
);
18 virtual void acknowledge_grob (Grob_info
);
21 Staff_collecting_engraver::Staff_collecting_engraver ()
26 Staff_collecting_engraver::acknowledge_grob (Grob_info gi
)
28 if (Staff_symbol::has_interface (gi
.grob ()))
30 SCM staffs
= get_property ("stavesFound");
31 staffs
= scm_cons (gi
.grob ()->self_scm (), staffs
);
33 context ()->set_property ("stavesFound", staffs
);
37 ADD_TRANSLATOR (Staff_collecting_engraver
,
38 /* descr */ "Maintain the stavesFound variable",
42 /* acks */ "staff-symbol-interface",
43 /* reads */ "stavesFound",
44 /* write */ "stavesFound");