source file of the GNU LilyPond music typesetter
- (c) 1996, 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1996--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
-#include "score-column.hh"
+#include "paper-column.hh"
#include "break-algorithm.hh"
#include "paper-def.hh"
#include "debug.hh"
#include "cpu-timer.hh"
#include "command-request.hh"
#include "simple-spacer.hh"
-
-
-
+#include "group-interface.hh"
Array<int>
Break_algorithm::find_break_indices () const
{
- Line_of_cols all (pscore_l_->col_l_arr_);
+ Link_array<Grob> all = pscore_l_->line_l_->column_l_arr ();
Array<int> retval;
for (int i=0; i < all.size (); i++)
- if (all[i]->breakable_b ())
+ if (Item::breakable_b (all[i]))
retval.push (i);
if (linewidth_f_ <=0)
}
-Line_of_cols
+Link_array<Grob>
Break_algorithm::find_breaks () const
{
- Line_of_cols all (pscore_l_->col_l_arr_);
- Line_of_cols retval;
+ Link_array<Grob> all = pscore_l_->line_l_->column_l_arr ();
+ Link_array<Grob> retval;
for (int i=0; i < all.size (); i++)
- if (all[i]->breakable_b ())
+ if (Item::breakable_b (all[i]))
retval.push (all[i]);
if (linewidth_f_ <=0)
Simple_spacer*
-Break_algorithm::generate_spacing_problem (Line_of_cols curline, Interval line) const
+Break_algorithm::generate_spacing_problem (Link_array<Grob> curline, Interval line) const
{
Simple_spacer * sp = new Simple_spacer;
- Paper_def * d = pscore_l_->paper_l_;
- sp->compression_energy_factor_f_ = d->get_var ("compression_energy_factor");
- sp->default_space_f_ = d->get_var ("loose_column_distance");
+
+ /*
+ this is hardcoded, but this shouldn't happen anyway.
+ used to be g et_var ("loose_column_distance");
+ */
+ sp->default_space_f_ = 1.0;
+
sp->indent_f_ = line[LEFT];
{
pscore_l_ = s;
linewidth_f_ = s->paper_l_->get_var("linewidth");
- do_set_pscore ();
-}
-
-
-
-void
-Break_algorithm::problem_OK () const
-{
- if (pscore_l_->col_l_arr_.empty ())
- error (_("Score does not have any columns"));
- OK ();
-}
-
-void
-Break_algorithm::OK () const
-{
}
Array<Column_x_positions>
return h;
}
-void
-Break_algorithm::do_set_pscore ()
-{
-
-}