]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/script-engraver.cc
(LY_DEFINE): store name before destroying face.
[lilypond.git] / lily / script-engraver.cc
index 7369a11474409c17a512ae268e2315a645f8eec6..eb1ce89537ebd3c0c5a0ebc63abac00413850686 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997--2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "context.hh"
@@ -43,6 +43,7 @@ protected:
   DECLARE_ACKNOWLEDGER (slur);
   DECLARE_ACKNOWLEDGER (rhythmic_head);
   DECLARE_ACKNOWLEDGER (stem);
+  DECLARE_ACKNOWLEDGER (stem_tremolo);
   DECLARE_ACKNOWLEDGER (note_column);
 
 public:
@@ -131,7 +132,8 @@ void make_script_from_event (Grob *p,  Context *tg,
        }
 
       SCM preset = p->get_property_data (sym);
-      if (scm_call_1 (type, preset) == SCM_BOOL_F)
+      if (val == SCM_EOL
+         || scm_call_1 (type, preset) == SCM_BOOL_F)
        p->internal_set_property (sym, val);
     }
 
@@ -180,6 +182,18 @@ Script_engraver::acknowledge_stem (Grob_info info)
     }
 }
 
+void
+Script_engraver::acknowledge_stem_tremolo (Grob_info info)
+{
+  int script_count = scripts_.size ();
+  for (int i = 0; i < script_count; i++)
+    {
+      Grob *e = scripts_[i].script_;
+      Side_position_interface::add_support (e, info.grob ());
+    }
+}
+
+
 void
 Script_engraver::acknowledge_rhythmic_head (Grob_info info)
 {
@@ -236,6 +250,7 @@ ADD_ACKNOWLEDGER (Script_engraver, slur);
 ADD_ACKNOWLEDGER (Script_engraver, rhythmic_head);
 ADD_ACKNOWLEDGER (Script_engraver, stem);
 ADD_ACKNOWLEDGER (Script_engraver, note_column);
+ADD_ACKNOWLEDGER (Script_engraver, stem_tremolo);
 
 ADD_TRANSLATOR (Script_engraver,
                /* doc */ "Handles note scripted articulations.",