2 engraver.hh -- declare Engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1996--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
13 #include "lily-proto.hh"
16 #include "grob-info.hh"
17 #include "translator.hh"
21 a struct which processes events, and creates the #Grob#s.
22 It may use derived classes.
24 class Engraver : public virtual Translator {
26 friend class Engraver_group_engraver;
29 Call this when you're finished with ELEM_P.
31 virtual void typeset_grob (Grob*elem);
33 take note of item/spanner
34 put item in spanner. Adjust local key; etc.
36 Default: ignore the info
38 virtual void acknowledge_grob (Grob_info) {}
40 /** Do things with stuff found in acknowledge_grob. Ugh. Should
41 be looped with acknowledge_grob.
44 virtual void process_acknowledged_grobs () {}
46 Announce element. Default: pass on to daddy. Utility
48 virtual void announce_grob (Grob*, SCM cause);
49 virtual void announce_grob (Grob_info);
50 virtual void process_music ();
52 Score_engraver * top_engraver () const;
54 Item * internal_make_item (SCM);
55 Spanner * internal_make_spanner (SCM);
58 Engraver_group_engraver * get_daddy_grav () const;
62 TRANSLATOR_DECLARATIONS(Engraver);
65 #define make_item(x) internal_make_item (ly_symbol2scm (x))
66 #define make_spanner(x) internal_make_spanner (ly_symbol2scm (x))