]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/dynamic-engraver.cc
Merge branch 'master' of git+ssh://jneem@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / lily / dynamic-engraver.cc
index 5c3d0feecdf2627da0f4ffca841dc5ef864298a9..49687a6b9bf7534233204b1b2822e827551fe2f6 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 1997--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "axis-group-interface.hh"
@@ -64,7 +64,6 @@ class Dynamic_engraver : public Engraver
 
   TRANSLATOR_DECLARATIONS (Dynamic_engraver);
   DECLARE_ACKNOWLEDGER (accidental);
-  DECLARE_ACKNOWLEDGER (script);
   DECLARE_ACKNOWLEDGER (stem_tremolo);
   DECLARE_ACKNOWLEDGER (note_column);
   DECLARE_ACKNOWLEDGER (slur);
@@ -184,7 +183,7 @@ Dynamic_engraver::process_music ()
        }
       else if (accepted_spanevents_drul_[STOP])
        {
-         accepted_spanevents_drul_[STOP]->origin ()->warning (_ ("can't find start of (de)crescendo"));
+         accepted_spanevents_drul_[STOP]->origin ()->warning (_ ("cannot find start of (de)crescendo"));
          stop_ev = 0;
        }
     }
@@ -262,7 +261,7 @@ Dynamic_engraver::process_music ()
              if (scm_is_string (s) || scm_is_pair (s))
                {
                  cresc_->set_property ("edge-text",
-                                       scm_cons (s, scm_makfrom0str ("")));
+                                       scm_cons (s, scm_from_locale_string ("")));
                  context ()->set_property ((start_type + "Text").c_str (),
                                            SCM_EOL);
                }
@@ -340,10 +339,18 @@ Dynamic_engraver::typeset_all ()
       if (!finished_cresc_->get_bound (RIGHT)
          || use_bar)
        {
-         Grob *column_bound = unsmob_grob (use_bar
-                                           ? get_property ("currentCommandColumn")
-                                           : get_property ("currentMusicalColumn"));
-           
+                 
+         Grob *column_bound = 0;
+         if (use_bar)
+           {
+             column_bound = unsmob_grob (get_property ("breakableSeparationItem"));
+           }
+         
+         if (!column_bound)
+           column_bound = unsmob_grob (use_bar
+                                       ? get_property ("currentCommandColumn")
+                                       : get_property ("currentMusicalColumn"));
+         
          finished_cresc_->set_bound (RIGHT, script_
                                      ? script_
                                      : column_bound);
@@ -391,7 +398,6 @@ Dynamic_engraver::typeset_all ()
     }
 }
 
-
 void
 Dynamic_engraver::acknowledge_accidental (Grob_info info)
 {
@@ -399,7 +405,6 @@ Dynamic_engraver::acknowledge_accidental (Grob_info info)
     Side_position_interface::add_support (line_spanner_, info.grob ());
 }
 
-
 void
 Dynamic_engraver::acknowledge_stem_tremolo (Grob_info info)
 {
@@ -407,7 +412,6 @@ Dynamic_engraver::acknowledge_stem_tremolo (Grob_info info)
     Side_position_interface::add_support (line_spanner_, info.grob ());
 }
 
-
 void
 Dynamic_engraver::acknowledge_slur (Grob_info info)
 {
@@ -415,7 +419,6 @@ Dynamic_engraver::acknowledge_slur (Grob_info info)
     Side_position_interface::add_support (line_spanner_, info.grob ());
 }
 
-
 void
 Dynamic_engraver::acknowledge_note_column (Grob_info info)
 {
@@ -454,27 +457,7 @@ Dynamic_engraver::acknowledge_note_column (Grob_info info)
     finished_cresc_->set_bound (RIGHT, info.grob ());
 }
 
-void
-Dynamic_engraver::acknowledge_script (Grob_info info)
-{
-  if (!line_spanner_ || !script_)
-    return;
-
-  SCM p = info.grob ()->get_property ("script-priority");
-
-  /*
-    UGH.
-
-    DynamicText doesn't really have a script-priority field.
-  */
-  if (scm_is_number (p)
-      && scm_to_int (p)
-      < scm_to_int (script_->get_property ("script-priority")))
-    Side_position_interface::add_support (line_spanner_, info.grob ());
-}
-
 ADD_ACKNOWLEDGER (Dynamic_engraver, accidental);
-ADD_ACKNOWLEDGER (Dynamic_engraver, script);
 ADD_ACKNOWLEDGER (Dynamic_engraver, note_column);
 ADD_ACKNOWLEDGER (Dynamic_engraver, slur);
 ADD_ACKNOWLEDGER (Dynamic_engraver, stem_tremolo);