]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/score-engraver.hh
2003 -> 2004
[lilypond.git] / lily / include / score-engraver.hh
1 /*
2   score-engraver.hh -- declare Score_engraver
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9
10 #ifndef SCORE_ENGRAVER_HH
11 #define SCORE_ENGRAVER_HH
12
13 #include "engraver-group-engraver.hh"
14 #include "global-translator.hh"
15
16 /**
17   Top level engraver. Puts elements into appropriate columns.
18  */
19 class Score_engraver : 
20   public Engraver_group_engraver, public Global_translator 
21 {
22   System *system_;
23   int breaks_;
24   
25   
26   Link_array<Grob> elems_;
27     
28   Paper_column* command_column_;
29   Paper_column* musical_column_;
30   void make_columns ();
31   void set_columns (Paper_column*,Paper_column*);
32   void typeset_all ();
33     
34 public:
35   TRANSLATOR_DECLARATIONS(Score_engraver);
36   Paper_score * pscore_;
37   
38   void forbid_breaks ();
39
40   virtual Music_output *get_output ();  
41 protected:   
42   virtual void prepare (Moment);
43   virtual void finish ();
44   virtual void one_time_step ();
45   virtual int get_depth () const { return Global_translator::get_depth ();}
46
47 protected:
48   /* Engraver_group_engraver interface */
49   virtual void acknowledge_grob (Grob_info);
50
51   virtual bool try_music (Music*);
52   virtual void initialize ();
53   virtual void finalize ();
54   virtual void announce_grob (Grob_info);
55   virtual void typeset_grob (Grob*elem);
56
57   virtual void stop_translation_timestep ();
58 };
59
60 #endif /* SCORE_ENGRAVER_HH */