]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/paper-column.hh
350ed4e63525904b642f4ac1ac64e9252e90ada2
[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--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
8
9 #ifndef PAPER_COLUMN_HH
10 #define PAPER_COLUMN_HH
11
12 #include "item.hh"
13 #include "rod.hh"
14
15 class Paper_column : public Item
16 {
17   int rank_;
18   /// if lines are broken then this column is in #line#
19   System *system_;
20
21   // ugh: friend declarations.
22   friend void set_loose_columns (System *which, Column_x_positions const *posns);
23   friend class System;
24 public:
25   Paper_column (SCM);
26   Paper_column (Paper_column const &);
27
28   virtual Grob *clone () const;
29   virtual void do_break_processing ();
30   virtual Paper_column *get_column () const;
31   virtual System *get_system () const;
32   void set_system (System *);
33
34   static int compare (Grob * const &a,
35                       Grob * const &b);
36   static bool less_than (Grob *const &a,
37                          Grob *const &b);
38
39   int get_rank () const { return rank_; }
40   void set_rank (int);
41
42   DECLARE_SCHEME_CALLBACK (print, (SCM));
43   DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM));
44
45   DECLARE_GROB_INTERFACE();
46   static int get_rank (Grob const *);
47   static bool is_musical (Grob *);
48   static Moment when_mom (Grob *);
49   static bool is_used (Grob *);
50   static bool is_breakable (Grob *);
51   static Real minimum_distance (Grob *l, Grob *r);
52   static Interval break_align_width (Grob *me);
53 };
54
55 #endif // PAPER_COLUMN_HH
56