]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/script-engraver.cc
* python/convertrules.py (conv): warning on \tempo{}
[lilypond.git] / lily / script-engraver.cc
index e25405b7328dc84122f2f369f366fb166c379817..7c05131a85f2164381d2c317cdeaa85ac91875c5 100644 (file)
@@ -38,12 +38,14 @@ struct Script_tuple
 class Script_engraver : public Engraver
 {
   vector<Script_tuple> scripts_;
+  Spanner *slur_;
 
 protected:
   void stop_translation_timestep ();
   void process_music ();
 
   DECLARE_TRANSLATOR_LISTENER (articulation);
+  DECLARE_ACKNOWLEDGER (slur);
   DECLARE_ACKNOWLEDGER (rhythmic_head);
   DECLARE_ACKNOWLEDGER (stem);
   DECLARE_ACKNOWLEDGER (stem_tremolo);
@@ -55,6 +57,7 @@ public:
 
 Script_engraver::Script_engraver ()
 {
+  slur_ = 0;
 }
 
 IMPLEMENT_TRANSLATOR_LISTENER (Script_engraver, articulation);
@@ -81,7 +84,7 @@ copy_property (Grob *g, SCM sym, SCM alist)
     {
       SCM entry = scm_assoc (sym, alist);
       if (scm_is_pair (entry))
-       g->set_property (sym, scm_cdr (entry));
+       g->internal_set_property (sym, scm_cdr (entry));
     }
 }
 
@@ -89,9 +92,8 @@ copy_property (Grob *g, SCM sym, SCM alist)
    could be saved by tacking the props onto the Script grob (i.e. make
    ScriptStaccato , ScriptMarcato, etc. ).
 */
-void
-make_script_from_event (Grob *p,  Context *tg,
-                       SCM art_type, int index)
+void make_script_from_event (Grob *p,  Context *tg,
+                            SCM art_type, int index)
 {
   SCM alist = tg->get_property ("scriptDefinitions");
   SCM art = scm_assoc (art_type, alist);
@@ -133,7 +135,7 @@ make_script_from_event (Grob *p,  Context *tg,
       SCM preset = p->get_property_data (sym);
       if (val == SCM_EOL
          || scm_call_1 (type, preset) == SCM_BOOL_F)
-       p->set_property (sym, val);
+       p->internal_set_property (sym, val);
     }
 
   if (!priority_found)
@@ -231,12 +233,19 @@ Script_engraver::acknowledge_note_column (Grob_info info)
     }
 }
 
+void
+Script_engraver::acknowledge_slur (Grob_info info)
+{
+  slur_ = info.spanner ();
+}
+
 void
 Script_engraver::stop_translation_timestep ()
 {
   scripts_.clear ();
 }
 
+ADD_ACKNOWLEDGER (Script_engraver, slur);
 ADD_ACKNOWLEDGER (Script_engraver, rhythmic_head);
 ADD_ACKNOWLEDGER (Script_engraver, stem);
 ADD_ACKNOWLEDGER (Script_engraver, note_column);