2 break.hh -- part of LilyPond
4 (c) 1996,97 Han-Wen Nienhuys
11 typedef Array<PCol*> Line_of_cols;
13 struct Col_configuration {
20 void setsol(Array<Real>);
26 struct Break_algorithm {
32 Break_algorithm(PScore&);
33 /// check if the spacing/breaking problem is well-stated
34 void problem_OK()const;
35 /// search all pcols which are breakable.
36 Array<PCol *> find_breaks() const;
38 /// helper: solve for the columns in #curline#.
39 Array<Real> solve_line(Line_of_cols) const;
42 /// does curline fit on the paper?
43 bool feasible(Line_of_cols)const;
45 virtual Array<Col_configuration> solve()=0;
48 /// wordwrap type algorithm: move to next line if current is optimal.
49 struct Word_wrap : Break_algorithm {
50 virtual Array<Col_configuration> solve();