]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/script-engraver.cc
Doc-es: update Notation/Appendices.
[lilypond.git] / lily / script-engraver.cc
index 1b9cf0b08a7c03fd061d740602d9e0b69e0b1df3..62c3de482cd359256d824135fd0420d29455bd91 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 1997--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 1997--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -58,6 +58,8 @@ protected:
   DECLARE_ACKNOWLEDGER (rhythmic_head);
   DECLARE_ACKNOWLEDGER (stem);
   DECLARE_ACKNOWLEDGER (stem_tremolo);
+  DECLARE_ACKNOWLEDGER (tie);
+  DECLARE_END_ACKNOWLEDGER (tie);
   DECLARE_ACKNOWLEDGER (note_column);
   DECLARE_ACKNOWLEDGER (inline_accidental);
 
@@ -88,7 +90,7 @@ Script_engraver::listen_articulation (Stream_event *ev)
 void
 copy_property (Grob *g, SCM sym, SCM alist)
 {
-  if (g->internal_get_property (sym) == SCM_EOL)
+  if (scm_is_null (g->get_property (sym)))
     {
       SCM entry = scm_assoc (sym, alist);
       if (scm_is_pair (entry))
@@ -107,7 +109,7 @@ make_script_from_event (Grob *p, Context *tg,
   SCM alist = tg->get_property ("scriptDefinitions");
   SCM art = scm_assoc (art_type, alist);
 
-  if (art == SCM_BOOL_F)
+  if (scm_is_false (art))
     {
       /* FIXME: */
       warning (_ ("do not know how to interpret articulation:"));
@@ -130,7 +132,7 @@ make_script_from_event (Grob *p, Context *tg,
 
       SCM val = scm_cdar (s);
 
-      if (sym == ly_symbol2scm ("script-priority"))
+      if (scm_is_eq (sym, ly_symbol2scm ("script-priority")))
         {
           priority_found = true;
           /* Make sure they're in order of user input by adding index i.
@@ -142,8 +144,8 @@ 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)
+      if (scm_is_null (val)
+          || scm_is_false (scm_call_1 (type, preset)))
         p->set_property (sym, val);
     }
 
@@ -199,6 +201,26 @@ Script_engraver::acknowledge_stem_tremolo (Grob_info info)
     }
 }
 
+void
+Script_engraver::acknowledge_tie (Grob_info info)
+{
+  for (vsize i = 0; i < scripts_.size (); i++)
+    {
+      Grob *e = scripts_[i].script_;
+      Side_position_interface::add_support (e, info.grob ());
+    }
+}
+
+void
+Script_engraver::acknowledge_end_tie (Grob_info info)
+{
+  for (vsize i = 0; i < scripts_.size (); i++)
+    {
+      Grob *e = scripts_[i].script_;
+      Side_position_interface::add_support (e, info.grob ());
+    }
+}
+
 void
 Script_engraver::acknowledge_inline_accidental (Grob_info info)
 {
@@ -255,6 +277,8 @@ Script_engraver::stop_translation_timestep ()
 
 ADD_ACKNOWLEDGER (Script_engraver, rhythmic_head);
 ADD_ACKNOWLEDGER (Script_engraver, stem);
+ADD_ACKNOWLEDGER (Script_engraver, tie);
+ADD_END_ACKNOWLEDGER (Script_engraver, tie);
 ADD_ACKNOWLEDGER (Script_engraver, note_column);
 ADD_ACKNOWLEDGER (Script_engraver, stem_tremolo);
 ADD_ACKNOWLEDGER (Script_engraver, inline_accidental);