]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/rest-collision.cc
patch::: 1.3.136.jcn2
[lilypond.git] / lily / rest-collision.cc
index 6252f008666c8e413810fd396738f2a008eb60ac..aaaa743fd1904ac9b3b538b75f28904fc0302ba8 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include <math.h>              // ceil.
@@ -23,11 +23,11 @@ MAKE_SCHEME_CALLBACK(Rest_collision,force_shift_callback,2);
 SCM
 Rest_collision::force_shift_callback (SCM element_smob, SCM axis)
 {
-  Grob *them = unsmob_element (element_smob);
+  Grob *them = unsmob_grob (element_smob);
   Axis a = (Axis) gh_scm2int (axis);
   assert (a == Y_AXIS);
 
-  Grob * rc = unsmob_element (them->get_grob_property ("rest-collision"));
+  Grob * rc = unsmob_grob (them->get_grob_property ("rest-collision"));
 
   if (rc)
     {
@@ -54,8 +54,8 @@ Rest_collision::add_column (Grob*me,Grob *p)
 
     (not?)
   */
-      p->add_offset_callback (Rest_collision::force_shift_callback_proc, Y_AXIS);
-      p->set_grob_property ("rest-collision", me->self_scm ());
+  p->add_offset_callback (Rest_collision::force_shift_callback_proc, Y_AXIS);
+  p->set_grob_property ("rest-collision", me->self_scm ());
 }
 
 
@@ -65,7 +65,7 @@ Rest_collision::add_column (Grob*me,Grob *p)
 static SCM
 head_characteristic (Grob * col)
 {
-  Grob * s = unsmob_element (col->get_grob_property ("rest"));
+  Grob * s = unsmob_grob (col->get_grob_property ("rest"));
 
   if (!s)
     return SCM_BOOL_F;
@@ -89,7 +89,7 @@ Rest_collision::do_shift (Grob *me, SCM elts)
   for (SCM s = elts; gh_pair_p (s); s = gh_cdr (s))
     {
       
-      Grob * e = unsmob_element (gh_car (s));
+      Grob * e = unsmob_grob (gh_car (s));
       if (!e)
        continue;
       
@@ -98,7 +98,7 @@ Rest_collision::do_shift (Grob *me, SCM elts)
       else
        commony= commony->common_refpoint  (e, Y_AXIS);
       
-      if (unsmob_element (e->get_grob_property ("rest")))
+      if (unsmob_grob (e->get_grob_property ("rest")))
        rests.push (e);
       else
        notes.push (e);
@@ -147,7 +147,7 @@ Rest_collision::do_shift (Grob *me, SCM elts)
          display_count = gh_scm2int (s);
          for (; i > display_count; i--)
            {
-             Grob* r = unsmob_element (rests[i-1]->get_grob_property ("rest"));
+             Grob* r = unsmob_grob (rests[i-1]->get_grob_property ("rest"));
              if (r)
                r->suicide ();
              rests[i-1]->suicide ();
@@ -198,7 +198,7 @@ Rest_collision::do_shift (Grob *me, SCM elts)
       // try to be opposite of noteheads. 
       Direction dir = - Note_column::dir (notes[0]);
 
-      Grob * r = unsmob_element (rcol->get_grob_property ("rest"));
+      Grob * r = unsmob_grob (rcol->get_grob_property ("rest"));
       Interval restdim = r->extent (r, Y_AXIS);        // ??
 
       if (restdim.empty_b ())