- p->start_req_l_ = p->req_l_drul_[START];
- p->current_bracket_req_ = p->req_l_drul_[START];
-
- p->bracket_p_ = new Spanner (get_property ("PianoPedalBracket"));
- p->bracket_p_->set_interface (ly_symbol2scm ("piano-pedal-interface"));
-
- // Set a property so that the molecule-creating function will know whether the left edge should be flared \___
- p->bracket_p_->set_grob_property("left-widen", gh_bool2scm((bool) p->req_l_drul_[STOP]) );
-
- // Set this property for 'mixed style' pedals, Ped._______/\ ,
- // so the molecule function will shorten the ____ line by the length of the Ped. text.
- p->bracket_p_->set_grob_property("text-start",
- pedaltype == ly_symbol2scm("mixed") ?
- gh_bool2scm((bool) ! p->req_l_drul_[STOP]) :
- gh_bool2scm(false));
- if (p->item_p_)
- p->bracket_p_->set_parent (p->item_p_, Y_AXIS);
-
- p->bracket_p_->set_bound (LEFT, unsmob_grob (get_property ("currentMusicalColumn")));
- Axis_group_interface::add_element (p->line_spanner_, p->bracket_p_);
-
- add_bound_item (p->line_spanner_, p->bracket_p_->get_bound (LEFT));
- announce_grob (p->bracket_p_, p->req_l_drul_[START]->self_scm());
-
- if (!p->req_l_drul_[STOP]) {
-
- nspanners_i ++;
- previous_p_[nspanners_i] = p->line_spanner_;
-
- if (nspanners_i > 1)
- // position new pedal spanner below the current one
- Side_position_interface::add_support(p->line_spanner_, previous_p_[nspanners_i - 1]);
-
- }
+ p->start_ev_ = p->event_drul_[START];
+ p->current_bracket_ev_ = p->event_drul_[START];
+
+ p->bracket_ = make_spanner ("PianoPedalBracket", p->event_drul_[START]->self_scm ());
+
+ /*
+ Set properties so that the stencil-creating function will
+ know whether the left edge should be flared \___
+ */
+
+ if (!p->finished_bracket_)
+ {
+ SCM flare = p->bracket_->get_property ("bracket-flare");
+ p->bracket_->set_property ("bracket-flare", scm_cons (scm_from_double (0), scm_cdr (flare)));
+ }
+
+ /* Set this property for 'mixed style' pedals, Ped._______/\ ,
+ so the stencil function will shorten the ____ line by the length of the Ped. text.
+ */
+
+ if (mixed)
+ {
+ /*
+ Mixed style: Store a pointer to the preceding text for use in
+ calculating the length of the line
+
+
+ TODO:
+
+ WTF is pedal-text not the bound of the object? --hwn
+ */
+ if (p->item_)
+ p->bracket_->set_object ("pedal-text", p->item_->self_scm ());
+ }
+
+ /*
+ We do not use currentMusicalColumn for the left span-point.
+ If the column as accidentals (eg on a different stave), the
+ currentMusicalColumn is too wide, making the bracket too big.
+
+ TODO:
+
+ Hmm. What do we do when there are no notes when the spanner starts?
+
+ TODO:
+
+ what about the right span point?
+
+ */
+ Axis_group_interface::add_element (p->line_spanner_, p->bracket_);
+
+ if (!p->event_drul_[STOP])
+ {
+
+ /*
+ code dup. --hwn.
+
+ // position new pedal spanner below the current one
+ */
+ if (previous_.size ())
+ Side_position_interface::add_support (p->line_spanner_, previous_.back ());
+
+ previous_.push_back (p->line_spanner_);
+ }