]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/paper-score.hh
release: 1.5.45
[lilypond.git] / lily / include / paper-score.hh
1 /*
2   paper-score.hh -- declare Paper_score
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1996--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9
10 #ifndef P_SCORE_HH
11 #define P_SCORE_HH
12
13 #include "column-x-positions.hh"
14 #include "parray.hh"
15 #include "lily-proto.hh"
16 #include "music-output.hh"
17 #include "lily-guile.hh"
18 #include "protected-scm.hh"
19
20 /** all stuff which goes onto paper. notes, signs, symbols in a score
21      #Paper_score# contains the items, the columns.
22     
23     */
24 class Paper_score : public Music_output
25 {
26   SCM main_smob_;
27 public:
28   Paper_def *paper_l_;
29
30   Paper_outputter *outputter_l_;  
31   System * line_l_;
32   
33   Paper_score ();
34
35   /**
36     @return index of argument.
37     */
38   int find_col_idx (Paper_column const *) const;
39
40   Link_array<Item> broken_col_range (Item const*,Item const*) const;
41   void typeset_line (System*);
42     
43 protected:
44     /* MAIN ROUTINES */
45   virtual void process ();
46
47 private:
48   /// before calc_breaking
49   void preprocess ();
50   void calc_idealspacing ();
51   /// calculate where the lines are to be broken, and use results
52   Array<Column_x_positions> calc_breaking ();
53
54   /// after calc_breaking
55   void postprocess ();
56   Paper_score (Paper_score const &);
57 };
58
59 #endif