]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/paper-score.hh
release: 1.3.19
[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, 1997--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
19 /** all stuff which goes onto paper. notes, signs, symbols in a score
20      #Paper_score# contains the items, the columns.
21     
22     */
23
24 class Paper_score : public Music_output
25 {
26   SCM element_smob_list_;
27 public:
28   Paper_def *paper_l_;
29
30   /// the columns, ordered left to right
31   /*
32     UGH. MOVE INTO LINE_OF_SCORE ?!
33    */
34   Link_array<Paper_column> col_l_arr_;
35
36   Paper_outputter *outputter_l_;  
37   Line_of_score * line_l_;
38   
39   Paper_score ();
40
41   void fixup_refpoints ();
42
43
44   /// add to bottom of pcols
45   void add_column (Paper_column*);
46
47   /**
48     @return index of argument.
49     */
50   int find_col_idx (Paper_column const *) const;
51
52   Link_array<Item> broken_col_range (Item const*,Item const*) const;
53     
54     
55   /* STANDARD ROUTINES */
56   void print() const;
57   
58   void typeset_element (Score_element*);
59   void typeset_broken_spanner (Spanner*);
60   /// add a Spanner
61   void typeset_unbroken_spanner (Spanner*);
62   
63     
64   virtual ~Paper_score();
65 protected:
66     /* MAIN ROUTINES */
67   virtual void process();
68
69 private:
70   /// before calc_breaking
71   void preprocess();
72
73   void calc_idealspacing();
74   /// calculate where the lines are to be broken, and use results
75   Array<Column_x_positions> calc_breaking();
76
77   /// after calc_breaking
78   void postprocess();
79   Paper_score (Paper_score const &);
80 };
81
82 #endif