]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/engraver.hh
release: 1.3.66
[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 "score-element-info.hh"
17 #include "translator.hh"
18
19
20 /**
21   a struct which processes requests, and creates the #Score_element#s.
22   It may use derived classes. 
23   */
24 class Engraver : public virtual Translator {
25     
26   friend class Engraver_group_engraver;
27
28 protected:
29     
30
31   /// utility
32   Paper_def * paper_l() const;
33   /**
34     Invoke walker method to typeset element. Default: pass on to daddy.
35     */
36   virtual void typeset_element (Score_element*elem_p);
37
38     
39   /**
40     take note of item/spanner
41     put item in spanner. Adjust local key; etc.
42
43     Default: ignore the info
44     */
45   virtual void acknowledge_element (Score_element_info) {}
46
47   /** Do things with stuff found in acknowledge_element. Ugh. Should
48      be looped with acknowledge_element.
49      
50    */
51   virtual void process_acknowledged () {}
52   /**
53     Announce element. Default: pass on to daddy. Utility
54     */
55   virtual void announce_element (Score_element_info);
56 public:
57   VIRTUAL_COPY_CONS(Translator);
58   Engraver_group_engraver * daddy_grav_l() const;
59   /**
60     override other ctor
61    */
62   Engraver () {}
63
64   
65 };
66
67
68 #endif // ENGRAVER_HH
69