]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/paper-column.hh
01a84d50dfd9a7085dfb7bbb1d13059e208ba507
[lilypond.git] / lily / include / paper-column.hh
1 /*
2   This file is part of LilyPond, the GNU music typesetter.
3
4   Copyright (C) 1997--2012 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 public:
33   Paper_column (SCM);
34   Paper_column (Paper_column const &);
35
36   virtual Grob *clone () const;
37   virtual void do_break_processing ();
38   virtual Paper_column *get_column () const;
39   virtual System *get_system () const;
40   void set_system (System *);
41
42   static int compare (Grob *const &a,
43                       Grob *const &b);
44   static bool less_than (Grob *const &a,
45                          Grob *const &b);
46
47   int get_rank () const { return rank_; }
48   void set_rank (int);
49
50   DECLARE_SCHEME_CALLBACK (print, (SCM));
51   DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM));
52
53   DECLARE_GROB_INTERFACE ();
54   static int get_rank (Grob const *);
55   static bool is_musical (Grob *);
56   static Moment when_mom (Grob *);
57   static bool is_used (Grob *);
58   static bool is_breakable (Grob *);
59   static bool is_extraneous_column_from_ligature (Grob *);
60   static Real minimum_distance (Grob *l, Grob *r);
61   static Interval break_align_width (Grob *me, SCM align_sym);
62 };
63
64 #endif // PAPER_COLUMN_HH