]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/paper-column.hh
release: 1.1.58
[lilypond.git] / lily / include / paper-column.hh
1 /*
2   paper-column.hh -- declare  Paper_column
3
4   source file of the GNU LilyPond music typesetter
5
6   (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9
10 #ifndef P_COL_HH
11 #define P_COL_HH
12
13 #include "axis-group-item.hh"
14 #include "rod.hh"
15 #include "spring.hh"
16
17 /**
18    stuff grouped vertically.
19     This is a class to address items vertically. It contains the data for:
20     \begin{itemize}
21     \item
22     unbroken score
23     \item
24     broken score
25     \item
26     the linespacing problem
27     \end{itemize}
28   */
29
30 class Paper_column : public Axis_group_item { 
31 public:
32   VIRTUAL_COPY_CONS(Score_element);
33   Drul_array<Array<Column_rod> > minimal_dists_arr_drul_;
34   Drul_array<Array<Column_spring> > spring_arr_drul_;
35   void preprocess ();
36   /// set a minimum distance
37   void add_rod (Paper_column * to, Real distance);
38   void add_spring (Paper_column * to, Real dist, Real strength);
39
40   virtual Paper_column * column_l () const;
41   /// if lines are broken then this column is in #line#
42   Line_of_score *line_l_;
43
44   virtual Line_of_score *line_l () const;
45
46   /// which  one (left =0)
47   int rank_i() const;
48
49   bool breakpoint_b() const;
50   void add_item (Item *i);
51
52   Paper_column();
53
54   void set_rank (int);
55
56   void OK() const;
57   virtual void do_print() const;
58 private:
59     
60   /**
61     The ranking: left is smaller than right 
62     -1 is uninitialised.
63     */
64   int rank_i_;
65
66 };
67
68
69 // #include "compare.hh"
70 // INSTANTIATE_COMPARE(Paper_column &, Paper_column::compare);
71      
72 #endif // P_COL_HH
73