2 break.hh -- part of LilyPond
4 (c) 1996,97 Han-Wen Nienhuys
13 /** Class representation of an algorithm which decides where to put
14 the column, and where to break lines. */
15 struct Break_algorithm {
21 Break_algorithm(PScore&);
23 /// check if the spacing/breaking problem is well-stated
24 void problem_OK()const;
26 /// search all pcols which are breakable.
27 Line_of_cols find_breaks() const;
29 /// helper: solve for the columns in #curline#.
30 Col_hpositions solve_line(Line_of_cols) const;
32 /// does curline fit on the paper?
33 bool feasible(Line_of_cols)const;
35 virtual Array<Col_hpositions> solve()=0;
38 /// wordwrap type algorithm: move to next line if current is optimal.
39 struct Word_wrap : Break_algorithm {
40 virtual Array<Col_hpositions> solve();