]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/script.cc
release: 1.3.89
[lilypond.git] / lily / script.cc
index c4dcc30cd401cfe2c03a4122d1bc03dfb17dd15e..333593a2d8e12cf6db475e343b7f04ac04c15ae1 100644 (file)
 #include "lookup.hh"
 #include "side-position-interface.hh"
 #include "paper-def.hh"
-
-
-Script ::Script (SCM s)
-  : Item (s)
-{
-}
+#include "item.hh"
 
 Molecule
 Script::get_molecule(Score_element * me, Direction d)
@@ -33,7 +28,7 @@ Script::get_molecule(Score_element * me, Direction d)
     }
   else if (key == ly_symbol2scm ("accordion"))
     {
-      return me->lookup_l ()->accordion (gh_cdr (s), me->paper_l()->get_var("interline"));
+      return me->lookup_l ()->accordion (gh_cdr (s), me->paper_l()->get_var("staffspace"));
     }
   else
     assert (false);
@@ -41,8 +36,6 @@ Script::get_molecule(Score_element * me, Direction d)
   return Molecule ();
 }
 
-
-
 MAKE_SCHEME_CALLBACK(Script,after_line_breaking);
 SCM
 Script::after_line_breaking (SCM smob)
@@ -52,23 +45,31 @@ Script::after_line_breaking (SCM smob)
   Direction d = Side_position::get_direction (me);
   Side_position::set_direction (me,d);
 
-  return SCM_UNDEFINED;
+  return SCM_UNSPECIFIED;
 }
 
-
 MAKE_SCHEME_CALLBACK(Script,brew_molecule);
 
 SCM
 Script::brew_molecule (SCM smob)
 {
   Score_element *me= unsmob_element (smob);
-  Direction dir = DOWN;
-  SCM d = me->get_elt_property ("direction");
-  if (isdir_b (d))
-    dir = to_dir (d);
-  
+//   Direction dir = DOWN;
+//   SCM d = me->get_elt_property ("direction");
+//   if (isdir_b (d))
+//     dir = to_dir (d);
+  Direction dir = Side_position::get_direction(me);
   return get_molecule (me, dir).create_scheme();
 }
 
+bool
+Script::has_interface (Score_element*me)
+{
+  return me->has_interface (ly_symbol2scm ("script-interface"));
+}
 
-
+void
+Script::set_interface (Score_element*me)
+{
+  return me->set_interface (ly_symbol2scm ("script-interface"));
+}