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"
#include "engraver.hh"
#include "engraver-group-engraver.hh"
#include "warn.hh"
+#include "context.hh"
/**
Put stuff in a Spanner with an Axis_group_interface.
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_);
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_);
}
}
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 */ "",