From: Han-Wen Nienhuys <hanwen@xs4all.nl>
Date: Wed, 3 Jan 2007 18:33:28 +0000 (+0100)
Subject: add Rest::pure_height
X-Git-Tag: release/2.10.8-1~1
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b3a7e05831ed3f657cc8f17ad8c9a0796f904cf5;p=lilypond.git

add Rest::pure_height
---

diff --git a/lily/include/rest.hh b/lily/include/rest.hh
index 357b76bcb2..844fbaa414 100644
--- a/lily/include/rest.hh
+++ b/lily/include/rest.hh
@@ -25,5 +25,6 @@ public:
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (width, (SCM));
   DECLARE_SCHEME_CALLBACK (height, (SCM));
+  DECLARE_SCHEME_CALLBACK (pure_height, (SCM, SCM, SCM));
 };
 #endif // REST_HH
diff --git a/lily/rest.cc b/lily/rest.cc
index d7351d648a..a976cae914 100644
--- a/lily/rest.cc
+++ b/lily/rest.cc
@@ -185,13 +185,25 @@ Rest::generic_extent_callback (Grob *me, Axis a)
   SCM m = brew_internal_stencil (me, a != X_AXIS);
   return ly_interval2scm (unsmob_stencil (m)->extent (a));
 }
+MAKE_SCHEME_CALLBACK (Rest, pure_height, 3);
+SCM
+Rest::pure_height (SCM smob, SCM start, SCM end)
+{
+  (void) start;
+  (void) end;
+  
+  Grob *me = unsmob_grob (smob);
+  SCM m = brew_internal_stencil (me, false);
+  return ly_interval2scm (unsmob_stencil (m)->extent (Y_AXIS));
+}
 
 ADD_INTERFACE (Rest, "rest-interface",
 	       "A rest symbol.",
 
 	       /* properties */
 		  
-	       "style "
 	       "direction "
-	       "minimum-distance");
+	       "minimum-distance "
+	       "style "
+	       );
 
diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm
index 70750b7746..f39343b904 100644
--- a/scm/define-grobs.scm
+++ b/scm/define-grobs.scm
@@ -642,13 +642,6 @@
 	(self-alignment-X . 0)
 	(self-alignment-Y . 0)
 	(script-priority . 100)
-
-	(after-line-breaking . ,(lambda (grob)
-				  (display (list
-					    (ly:grob-extent grob (ly:grob-parent grob X) X)
-					    " " 
-					    (ly:grob-relative-coordinate grob (ly:grob-parent grob X) X) "\n")))) 
-					    
 	(stencil . ,ly:text-interface::print)
 	(direction . ,ly:script-interface::calc-direction)
 	(text . ,fingering::calc-text) 
@@ -2088,6 +2081,7 @@
   (list
    `(,ly:slur::outside-slur-callback . ,ly:slur::pure-outside-slur-callback)
    `(,ly:stem::height . ,ly:stem::pure-height)
+   `(,ly:rest::height . ,ly:rest::pure-height)
    `(,ly:grob::stencil-height . ,pure-stencil-height)
    `(,ly:side-position-interface::y-aligned-side . ,ly:side-position-interface::pure-y-aligned-side)
    `(,ly:axis-group-interface::height . ,ly:axis-group-interface::pure-height)
@@ -2097,7 +2091,6 @@
 
 (define pure-functions
   (list
-   ly:rest::height
    ly:staff-symbol-referencer::callback
    ly:staff-symbol::height))