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 /** solve the spacing problem
34 virtual void solve (Col_hpositions *) const=0;
37 Approximate the spacing problem:
38 return a lower bound on the energy
40 virtual void lower_bound_solution (Col_hpositions *) const=0;
42 /** add a col to the problem. columns have to be added left to
43 right. The column contains info on it's minimum width. */
44 virtual void add_column (Paper_column *, bool fixed=false, Real fixpos=0.0)=0;
47 can the posed problem be solved?
54 virtual bool check_constraints (Vector v) const=0;
57 generate a solution which can't fail
59 virtual Vector default_solution() const=0;
62 virtual void OK() const{}
63 virtual void print() const{}
66 Call after construction before solving
68 virtual void prepare(){}