]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/engraver.hh
release: 1.5.13
[lilypond.git] / lily / include / engraver.hh
1 /*
2   engraver.hh -- declare Engraver
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1996--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9
10 #ifndef ENGRAVER_HH
11 #define ENGRAVER_HH
12
13 #include "lily-proto.hh"
14 #include "array.hh"
15 #include "request.hh"
16 #include "grob-info.hh"
17 #include "translator.hh"
18
19
20 /**
21   a struct which processes requests, and creates the #Grob#s.
22   It may use derived classes. 
23   */
24 class Engraver : public virtual Translator {
25     
26   friend class Engraver_group_engraver;
27 protected:
28   /*
29     Call this when you're finished with ELEM_P.
30    */
31   virtual void typeset_grob (Grob*elem_p);
32   /*
33     take note of item/spanner
34     put item in spanner. Adjust local key; etc.
35
36     Default: ignore the info
37     */
38   virtual void acknowledge_grob (Grob_info) {}
39
40   /** Do things with stuff found in acknowledge_grob. Ugh. Should
41      be looped with acknowledge_grob.
42      
43    */
44   virtual void create_grobs () {}
45   /**
46     Announce element. Default: pass on to daddy. Utility
47     */
48   virtual void announce_grob (Grob*, Music*);
49   virtual void announce_grob (Grob_info);
50   virtual void process_music ();
51 public:
52   Engraver_group_engraver * daddy_grav_l () const;
53   /**
54     override other ctor
55    */
56   TRANSLATOR_DECLARATIONS(Engraver);
57 };
58
59
60 #endif // ENGRAVER_HH
61