]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/paper-score.hh
release: 1.3.44
[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--2000 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
25 class Paper_score : public Music_output
26 {
27   SCM element_smob_list_;
28 public:
29   Paper_def *paper_l_;
30
31   Paper_outputter *outputter_l_;  
32   Line_of_score * line_l_;
33   
34   Paper_score ();
35
36   /**
37     @return index of argument.
38     */
39   int find_col_idx (Paper_column const *) const;
40
41   Link_array<Item> broken_col_range (Item const*,Item const*) const;
42     
43     
44   void typeset_line (Line_of_score*);
45     
46 protected:
47     /* MAIN ROUTINES */
48   virtual void process();
49
50 private:
51   /// before calc_breaking
52   void preprocess();
53   void calc_idealspacing();
54   /// calculate where the lines are to be broken, and use results
55   Array<Column_x_positions> calc_breaking();
56
57   /// after calc_breaking
58   void postprocess();
59   Paper_score (Paper_score const &);
60 };
61
62 #endif