]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/side-position-interface.cc
* tex/lilyponddefs.tex (\lyitem): Don't use \topalign to make
[lilypond.git] / lily / side-position-interface.cc
index 82b1ff44ba5a4c12dc87b1fb146e52ff8ec74e66..7ff38d6e4e686a1e03159a4594f62921cbde8f69 100644 (file)
@@ -54,7 +54,7 @@ SCM
 Side_position_interface::aligned_on_support_extents (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (axis);
+  Axis a = (Axis) scm_to_int (axis);
 
   return general_side_position (me, a, true);
 }
@@ -73,7 +73,7 @@ Side_position_interface::general_side_position (Grob * me, Axis a, bool use_exte
   Grob * st = Staff_symbol_referencer::get_staff_symbol (me);
   bool include_staff = (st
                        && a == Y_AXIS
-                       && is_number (me->get_property ("staff-padding")));
+                       && scm_is_number (me->get_property ("staff-padding")));
 
   Interval dim;
   if (include_staff)
@@ -82,9 +82,9 @@ Side_position_interface::general_side_position (Grob * me, Axis a, bool use_exte
       dim = st->extent (common, Y_AXIS);
     }
     
-  for (SCM s = support; s != SCM_EOL; s = ly_cdr (s))
+  for (SCM s = support; s != SCM_EOL; s = scm_cdr (s))
     {
-      Grob * e  = unsmob_grob (ly_car (s));
+      Grob * e  = unsmob_grob (scm_car (s));
       if (e)
        if (use_extents)
          dim.unite (e->extent (common, a));
@@ -132,7 +132,7 @@ SCM
 Side_position_interface::aligned_on_support_refpoints (SCM smob, SCM axis)
 {
   Grob *me = unsmob_grob (smob);
-  Axis a = (Axis) ly_scm2int (axis);
+  Axis a = (Axis) scm_to_int (axis);
 
   return general_side_position (me, a, false); 
 }
@@ -197,11 +197,11 @@ SCM
 Side_position_interface::aligned_side (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (axis);
+  Axis a = (Axis) scm_to_int (axis);
   
   Direction d = Side_position_interface::get_direction (me);
   
-  Real o = ly_scm2double (aligned_on_support_extents (element_smob,axis));
+  Real o = scm_to_double (aligned_on_support_extents (element_smob,axis));
 
   Interval iv =  me->extent (me, a);
 
@@ -222,16 +222,15 @@ Side_position_interface::aligned_side (SCM element_smob, SCM axis)
  */
   Grob * st = Staff_symbol_referencer::get_staff_symbol (me);
   if (st && a == Y_AXIS
-      && is_number (me->get_property ("staff-padding")))
+      && scm_is_number (me->get_property ("staff-padding")))
     {
       Real padding=
       Staff_symbol_referencer::staff_space (me)
-      * ly_scm2double (me->get_property ("staff-padding"));
+      * scm_to_double (me->get_property ("staff-padding"));
   
       Grob *common = me->common_refpoint (st, Y_AXIS);
       
       Interval staff_size = st->extent (common, Y_AXIS);
-      Interval me_ext = me->extent (common, a);
       Real diff =  d*staff_size[d] + padding - d*(o + iv[-d]);
       o += (d*  (diff >? 0));
     }
@@ -246,8 +245,6 @@ Side_position_interface::set_axis (Grob*me, Axis a)
   me->add_offset_callback (Side_position_interface::aligned_side_proc, a);
 }
 
-
-
 // ugh. doesn't catch all variants. 
 Axis
 Side_position_interface::get_axis (Grob*me)
@@ -255,14 +252,11 @@ Side_position_interface::get_axis (Grob*me)
   if (me->has_offset_callback (Side_position_interface::aligned_side_proc, X_AXIS)
       || me->has_offset_callback (Side_position_interface::aligned_side_proc , X_AXIS))
     return X_AXIS;
-
   
   return Y_AXIS;
 }
 
 
-
-
 ADD_INTERFACE (Side_position_interface,"side-position-interface",
               "Position a victim object (this one) next to other objects (the "
               "support).   The property @code{direction} signifies where to put the  "