From c896840a71d1e5e644d4258fe70e986d0cb5ec0a Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sun, 5 May 2002 21:11:56 +0000 Subject: [PATCH] *** empty log message *** --- lily/group-interface.cc | 2 +- lily/include/score-engraver.hh | 3 ++- lily/paper-column.cc | 2 +- lily/piano-pedal-engraver.cc | 40 +++++++++++-------------------- lily/score-engraver.cc | 17 +++++++++---- scm/grob-property-description.scm | 1 + 6 files changed, 31 insertions(+), 34 deletions(-) diff --git a/lily/group-interface.cc b/lily/group-interface.cc index 9bb660cb6c..c7991793fa 100644 --- a/lily/group-interface.cc +++ b/lily/group-interface.cc @@ -21,7 +21,7 @@ void Group_interface::add_thing (Grob*me, SCM sym, SCM thing) { - SCM handle = scm_sloppy_assq (sym, me->mutable_property_alist_); + SCM handle = scm_sloppy_assq (sym, me->mutable_property_alist_); if (handle != SCM_BOOL_F) { gh_set_cdr_x (handle, gh_cons (thing, gh_cdr (handle))); diff --git a/lily/include/score-engraver.hh b/lily/include/score-engraver.hh index 0f0218ddc8..343b02a4b7 100644 --- a/lily/include/score-engraver.hh +++ b/lily/include/score-engraver.hh @@ -21,7 +21,8 @@ class Score_engraver : { System * scoreline_l_; int breaks_i_; - + + Link_array elem_p_arr_; Paper_column* command_column_l_; diff --git a/lily/paper-column.cc b/lily/paper-column.cc index 248af8cabf..fb22e1314e 100644 --- a/lily/paper-column.cc +++ b/lily/paper-column.cc @@ -128,4 +128,4 @@ Paper_column::brew_molecule (SCM p) ADD_INTERFACE (Paper_column, "paper-column-interface", "", - "between-cols between-system-string when bounded-by-me shortest-playing-duration shortest-starter-duration"); + "between-cols count between-system-string when bounded-by-me shortest-playing-duration shortest-starter-duration"); diff --git a/lily/piano-pedal-engraver.cc b/lily/piano-pedal-engraver.cc index 904ae8182f..0a645094eb 100644 --- a/lily/piano-pedal-engraver.cc +++ b/lily/piano-pedal-engraver.cc @@ -132,31 +132,17 @@ Piano_pedal_engraver::acknowledge_grob (Grob_info info) { for (Pedal_info*p = info_list_; p && p->name_; p ++) { - Grob *gs[] = {p->item_p_, - p->bracket_p_}; - for (int i = 0; i < 2 ; i++) + if (Note_column::has_interface (info.grob_l_)) { - Grob *g = gs[i]; - if (g && p->line_spanner_) + if (p->line_spanner_) { - if (Note_column::has_interface (info.grob_l_)) - { - Side_position_interface::add_support (p->line_spanner_, info.grob_l_); - add_bound_item (p->line_spanner_,info.grob_l_); - - if (p->bracket_p_) - add_bound_item (p->bracket_p_,info.grob_l_); - - /* - What the h*ll is this supposed to do? --hwn - */ -#if 0 - if (Side_position_interface::get_axis (g) == X_AXIS - && !g->get_parent (Y_AXIS)) - g->set_parent (info.grob_l_, Y_AXIS); -#endif - } - } + Side_position_interface::add_support (p->line_spanner_, info.grob_l_); + + add_bound_item (p->line_spanner_,info.grob_l_); + } + if (p->bracket_p_) + add_bound_item (p->bracket_p_,info.grob_l_); + } } } @@ -317,7 +303,8 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, SCM pedaltype) assert (!p->finished_bracket_p_ && p->bracket_p_); - p->bracket_p_->set_bound (RIGHT, unsmob_grob (get_property ("currentMusicalColumn"))); + Grob *cmc = unsmob_grob (get_property ("currentMusicalColumn")); + p->bracket_p_->set_bound (RIGHT, cmc); /* Set properties so that the molecule-creating function will @@ -471,8 +458,9 @@ Piano_pedal_engraver::typeset_all () if (p->finished_bracket_p_) { - Grob * l = p->finished_line_spanner_->get_bound (LEFT); - Grob * r = p->finished_line_spanner_->get_bound (RIGHT); + + Grob * l = p->finished_bracket_p_->get_bound (LEFT); + Grob * r = p->finished_bracket_p_->get_bound (RIGHT); if (!r) { p->finished_bracket_p_->set_bound (RIGHT, unsmob_grob (get_property ("currentMusicalColumn"))); diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc index 7d44b9495a..8b4b4c7675 100644 --- a/lily/score-engraver.cc +++ b/lily/score-engraver.cc @@ -63,6 +63,10 @@ Score_engraver::prepare (Moment w) Global_translator::prepare (w); make_columns (); + + command_column_l_->set_grob_property ("when", now_mom_.smobbed_copy ()); + musical_column_l_->set_grob_property ("when", now_mom_.smobbed_copy ()); + start_translation_timestep (); } @@ -207,8 +211,6 @@ Score_engraver::stop_translation_timestep () progress_indication ("[" + to_str (breaks_i_) + "]"); } - command_column_l_->set_grob_property ("when", now_mom_.smobbed_copy ()); - musical_column_l_->set_grob_property ("when", now_mom_.smobbed_copy ()); scoreline_l_->add_column (command_column_l_); scoreline_l_->add_column (musical_column_l_); @@ -222,13 +224,18 @@ Score_engraver::set_columns (Paper_column *new_command_l, Paper_column *new_musical_l) { assert (!command_column_l_ && !musical_column_l_); + command_column_l_ = new_command_l; musical_column_l_ = new_musical_l; + if (new_command_l) + { + set_property ("currentCommandColumn", new_command_l->self_scm ()); + } if (new_musical_l) - set_property ("currentMusicalColumn", new_musical_l->self_scm ()); - if (new_command_l) - set_property ("currentCommandColumn", new_command_l->self_scm ()); + { + set_property ("currentMusicalColumn", new_musical_l->self_scm ()); + } } Music_output* diff --git a/scm/grob-property-description.scm b/scm/grob-property-description.scm index f9031e12a7..4390761f99 100644 --- a/scm/grob-property-description.scm +++ b/scm/grob-property-description.scm @@ -103,6 +103,7 @@ square of the inner notes involved.") (grob-property-description 'collapse-height number? "Minimum height of system start delimiter. If equal or smaller, the bracket is removed.") (grob-property-description 'columns list? "list of grobs, typically containing paper-columns.") +(grob-property-description 'count integer? "") (grob-property-description 'control-points list? "List of 4 offsets (number-pairs) that form control points for the tie/slur shape.") (grob-property-description 'damping integer? "amount of beam slope damping should beam slope be damped? 0: no, 1: yes, 100000: horizontal beams .") (grob-property-description 'dash-length number? "the length of a dash.") -- 2.39.2