]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/rest.cc
lilypond-manuals.css: edit color scheme and some spacing
[lilypond.git] / lily / rest.cc
index 9e5dc046e14821fdced4de7ee10707c02f08b956..f562f69534a1689d648efabb5d90051c9b0a42d3 100644 (file)
@@ -35,7 +35,7 @@ MAKE_SCHEME_CALLBACK (Rest, y_offset_callback, 1);
 SCM
 Rest::y_offset_callback (SCM smob)
 {
-  Grob *me = Grob::unsmob (smob);
+  Grob *me = unsmob<Grob> (smob);
   int duration_log = scm_to_int (me->get_property ("duration-log"));
   Real ss = Staff_symbol_referencer::staff_space (me);
 
@@ -146,8 +146,8 @@ MAKE_SCHEME_CALLBACK (Rest, calc_cross_staff, 1);
 SCM
 Rest::calc_cross_staff (SCM smob)
 {
-  Grob *me = Grob::unsmob (smob);
-  Grob *stem = Grob::unsmob (me->get_object ("stem"));
+  Grob *me = unsmob<Grob> (smob);
+  Grob *stem = unsmob<Grob> (me->get_object ("stem"));
 
   if (!stem)
     return SCM_BOOL_F;
@@ -199,11 +199,10 @@ Rest::glyph_name (Grob *me, int durlog, const string &style, bool try_ledgers,
         actual_style = "";
     }
 
-  if ((style == "classical") && (durlog != 2))
+  if (((style == "classical") || (style == "z")) && (durlog != 2))
     {
       /*
-        classical style: revert back to default style for any rest other
-        than quarter rest
+        these styles differ from the default in quarter rests only
       */
       actual_style = "";
     }
@@ -260,7 +259,7 @@ Rest::translate (Grob *me, int dy)
 SCM
 Rest::print (SCM smob)
 {
-  return brew_internal_stencil (Grob::unsmob (smob), true);
+  return brew_internal_stencil (unsmob<Grob> (smob), true);
 }
 
 MAKE_SCHEME_CALLBACK (Rest, width, 1);
@@ -270,14 +269,14 @@ MAKE_SCHEME_CALLBACK (Rest, width, 1);
 SCM
 Rest::width (SCM smob)
 {
-  return generic_extent_callback (Grob::unsmob (smob), X_AXIS);
+  return generic_extent_callback (unsmob<Grob> (smob), X_AXIS);
 }
 
 MAKE_SCHEME_CALLBACK (Rest, height, 1);
 SCM
 Rest::height (SCM smob)
 {
-  return generic_extent_callback (Grob::unsmob (smob), Y_AXIS);
+  return generic_extent_callback (unsmob<Grob> (smob), Y_AXIS);
 }
 
 /*
@@ -295,7 +294,7 @@ Rest::generic_extent_callback (Grob *me, Axis a)
     with ledgered rests.
   */
   SCM m = brew_internal_stencil (me, a != X_AXIS);
-  return ly_interval2scm (Stencil::unsmob (m)->extent (a));
+  return ly_interval2scm (unsmob<Stencil> (m)->extent (a));
 }
 
 MAKE_SCHEME_CALLBACK (Rest, pure_height, 3);
@@ -304,9 +303,9 @@ Rest::pure_height (SCM smob,
                    SCM /* start */,
                    SCM /* end */)
 {
-  Grob *me = Grob::unsmob (smob);
+  Grob *me = unsmob<Grob> (smob);
   SCM m = brew_internal_stencil (me, false);
-  return ly_interval2scm (Stencil::unsmob (m)->extent (Y_AXIS));
+  return ly_interval2scm (unsmob<Stencil> (m)->extent (Y_AXIS));
 }
 
 ADD_INTERFACE (Rest,