]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/score-grav.hh
release: 0.1.11
[lilypond.git] / lily / include / score-grav.hh
1 /*
2   score-grav.hh -- declare Score_engraver
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
8
9
10 #ifndef SCORE_GRAV_HH
11 #define SCORE_GRAV_HH
12
13 #include "engraver-group.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   Line_of_score * scoreline_l_;
23   bool disallow_break_b_;
24   int breaks_i_;
25
26   Link_array<Score_elem> elem_p_arr_;
27     
28   Score_column* command_column_l_;
29   Score_column* musical_column_l_;
30     
31   void set_columns (Score_column*,Score_column*);
32   void typeset_all();
33     
34 public:
35   Paper_score * pscore_p_;
36   DECLARE_MY_RUNTIME_TYPEINFO;
37
38   Score_engraver();
39   virtual Music_output *get_output_p ();  
40 protected:   
41   virtual void prepare (Moment);
42   virtual void finish();
43   virtual void process();
44   virtual int depth_i() const { return Global_translator::depth_i ();}
45   virtual Translator* ancestor_l (int l) { return Global_translator::ancestor_l (l);}
46
47 protected:
48   /* Engraver_group_engraver interface */
49   virtual Staff_info get_staff_info() const;
50   virtual bool do_try_request (Request*);
51   virtual void do_creation_processing();
52   virtual void do_removal_processing();
53   virtual void announce_element (Score_elem_info);
54   virtual void do_announces();
55   virtual void typeset_element (Score_elem*elem_p);
56   virtual Paper_def * paper() const;
57   virtual void do_pre_move_processing();
58 };
59
60 #endif // SCORE_GRAV_HH