2 line-spacer.hh -- declare Line_spacer
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
10 #ifndef LINE_SPACER_HH
11 #define LINE_SPACER_HH
12 #include "lily-proto.hh"
15 #include "interval.hh"
18 abstract interface to Line spacing.
21 add estimate of "force" or energy.
29 Paper_def *paper_l()const;
32 virtual Array<PCol*> error_pcol_l_arr() const=0;
34 /** solve the spacing problem
36 @return the column positions, and the energy (last element)
39 virtual Array<Real> solve() const=0;
41 /** add a col to the problem. columns have to be added left to
42 right. The column contains info on it's minimum width. */
43 virtual void add_column(PCol *, bool fixed=false, Real fixpos=0.0)=0;
46 can the posed problem be solved?
53 virtual bool check_constraints(Vector v) const=0;
56 generate a solution which can't fail
58 virtual Vector default_solution() const=0;
60 virtual void OK() const{}
61 virtual void print() const{}
64 Call after construction before solving
66 virtual void prepare(){}