]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/axis-group-engraver.cc
(music_property_def): oops. SCM_UNDEFINED
[lilypond.git] / lily / axis-group-engraver.cc
index 0997081c8e23e6b5a41222c687bf4c01a6cda12a..65d2aac84cdd67c37268216d7b1ce2cba5299c21 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 1999--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1999--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
  */
 
 #include "spanner.hh"
@@ -12,6 +12,7 @@
 #include "engraver.hh"
 #include "engraver-group-engraver.hh"
 #include "warn.hh"
+#include "context.hh"
 
 /**
    Put stuff in a Spanner with an Axis_group_interface.
@@ -66,34 +67,24 @@ void
 Axis_group_engraver::finalize ()
 {
   if (!staffline_)
-    {
-      programming_error ("Huh? This context never lived?");
-      return ;
-    }
+    return ;
   
-  String type = get_daddy_grav ()->context_name ();
+  String type = daddy_context_->context_name ();
   SCM dims = get_property ("verticalExtent");
   
-  if (gh_pair_p (dims) && gh_number_p (ly_car (dims))
-      && gh_number_p (ly_cdr (dims)))
-    {
-      staffline_->set_extent (Grob::preset_extent_proc, Y_AXIS);
-      staffline_->set_grob_property ("Y-extent", dims);
-    }
+  if (is_number_pair (dims))
+    staffline_->set_extent (dims, Y_AXIS);
 
   dims = get_property ("minimumVerticalExtent");
-  if (gh_pair_p (dims) && gh_number_p (ly_car (dims))
-      && gh_number_p (ly_cdr (dims)))
+  if (is_number_pair (dims) )
     staffline_->set_grob_property ("minimum-Y-extent", dims);
 
   dims = get_property ("extraVerticalExtent");
-  if (gh_pair_p (dims) && gh_number_p (ly_car (dims))
-      && gh_number_p (ly_cdr (dims)))
+  if (is_number_pair (dims))
     staffline_->set_grob_property ("extra-Y-extent", dims);
 
   Grob *  it = unsmob_grob (get_property ("currentCommandColumn"));
 
-
   staffline_->set_bound (RIGHT,it);
 
   typeset_grob (staffline_);
@@ -181,7 +172,9 @@ void
 Hara_kiri_engraver::acknowledge_grob (Grob_info i)
 {
   Axis_group_engraver::acknowledge_grob (i);
-  if (i.grob_->internal_has_interface (ly_symbol2scm ("rhythmic-grob-interface")))
+  if (i.grob_->internal_has_interface (ly_symbol2scm ("rhythmic-grob-interface"))
+      || i.grob_->internal_has_interface (ly_symbol2scm ("lyric-interface"))
+      )
     {
       Hara_kiri_group_spanner::add_interesting_item (staffline_, i.grob_);
     }
@@ -193,7 +186,7 @@ Hara_kiri_engraver::Hara_kiri_engraver()
 }
 
 ENTER_DESCRIPTION(Hara_kiri_engraver,
-/* descr */       "Like Axis_group_engraver, but make a hara kiri spanner, and add "
+/* descr */       "Like Axis_group_engraver, but make a hara-kiri spanner, and add "
 "interesting items (ie. note heads, lyric syllables and normal rests) ",
 /* creats*/       "RemoveEmptyVerticalGroup",
 /* accepts */     "",