From b089181dbecac2540ac88da485b4f3e4963aee6d Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 26 Mar 2002 23:23:50 +0000 Subject: [PATCH] lilypond-1.3.65 --- lily/axis-group-engraver.cc | 4 ++-- lily/engraver-group-engraver.cc | 7 +----- lily/engraver.cc | 19 --------------- lily/extender-engraver.cc | 2 +- lily/grace-position-engraver.cc | 2 +- lily/hyphen-engraver.cc | 2 +- lily/include/engraver-group-engraver.hh | 1 - lily/include/engraver.hh | 7 ------ lily/include/score-engraver.hh | 2 +- lily/include/staff-info.hh | 28 ---------------------- lily/line-group-group-engraver.cc | 6 +++-- lily/score-engraver.cc | 14 ++++------- lily/separating-line-group-engraver.cc | 4 ++-- lily/spacing-engraver.cc | 7 +++--- lily/spanner.cc | 19 +++++++-------- lily/staff-info.cc | 32 ------------------------- lily/staff-symbol-engraver.cc | 4 ++-- lily/system-start-delimiter-engraver.cc | 4 ++-- lily/vertical-align-engraver.cc | 4 ++-- 19 files changed, 34 insertions(+), 134 deletions(-) diff --git a/lily/axis-group-engraver.cc b/lily/axis-group-engraver.cc index 25b16bba20..f5266ecdd4 100644 --- a/lily/axis-group-engraver.cc +++ b/lily/axis-group-engraver.cc @@ -25,7 +25,7 @@ Axis_group_engraver::do_creation_processing () Axis_group_interface (staffline_p_).set_interface (); Axis_group_interface (staffline_p_).set_axes (Y_AXIS, Y_AXIS); - Item * it = get_staff_info().command_pcol_l (); + Score_element * it = unsmob_element (get_property ("currentCommandColumn")); Pointer_group_interface (it, "bounded-by-me").add_element (staffline_p_); staffline_p_->set_bound(LEFT,it); @@ -61,7 +61,7 @@ Axis_group_engraver::do_removal_processing () && gh_number_p (gh_cdr (dims))) staffline_p_->set_elt_property ("extra-extent-Y", dims); - Item * it = get_staff_info().command_pcol_l (); +Score_element * it = unsmob_element (get_property ("currentCommandColumn")); Pointer_group_interface (it, "bounded-by-me").add_element (staffline_p_); staffline_p_->set_bound(RIGHT,it); diff --git a/lily/engraver-group-engraver.cc b/lily/engraver-group-engraver.cc index f33939c62a..a3e71087cd 100644 --- a/lily/engraver-group-engraver.cc +++ b/lily/engraver-group-engraver.cc @@ -68,12 +68,7 @@ Engraver_group_engraver::do_announces() } -Staff_info -Engraver_group_engraver::get_staff_info() const -{ - Staff_info inf = Engraver::get_staff_info(); - return inf; -} + diff --git a/lily/engraver.cc b/lily/engraver.cc index 8ae01f77b6..49e8dd8259 100644 --- a/lily/engraver.cc +++ b/lily/engraver.cc @@ -15,11 +15,6 @@ #include "score-element.hh" #include "group-interface.hh" -void -Engraver::fill_staff_info (Staff_info&) -{ - -} void Engraver::announce_element (Score_element_info i) @@ -47,20 +42,6 @@ Engraver::paper_l () const return dynamic_cast(output_def_l_); } - -Staff_info -Engraver::get_staff_info() const -{ - if (daddy_grav_l()) - return daddy_grav_l()->get_staff_info(); - Staff_info info; - return info; -} - - - - - Engraver_group_engraver* Engraver::daddy_grav_l () const { diff --git a/lily/extender-engraver.cc b/lily/extender-engraver.cc index 8fc391ea0e..6e9f20a872 100644 --- a/lily/extender-engraver.cc +++ b/lily/extender-engraver.cc @@ -96,7 +96,7 @@ Extender_engraver::do_removal_processing () if (extender_p_) { req_l_->warning (_ ("unterminated extender")); - extender_p_->set_bound(RIGHT, get_staff_info ().command_pcol_l ()); + extender_p_->set_bound(RIGHT, unsmob_element (get_property ("currentCommandColumn"))); } } diff --git a/lily/grace-position-engraver.cc b/lily/grace-position-engraver.cc index 170d7b0350..bbfa5392de 100644 --- a/lily/grace-position-engraver.cc +++ b/lily/grace-position-engraver.cc @@ -96,7 +96,7 @@ Grace_position_engraver::do_pre_move_processing () Axis_group_interface (last_musical_col_l_).add_element (align_l_); } - last_musical_col_l_ = get_staff_info ().musical_pcol_l (); + last_musical_col_l_ = dynamic_cast( unsmob_element (get_property ("currentMusicalColumn"))); } void diff --git a/lily/hyphen-engraver.cc b/lily/hyphen-engraver.cc index 62341082df..204995b4b0 100644 --- a/lily/hyphen-engraver.cc +++ b/lily/hyphen-engraver.cc @@ -89,7 +89,7 @@ Hyphen_engraver::do_removal_processing () if (hyphen_p_) { req_l_->warning (_ ("unterminated hyphen")); - hyphen_p_->set_bound(RIGHT, get_staff_info ().command_pcol_l ()); + hyphen_p_->set_bound(RIGHT, unsmob_element (get_property ("currentCommandColumn"))); } } diff --git a/lily/include/engraver-group-engraver.hh b/lily/include/engraver-group-engraver.hh index f531ca4508..dffbfd18ef 100644 --- a/lily/include/engraver-group-engraver.hh +++ b/lily/include/engraver-group-engraver.hh @@ -30,7 +30,6 @@ protected: public: VIRTUAL_COPY_CONS(Translator); - virtual Staff_info get_staff_info() const; virtual void do_announces(); virtual void announce_element (Score_element_info); }; diff --git a/lily/include/engraver.hh b/lily/include/engraver.hh index 04a73eaf1b..2fb91ecbfb 100644 --- a/lily/include/engraver.hh +++ b/lily/include/engraver.hh @@ -55,13 +55,6 @@ protected: Announce element. Default: pass on to daddy. Utility */ virtual void announce_element (Score_element_info); - - /** - Get information on the staff. Default: ask daddy. - */ - virtual Staff_info get_staff_info() const; - virtual void fill_staff_info (Staff_info&); - public: VIRTUAL_COPY_CONS(Translator); Engraver_group_engraver * daddy_grav_l() const; diff --git a/lily/include/score-engraver.hh b/lily/include/score-engraver.hh index 669a301f4a..70a7e30410 100644 --- a/lily/include/score-engraver.hh +++ b/lily/include/score-engraver.hh @@ -45,7 +45,7 @@ protected: protected: /* Engraver_group_engraver interface */ - virtual Staff_info get_staff_info() const; + virtual bool do_try_music (Music*); virtual void do_creation_processing(); virtual void do_removal_processing(); diff --git a/lily/include/staff-info.hh b/lily/include/staff-info.hh index d41b391357..e69de29bb2 100644 --- a/lily/include/staff-info.hh +++ b/lily/include/staff-info.hh @@ -1,28 +0,0 @@ -/* - staff-info.hh -- declare Staff_info - - source file of the GNU LilyPond music typesetter - - (c) 1997--2000 Han-Wen Nienhuys -*/ - - -#ifndef STAFF_INFO_HH -#define STAFF_INFO_HH - -#include "lily-proto.hh" - -/** struct to pass staff info along a Engraver hierarchy. - - JUNKME. - */ -struct Staff_info { - Paper_column *musical_l_; - Paper_column *command_l_; - - Paper_column * command_pcol_l(); - Paper_column * musical_pcol_l(); - Staff_info(); -}; - -#endif // STAFF_INFO_HH diff --git a/lily/line-group-group-engraver.cc b/lily/line-group-group-engraver.cc index 202d8ff328..c6e6f7c58d 100644 --- a/lily/line-group-group-engraver.cc +++ b/lily/line-group-group-engraver.cc @@ -34,7 +34,8 @@ void Line_group_engraver_group::do_removal_processing() { Engraver_group_engraver::do_removal_processing (); - Item * it = get_staff_info().command_pcol_l (); + Score_element * it + = unsmob_element (get_property (ly_symbol2scm ("currentCommandColumn"))); Pointer_group_interface (it, "bounded-by-me").add_element (staffline_p_); staffline_p_->set_bound(RIGHT,it); @@ -46,7 +47,8 @@ void Line_group_engraver_group::do_creation_processing() { create_line_spanner (); - Item * it = get_staff_info().command_pcol_l (); + Score_element * it + = unsmob_element (get_property (ly_symbol2scm ("currentCommandColumn"))); staffline_p_->set_bound(LEFT,it); Pointer_group_interface (it, "bounded-by-me").add_element (staffline_p_); diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc index e9e530f2e8..c8933e0396 100644 --- a/lily/score-engraver.cc +++ b/lily/score-engraver.cc @@ -200,17 +200,11 @@ Score_engraver::set_columns (Paper_column *new_command_l, if (news[i]) *current[i] = news[i]; } -} - -Staff_info -Score_engraver::get_staff_info() const -{ - Staff_info inf = Engraver_group_engraver::get_staff_info(); - inf.command_l_ = command_column_l_; - inf.musical_l_ = musical_column_l_; - - return inf; + if (new_musical_l) + set_property ("currentMusicalColumn", new_musical_l->self_scm_); + if (new_command_l) + set_property ("currentCommandColumn", new_command_l->self_scm_); } Music_output* diff --git a/lily/separating-line-group-engraver.cc b/lily/separating-line-group-engraver.cc index 4abc0d3aaf..a46608d0ab 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 (SCM_EOL); announce_element (Score_element_info (sep_span_p_, 0)); - sep_span_p_->set_bound (LEFT, get_staff_info ().command_pcol_l ()); + sep_span_p_->set_bound (LEFT, unsmob_element (get_property ("currentCommandColumn"))); } void Separating_line_group_engraver::do_removal_processing () { - sep_span_p_->set_bound (RIGHT, get_staff_info ().command_pcol_l ()); + sep_span_p_->set_bound (RIGHT, unsmob_element (get_property ("currentCommandColumn"))); typeset_element (sep_span_p_); sep_span_p_ =0; } diff --git a/lily/spacing-engraver.cc b/lily/spacing-engraver.cc index 8146b72676..0f26e7ca16 100644 --- a/lily/spacing-engraver.cc +++ b/lily/spacing-engraver.cc @@ -35,15 +35,14 @@ void Spacing_engraver::do_creation_processing () { spacing_p_ =new Spacing_spanner (SCM_EOL); - spacing_p_->set_bound (LEFT, get_staff_info ().command_pcol_l ()); + spacing_p_->set_bound (LEFT, unsmob_element (get_property ("currentCommandColumn"))); announce_element (Score_element_info (spacing_p_, 0)); } void Spacing_engraver::do_removal_processing () { - Paper_column * p = get_staff_info ().command_pcol_l (); - + Score_element * p = unsmob_element (get_property ("currentCommandColumn")); spacing_p_->set_bound (RIGHT, p); typeset_element (spacing_p_); spacing_p_ =0; @@ -95,7 +94,7 @@ Spacing_engraver::do_pre_move_processing () shortest_playing = shortest_playing (get_staff_info ().musical_pcol_l ()); + = dynamic_cast (unsmob_element (get_property ("currentMusicalColumn"))); SCM sh = smobify (new Moment (shortest_playing)); SCM st = smobify (new Moment (starter)); diff --git a/lily/spanner.cc b/lily/spanner.cc index 711eaddf41..806365bc8e 100644 --- a/lily/spanner.cc +++ b/lily/spanner.cc @@ -30,12 +30,6 @@ Spanner::do_break_processing () if (!left || !right) return; - if (left == right) - { - warning (_f ("Spanner `%s' has equal left and right spanpoints", - classname (this))); - } - /* Check if our parent in X-direction spans equally wide or wider than we do. @@ -175,11 +169,6 @@ Spanner::set_bound(Direction d, Score_element*s) { set_parent (i, X_AXIS); } - - if (spanned_drul_[Direction(-d)] == spanned_drul_[d] - && i) - warning (_f ("Spanner `%s' has equal left and right spanpoints", - classname (this))); } @@ -314,3 +303,11 @@ Spanner::do_derived_mark () while (flip (&d) != LEFT); } +void +add_bound_item (Spanner* sp, Item*it) +{ + if (!sp->get_bound (LEFT)) + sp->set_bound (LEFT, it); + else + sp->set_bound (RIGHT, it); +} diff --git a/lily/staff-info.cc b/lily/staff-info.cc index 10b63d8645..e69de29bb2 100644 --- a/lily/staff-info.cc +++ b/lily/staff-info.cc @@ -1,32 +0,0 @@ -/* - staff-info.cc -- implement Staff_info - - source file of the GNU LilyPond music typesetter - - (c) 1997--2000 Han-Wen Nienhuys -*/ - -#include "proto.hh" - -#include "staff-info.hh" -#include "paper-column.hh" - -Staff_info::Staff_info() -{ - command_l_ =0; - musical_l_ =0; -} - - -Paper_column* -Staff_info::command_pcol_l() -{ - return command_l_; -} - -Paper_column* -Staff_info::musical_pcol_l() -{ - return musical_l_; -} - diff --git a/lily/staff-symbol-engraver.cc b/lily/staff-symbol-engraver.cc index e5bc48cd62..6440a59414 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 (get_property ("staffSymbolBasicProperties")); - span_p_->set_bound(LEFT,get_staff_info().command_pcol_l ()); + span_p_->set_bound(LEFT,unsmob_element (get_property ("currentCommandColumn"))); announce_element (Score_element_info (span_p_, 0)); } @@ -63,7 +63,7 @@ Staff_symbol_engraver::do_removal_processing() if (gh_number_p (n)) span_p_->set_elt_property ("line-count", n); - span_p_->set_bound(RIGHT,get_staff_info().command_pcol_l ()); + span_p_->set_bound(RIGHT,unsmob_element (get_property ("currentCommandColumn"))); typeset_element (span_p_); span_p_ =0; } diff --git a/lily/system-start-delimiter-engraver.cc b/lily/system-start-delimiter-engraver.cc index 4841e19a48..10efe0c7d8 100644 --- a/lily/system-start-delimiter-engraver.cc +++ b/lily/system-start-delimiter-engraver.cc @@ -65,7 +65,7 @@ void System_start_delimiter_engraver::do_creation_processing() { delim_ = new System_start_delimiter (get_property ("basicSystemStartDelimiterProperties")); - delim_->set_bound (LEFT, get_staff_info ().command_pcol_l ()); + delim_->set_bound (LEFT, unsmob_element (get_property ("currentCommandColumn"))); /* You can't override the glyph using \property, you must do it in @@ -88,7 +88,7 @@ System_start_delimiter_engraver::do_removal_processing () if (gh_number_p (collapse)) delim_->set_elt_property ("collapse-height", collapse); - delim_->set_bound (RIGHT, get_staff_info ().command_pcol_l ()); + delim_->set_bound (RIGHT, unsmob_element (get_property ("currentCommandColumn"))); typeset_element (delim_); } diff --git a/lily/vertical-align-engraver.cc b/lily/vertical-align-engraver.cc index 0a9c319294..261c7956d7 100644 --- a/lily/vertical-align-engraver.cc +++ b/lily/vertical-align-engraver.cc @@ -43,7 +43,7 @@ Vertical_align_engraver::do_creation_processing() valign_p_->set_elt_property ("stacking-dir", gh_int2scm (DOWN)); - valign_p_->set_bound(LEFT,get_staff_info().command_pcol_l ()); + valign_p_->set_bound(LEFT,unsmob_element (get_property ("currentCommandColumn"))); announce_element (Score_element_info (valign_p_ , 0)); } @@ -61,7 +61,7 @@ Vertical_align_engraver::do_removal_processing() valign_p_->set_elt_property ("threshold", gh_cons (min,max)); } - valign_p_->set_bound(RIGHT,get_staff_info().command_pcol_l ()); + valign_p_->set_bound(RIGHT,unsmob_element (get_property ("currentCommandColumn"))); typeset_element (valign_p_); valign_p_ =0; } -- 2.39.5