]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/break-algorithm.hh
* flower
[lilypond.git] / lily / include / break-algorithm.hh
1 /*
2   break-algorithm.hh -- declare  Break_algorithm
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1996--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9 #ifndef BREAK_HH
10 #define BREAK_HH
11
12 #include "interval.hh"
13 #include "column-x-positions.hh"
14
15 /** Class representation of an algorithm which decides where to put
16     the column, and where to break lines.
17
18     JUNKME.
19 */
20 class Break_algorithm
21 {
22 protected:
23   Paper_score *pscore_;
24   Real linewidth_;
25
26   Link_array<Grob> find_breaks () const;
27   Array<int> find_break_indices () const;
28   void solve_line (Column_x_positions *) const;
29   bool feasible (Link_array<Grob> const &) const;
30
31   Simple_spacer_wrapper *generate_spacing_problem (Link_array<Grob> const &, Interval) const;
32
33   virtual Array<Column_x_positions> do_solve () const = 0;
34
35 public:
36   Simple_spacer *(*get_line_spacer) ();
37   Break_algorithm ();
38   void set_pscore (Paper_score *);
39   Array<Column_x_positions> solve () const;
40 };
41
42 #endif // BREAK_HH
43