2 tweak-engraver.cc -- implement Tweak_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 2005--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
10 #include "engraver.hh"
13 #include "stream-event.hh"
14 #include "translator.icc"
16 class Tweak_engraver : public Engraver
18 TRANSLATOR_DECLARATIONS (Tweak_engraver);
21 DECLARE_ACKNOWLEDGER (grob);
24 Tweak_engraver::Tweak_engraver ()
29 Tweak_engraver::acknowledge_grob (Grob_info info)
31 if (Stream_event *ev = info.event_cause ())
33 for (SCM s = ev->get_property ("tweaks");
34 scm_is_pair (s); s = scm_cdr (s))
36 info.grob ()->set_property (scm_caar (s), scm_cdar (s));
41 ADD_ACKNOWLEDGER (Tweak_engraver, grob);
42 ADD_TRANSLATOR (Tweak_engraver,
44 "Read the @code{tweaks} property from the originating event,"
45 " and set properties.",