From c30cd0c51aea05186fd429b713f85622feb6efe7 Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 26 Mar 2002 22:46:55 +0000 Subject: [PATCH] lilypond-1.3.33 --- lily/audio-item.cc | 2 +- lily/axis-group-engraver.cc | 4 ++-- lily/crescendo.cc | 2 +- lily/include/spanner.hh | 7 ++++--- lily/line-group-group-engraver.cc | 4 ++-- lily/line-of-score.cc | 4 ++-- lily/score-engraver.cc | 19 ++++++++++++++----- lily/separating-line-group-engraver.cc | 4 ++-- lily/spacing-engraver.cc | 4 ++-- lily/staff-symbol-engraver.cc | 4 ++-- lily/staff-symbol.cc | 6 +++--- lily/vertical-align-engraver.cc | 4 ++-- 12 files changed, 37 insertions(+), 27 deletions(-) diff --git a/lily/audio-item.cc b/lily/audio-item.cc index 410222f0e5..60b15abb5c 100644 --- a/lily/audio-item.cc +++ b/lily/audio-item.cc @@ -78,7 +78,7 @@ Audio_tie::set_note (Direction d, Audio_note* note_l) { assert (!note_l_drul_[d]); note_l_drul_[d] = note_l; - //set_bounds (d, head_l); + //set_bound (d, head_l); // add_dependency (head_l); } diff --git a/lily/axis-group-engraver.cc b/lily/axis-group-engraver.cc index 9ae9db6438..e4182d8f5a 100644 --- a/lily/axis-group-engraver.cc +++ b/lily/axis-group-engraver.cc @@ -20,7 +20,7 @@ Axis_group_engraver::do_creation_processing () { staffline_p_ = get_spanner_p (); staffline_p_->set_axes (Y_AXIS, Y_AXIS); - staffline_p_->set_bounds(LEFT,get_staff_info().command_pcol_l ()); + staffline_p_->set_bound(LEFT,get_staff_info().command_pcol_l ()); announce_element (Score_element_info (staffline_p_, 0)); } @@ -32,7 +32,7 @@ Axis_group_engraver::get_spanner_p () const void Axis_group_engraver::do_removal_processing () { - staffline_p_->set_bounds(RIGHT,get_staff_info().command_pcol_l ()); + staffline_p_->set_bound(RIGHT,get_staff_info().command_pcol_l ()); typeset_element (staffline_p_); staffline_p_ = 0; } diff --git a/lily/crescendo.cc b/lily/crescendo.cc index 36bdcbdbec..ffe11eaefb 100644 --- a/lily/crescendo.cc +++ b/lily/crescendo.cc @@ -72,7 +72,7 @@ Crescendo::do_brew_molecule () const Direction d = LEFT; do { - Paper_column* s = dynamic_cast(spanned_drul_[d]); // UGH + Paper_column* s = dynamic_cast(get_bound (d)); // UGH broken[d] = (!s->musical_b ()); } while (flip (&d) != LEFT); diff --git a/lily/include/spanner.hh b/lily/include/spanner.hh index 7736ed8610..130604b863 100644 --- a/lily/include/spanner.hh +++ b/lily/include/spanner.hh @@ -35,11 +35,12 @@ class Axis_group_spanner; */ class Spanner : public virtual Score_element { -public: Drul_array spanned_drul_; - Link_array broken_into_l_arr_; - void set_bounds (Direction d, Item*); +public: + Link_array broken_into_l_arr_; + void set_bound (Direction d, Item*); + Item *get_bound (Direction d) const; Spanner (); Spanner (Spanner const &); diff --git a/lily/line-group-group-engraver.cc b/lily/line-group-group-engraver.cc index f30e40959f..a0f8d10dbc 100644 --- a/lily/line-group-group-engraver.cc +++ b/lily/line-group-group-engraver.cc @@ -34,7 +34,7 @@ Line_group_engraver_group::do_removal_processing() { Engraver_group_engraver::do_removal_processing (); - staffline_p_->set_bounds(RIGHT,get_staff_info().command_pcol_l ()); + staffline_p_->set_bound(RIGHT,get_staff_info().command_pcol_l ()); Engraver_group_engraver::typeset_element (staffline_p_); staffline_p_ = 0; } @@ -43,7 +43,7 @@ void Line_group_engraver_group::do_creation_processing() { create_line_spanner (); - staffline_p_->set_bounds(LEFT,get_staff_info().command_pcol_l ()); + staffline_p_->set_bound(LEFT,get_staff_info().command_pcol_l ()); Engraver::announce_element (Score_element_info (staffline_p_,0)); } diff --git a/lily/line-of-score.cc b/lily/line-of-score.cc index 69d7f36339..cde8965e03 100644 --- a/lily/line-of-score.cc +++ b/lily/line-of-score.cc @@ -48,8 +48,8 @@ Line_of_score::break_into_pieces (Array const &breaking) line_l->rank_i_ = i; Link_array c (breaking[i].cols_); pscore_l_->typeset_element (line_l); - line_l->set_bounds(LEFT,c[0]); - line_l->set_bounds(RIGHT,c.top ()); + line_l->set_bound(LEFT,c[0]); + line_l->set_bound(RIGHT,c.top ()); for (int j=0; j < c.size(); j++) { c[j]->translate_axis (breaking[i].config_[j],X_AXIS); diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc index ed74043951..09c7ffd47f 100644 --- a/lily/score-engraver.cc +++ b/lily/score-engraver.cc @@ -53,7 +53,7 @@ Score_engraver::do_creation_processing () { scoreline_l_ = pscore_p_->line_l_; - scoreline_l_->set_bounds(LEFT, command_column_l_); + scoreline_l_->set_bound(LEFT, command_column_l_); command_column_l_->set_elt_property ("breakable", SCM_BOOL_T); @@ -65,10 +65,15 @@ void Score_engraver::do_removal_processing() { Engraver_group_engraver::do_removal_processing(); - scoreline_l_->set_bounds(RIGHT,command_column_l_); + scoreline_l_->set_bound(RIGHT,command_column_l_); command_column_l_->set_elt_property ("breakable", SCM_BOOL_T); + typeset_all (); + + + if (musical_column_l_->linked_b ()) + programming_error ("Last column in score should be non-musical"); set_columns (0,0); } @@ -128,9 +133,9 @@ Score_engraver::typeset_all() */ Direction d = LEFT; do { - if (!s->spanned_drul_[d]) + if (!s->get_bound (d)) { - s->set_bounds(d, command_column_l_); + s->set_bound(d, command_column_l_); ::warning (_f ("unbound spanner `%s'", classname(s))); } } while (flip(&d) != LEFT); @@ -189,7 +194,11 @@ Score_engraver::set_columns (Paper_column *new_command_l, We're forgetting about this column. Dump it, and make SCM forget it. - (UGH.) */ + FIXME: we should have another way of not putting this + column into the spacing problem. Maybe we shouldn't + even prevent this. + + */ scm_unprotect_object ((*current[i])->self_scm_); *current[i] =0; } diff --git a/lily/separating-line-group-engraver.cc b/lily/separating-line-group-engraver.cc index 9cd56f58b6..7d99122fd5 100644 --- a/lily/separating-line-group-engraver.cc +++ b/lily/separating-line-group-engraver.cc @@ -25,13 +25,13 @@ Separating_line_group_engraver::do_creation_processing () { sep_span_p_ = new Separating_group_spanner; announce_element (Score_element_info (sep_span_p_, 0)); - sep_span_p_->set_bounds (LEFT, get_staff_info ().command_pcol_l ()); + sep_span_p_->set_bound (LEFT, get_staff_info ().command_pcol_l ()); } void Separating_line_group_engraver::do_removal_processing () { - sep_span_p_->set_bounds (RIGHT, get_staff_info ().command_pcol_l ()); + sep_span_p_->set_bound (RIGHT, get_staff_info ().command_pcol_l ()); typeset_element (sep_span_p_); sep_span_p_ =0; } diff --git a/lily/spacing-engraver.cc b/lily/spacing-engraver.cc index 7f3ac132fc..5caefdf72e 100644 --- a/lily/spacing-engraver.cc +++ b/lily/spacing-engraver.cc @@ -35,7 +35,7 @@ void Spacing_engraver::do_creation_processing () { spacing_p_ =new Spacing_spanner; - spacing_p_->set_bounds (LEFT, get_staff_info ().command_pcol_l ()); + spacing_p_->set_bound (LEFT, get_staff_info ().command_pcol_l ()); announce_element (Score_element_info (spacing_p_, 0)); } @@ -44,7 +44,7 @@ Spacing_engraver::do_removal_processing () { Paper_column * p = get_staff_info ().command_pcol_l (); - spacing_p_->set_bounds (RIGHT, p); + spacing_p_->set_bound (RIGHT, p); typeset_element (spacing_p_); spacing_p_ =0; } diff --git a/lily/staff-symbol-engraver.cc b/lily/staff-symbol-engraver.cc index a84f393a52..4bed0bf752 100644 --- a/lily/staff-symbol-engraver.cc +++ b/lily/staff-symbol-engraver.cc @@ -47,7 +47,7 @@ void Staff_symbol_engraver::do_creation_processing() { span_p_ = new Staff_symbol; - span_p_->set_bounds(LEFT,get_staff_info().command_pcol_l ()); + span_p_->set_bound(LEFT,get_staff_info().command_pcol_l ()); announce_element (Score_element_info (span_p_, 0)); } @@ -62,7 +62,7 @@ Staff_symbol_engraver::do_removal_processing() if (gh_number_p (n)) span_p_->set_elt_property ("line-count", n); - span_p_->set_bounds(RIGHT,get_staff_info().command_pcol_l ()); + span_p_->set_bound(RIGHT,get_staff_info().command_pcol_l ()); typeset_element (span_p_); span_p_ =0; } diff --git a/lily/staff-symbol.cc b/lily/staff-symbol.cc index 21123e75d9..4419d8dc12 100644 --- a/lily/staff-symbol.cc +++ b/lily/staff-symbol.cc @@ -19,12 +19,12 @@ Molecule Staff_symbol::do_brew_molecule() const { Score_element * common - = spanned_drul_[LEFT]->common_refpoint (spanned_drul_[RIGHT], X_AXIS); + = get_bound (LEFT)->common_refpoint (get_bound (RIGHT), X_AXIS); Real width = // right_shift - left_shift - + spanned_drul_[RIGHT]->relative_coordinate (common , X_AXIS) - - spanned_drul_[LEFT]->relative_coordinate (common, X_AXIS) + + get_bound (RIGHT)->relative_coordinate (common , X_AXIS) + - get_bound (LEFT)->relative_coordinate (common, X_AXIS) ; Real t = paper_l ()->get_var ("stafflinethickness"); diff --git a/lily/vertical-align-engraver.cc b/lily/vertical-align-engraver.cc index 464e7e3df2..001d79f494 100644 --- a/lily/vertical-align-engraver.cc +++ b/lily/vertical-align-engraver.cc @@ -25,7 +25,7 @@ Vertical_align_engraver::do_creation_processing() valign_p_->set_axis (Y_AXIS); valign_p_->set_elt_property ("stacking-dir", gh_int2scm (DOWN)); - valign_p_->set_bounds(LEFT,get_staff_info().command_pcol_l ()); + valign_p_->set_bound(LEFT,get_staff_info().command_pcol_l ()); announce_element (Score_element_info (valign_p_ , 0)); } @@ -44,7 +44,7 @@ Vertical_align_engraver::do_removal_processing() valign_p_->threshold_interval_[SMALLER] = gh_scm2double (dist); } - valign_p_->set_bounds(RIGHT,get_staff_info().command_pcol_l ()); + valign_p_->set_bound(RIGHT,get_staff_info().command_pcol_l ()); typeset_element (valign_p_); valign_p_ =0; } -- 2.39.5