2 engraver.hh -- declare Engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1996--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
12 #include "grob-info.hh"
13 #include "translator.hh"
16 a struct which processes events, and creates the #Grob#s.
17 It may use derived classes.
19 class Engraver : public Translator
22 friend class Engraver_group;
25 take note of item/spanner
26 put item in spanner. Adjust local key; etc.
28 Default: ignore the info
30 virtual void acknowledge_grob (Grob_info) {}
31 virtual void announce_grob (Grob_info);
32 virtual void announce_end_grob (Grob_info);
33 Engraver_group *get_daddy_engraver () const;
37 Announce element. Default: pass on to daddy. Utility
39 void announce_grob (Grob *, SCM cause);
40 void announce_end_grob (Grob *, SCM cause);
45 TRANSLATOR_DECLARATIONS (Engraver);
48 #define make_item(x, cause) make_item_from_properties (this, ly_symbol2scm (x), cause, x)
49 #define make_spanner(x, cause) make_spanner_from_properties (this, ly_symbol2scm (x), cause, x)
50 #define make_paper_column(x) make_paper_column_from_properties (this, ly_symbol2scm (x), x)
51 Grob *make_grob_from_properties (Engraver *tr, SCM symbol, SCM cause, char const *name);
52 Item *make_item_from_properties (Engraver *tg, SCM x, SCM cause, char const *name);
53 Spanner *make_spanner_from_properties (Engraver *tg, SCM x, SCM cause, char const *name);
54 Paper_column *make_paper_column_from_properties (Engraver *tg, SCM x, char const *name);