2 break.hh -- part of LilyPond
4 (c) 1996,97 Han-Wen Nienhuys
13 struct Break_algorithm
{
19 Break_algorithm(PScore
&);
21 /// check if the spacing/breaking problem is well-stated
22 void problem_OK()const;
24 /// search all pcols which are breakable.
25 Line_of_cols
find_breaks() const;
27 /// helper: solve for the columns in #curline#.
28 Col_hpositions
solve_line(Line_of_cols
) const;
30 /// does curline fit on the paper?
31 bool feasible(Line_of_cols
)const;
33 virtual Array
<Col_hpositions
> solve()=0;
36 /// wordwrap type algorithm: move to next line if current is optimal.
37 struct Word_wrap
: Break_algorithm
{
38 virtual Array
<Col_hpositions
> solve();