source file of the GNU LilyPond music typesetter
- (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1999--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
#define SIMPLE_SPACER_HH
#include "parray.hh"
-#include "line-spacer.hh"
+#include "lily-proto.hh"
struct Spring_description
Real length (Real force) const;
Spring_description ();
- Real energy_f (Real) const;
+
+ bool sane_b () const;
};
/**
Perhaps this is not a bad thing, because the 1st looks better anyway. */
-struct Simple_spacer: public Line_spacer
+struct Simple_spacer
{
Array<Spring_description> springs_;
+ Link_array<Grob> spaced_cols_;
+ Link_array<Grob> loose_cols_;
Real force_f_;
+ Real indent_f_;
+ Real line_len_f_;
+ Real default_space_f_;
+ int active_count_;
Simple_spacer ();
- virtual void solve (Column_x_positions *) const;
- virtual void lower_bound_solution (Column_x_positions *) const;
- virtual void add_columns (Link_array<Paper_column>);
-
+ void solve (Column_x_positions *) const;
+ void add_columns (Link_array<Grob>);
void my_solve_linelen ();
void my_solve_natural_len ();
Real active_springs_stiffness () const;
Real active_blocking_force ()const;
Real configuration_length ()const;
void set_active_states ();
- Real energy_f () const;
-
bool active_b () const;
};