]> git.donarmstrong.com Git - lilypond.git/commitdiff
''
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 23 Jun 2002 23:00:30 +0000 (23:00 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 23 Jun 2002 23:00:30 +0000 (23:00 +0000)
ChangeLog
lily/piano-pedal-engraver.cc
lily/text-spanner.cc
scm/grob-property-description.scm

index 5d9564be2edcd4e341676d40a79f7ca81dd84a5d..6d8fcde8835ccc6c205478cd86eebe2ce114d6a6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,10 +7,14 @@
        lists of grobs. This should fix the problems of lily in
        combination with pthreads/qthreads.
 
-2002-06-23  Han-Wen  <hanwen@cs.uu.nl>
-
        * lily/grob.cc (mark_smob): bugfix: mark X parent too.
 
+2002-06-23  Chris Jackson  <chris@fluffhouse.org.uk>
+
+       * lily/text-spanner.cc (setup_pedal_bracket):
+       * lily/piano-pedal-engraver.cc (create_bracket_grobs): 
+       Fix the lengths of mixed-style piano pedal brackets.
+
 2002-06-23  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * Documentation/user/tutorial.itely (First steps): Add missing
index 982c33b2d10f3eb0220c70611d66ee524705e347..14bfb4e3199adae68b594ca3f2f2cafa3ec35e54 100644 (file)
@@ -352,10 +352,12 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, SCM pedaltype)
                                       gh_bool2scm (false));
 
       /*
-       Warning: we can't hang the bracket on an item in Y-direction:
-       it will cause problems when the bracket is broken, because the
-       item can be on another line.
+       Mixed style: Store a pointer to the preceding text for use in
+       calculating the length of the line 
       */
+      if (p->item_p_)
+       p->bracket_p_->set_grob_property ("pedal-text", p->item_p_->self_scm ());
+      
       p->bracket_p_->set_bound (LEFT, unsmob_grob (get_property ("currentMusicalColumn")));
       Axis_group_interface::add_element (p->line_spanner_, p->bracket_p_);           
 
index f4ab3b524730b2e987a296923b4d7d0b998e527e..a6cb05fe9351fe333a3cd403eabd47e8144fe325 100644 (file)
@@ -244,7 +244,7 @@ Text_spanner::setup_pedal_bracket(Spanner *me)
   if ( to_boolean (me->get_grob_property ("text-start")) )
     {
       height[LEFT] = 0;
-      Grob * textbit = me->get_parent(Y_AXIS);
+      Grob * textbit = unsmob_grob (me->get_grob_property("pedal-text"));
       extra_short = padding;
       if (textbit->internal_has_interface(ly_symbol2scm("text-interface"))) 
        // for plain text, e.g., Sost. Ped.
@@ -287,7 +287,7 @@ struct Pianopedal
 };
 ADD_INTERFACE (Pianopedal,"piano-pedal-interface",
               "",
-              "pedal-type edge-widen edge-height shorten-pair text-start left-widen right-widen");
+              "pedal-type edge-widen edge-height shorten-pair text-start left-widen right-widen pedal-text");
 
 ADD_INTERFACE (Text_spanner,"text-spanner-interface",
               "generic text spanner",
index fc64c21f281b1b60b62d407be077338e2fa01913..cedaf07851f9cd006760e139b8c644a17c6f9999 100644 (file)
@@ -267,6 +267,7 @@ FIXME: also pair? (cons LEFT RIGHT)
 (grob-property-description 'old-accidentals list? "list of (pitch, accidental) pairs.")
 (grob-property-description 'padding number? "add this much extra space between objects that are next to each other.")
 (grob-property-description 'pedal-type symbol? "Style of piano pedal: text, bracket or mixed.")
+(grob-property-description 'pedal-text ly-grob? "Pointer to the text of a mixed-style piano pedal.")
 (grob-property-description 'penalty number? "Penalty for breaking at
 this column. 10000 or more means forbid linebreak, -10000 or less
 means force linebreak.  Other values influence linebreaking decisions