]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/paper-score.hh
* lily/paper-outputter.cc (output_expr):
[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--2004 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   Protected_scm main_smob_;
27 public:
28   Paper_def *paper_;
29
30   /* Vector with lines of stencils.  */
31   Protected_scm lines_;
32   Stencil *book_title_;
33   Stencil *score_title_;
34
35   Paper_outputter *outputter_;  
36   System *system_;
37
38   Paper_score ();
39
40   /**
41     @return index of argument.
42     */
43   int find_col_idx (Paper_column const *) const;
44
45   Link_array<Item> broken_col_range (Item const*,Item const*) const;
46   void typeset_line (System*);
47   void output ();
48
49 protected:
50     /* MAIN ROUTINES */
51   virtual void process (String);
52 private:
53   /// before calc_breaking
54   void preprocess ();
55   void calc_idealspacing ();
56   /// calculate where the lines are to be broken, and use results
57   Array<Column_x_positions> calc_breaking ();
58
59   /// after calc_breaking
60   void postprocess ();
61   Paper_score (Paper_score const &);
62 };
63
64 #endif