]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/paper-column.hh
patch::: 1.3.54.hwn2
[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--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9
10 #ifndef P_COL_HH
11 #define P_COL_HH
12
13 #include "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 Item
31
32 public:
33   VIRTUAL_COPY_CONS(Score_element);
34
35   /*
36     ugh.
37
38     TODO:
39     
40     * junk these after spacing is done.
41
42     * Put these in Scheme.
43    */
44   
45   Array<Column_rod>  minimal_dists_;
46   Array<Column_spring > springs_;
47
48   /// set a minimum distance
49   void add_rod (Paper_column * to, Real distance);
50   void add_spring (Paper_column * to, Real dist, Real strength);
51
52   virtual Paper_column * column_l () const;
53   virtual Line_of_score *line_l () const;
54
55   /// if lines are broken then this column is in #line#
56   Line_of_score *line_l_;
57
58   /// which  one (left =0)
59   int rank_i() const;
60
61   Paper_column (Moment when);
62   Moment when_mom ()const;
63
64   bool musical_b () const;
65   bool used_b () const;
66   void set_rank (int);
67 private:
68     
69   /**
70     The ranking: left is smaller than right 
71     -1 is uninitialised.
72     */
73   int rank_i_;
74
75 };
76      
77 #endif // P_COL_HH
78