]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/script.cc
release: 1.3.33
[lilypond.git] / lily / script.cc
index cc5db9d7482c1952807dd8cdf10ae2ff7eb4f5c3..6f96f1b7b8638042f2f69128b76534925fc3a396 100644 (file)
@@ -19,9 +19,9 @@ Molecule
 Script::get_molecule(Direction d) const
 {
   SCM s = get_elt_property ("molecule");
-  assert (s != SCM_UNDEFINED);
+  assert (gh_pair_p (s));
 
-  SCM key = SCM_CAR (s);
+  SCM key = gh_car  (s);
   if (key == ly_symbol2scm ("feta"))
     {
       return lookup_l ()->afm_find ("scripts-" +
@@ -39,7 +39,7 @@ Script::get_molecule(Direction d) const
 
 
 void
-Script::do_pre_processing ()
+Script::before_line_breaking ()
 {
   /*
     center my self on the note head.
@@ -49,21 +49,22 @@ Script::do_pre_processing ()
 }
 
 void
-Script::do_post_processing ()
+Script::after_line_breaking ()
 {
-  Direction d =  Side_position_interface (this).get_direction ();
-  Molecule m (get_molecule(d));
+  Side_position_interface i (this);
+  Direction d =  i.get_direction ();
+  i.set_direction (d);
 }
 
-Molecule*
-Script::do_brew_molecule_p () const
+Molecule 
+Script::do_brew_molecule () const
 {
   Direction dir = DOWN;
   SCM d = get_elt_property ("direction");
   if (isdir_b (d))
     dir = to_dir (d);
   
-  return new Molecule (get_molecule (dir));
+  return get_molecule (dir);
 }