]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/paper-column.hh
Update source file headers. Fixes using standard GNU package conventions.
[lilypond.git] / lily / include / paper-column.hh
1 /*
2   This file is part of LilyPond, the GNU music typesetter.
3
4   Copyright (C) 1997--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
5
6   LilyPond is free software: you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation, either version 3 of the License, or
9   (at your option) any later version.
10
11   LilyPond is distributed in the hope that it will be useful,
12   but WITHOUT ANY WARRANTY; without even the implied warranty of
13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   GNU General Public License for more details.
15
16   You should have received a copy of the GNU General Public License
17   along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef PAPER_COLUMN_HH
21 #define PAPER_COLUMN_HH
22
23 #include "item.hh"
24 #include "rod.hh"
25
26 class Paper_column : public Item
27 {
28   int rank_;
29   /// if lines are broken then this column is in #line#
30   System *system_;
31
32   // ugh: friend declarations.
33   friend void set_loose_columns (System *which, Column_x_positions const *posns);
34   friend class System;
35 public:
36   Paper_column (SCM);
37   Paper_column (Paper_column const &);
38
39   virtual Grob *clone () const;
40   virtual void do_break_processing ();
41   virtual Paper_column *get_column () const;
42   virtual System *get_system () const;
43   void set_system (System *);
44
45   static int compare (Grob * const &a,
46                       Grob * const &b);
47   static bool less_than (Grob *const &a,
48                          Grob *const &b);
49
50   int get_rank () const { return rank_; }
51   void set_rank (int);
52
53   DECLARE_SCHEME_CALLBACK (print, (SCM));
54   DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM));
55
56   DECLARE_GROB_INTERFACE();
57   static int get_rank (Grob const *);
58   static bool is_musical (Grob *);
59   static Moment when_mom (Grob *);
60   static bool is_used (Grob *);
61   static bool is_breakable (Grob *);
62   static bool is_extraneous_column_from_ligature (Grob *);
63   static Real minimum_distance (Grob *l, Grob *r);
64   static Interval break_align_width (Grob *me);
65 };
66
67 #endif // PAPER_COLUMN_HH
68