]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/engraver.hh
release: 1.3.109
[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--2000 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   /// utility
29   //   Paper_def * paper_l() const;
30
31   /*
32     Call this last thing.
33    */
34   virtual void typeset_grob (Grob*elem_p);
35   /*
36     take note of item/spanner
37     put item in spanner. Adjust local key; etc.
38
39     Default: ignore the info
40     */
41   virtual void acknowledge_grob (Grob_info) {}
42
43   /** Do things with stuff found in acknowledge_grob. Ugh. Should
44      be looped with acknowledge_grob.
45      
46    */
47   virtual void create_grobs () {}
48   /**
49     Announce element. Default: pass on to daddy. Utility
50     */
51   virtual void announce_grob (Grob*, Music*);
52   virtual void announce_grob (Grob_info);
53   virtual void process_music ();
54 public:
55   VIRTUAL_COPY_CONS(Translator);
56   Engraver_group_engraver * daddy_grav_l() const;
57   /**
58     override other ctor
59    */
60   Engraver () {}
61 };
62
63
64 #endif // ENGRAVER_HH
65