source file of the GNU LilyPond music typesetter
- (c) 1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
virtual ~Staff_symbol_engraver ();
virtual void acknowledge_grob (Grob_info);
virtual void finalize ();
- virtual void initialize ();
+ virtual void process_music ();
};
}
void
-Staff_symbol_engraver::initialize ()
+Staff_symbol_engraver::process_music ()
{
- span_ = new Spanner (get_property ("StaffSymbol"));
+ if (!span_)
+ {
+ span_ = make_spanner ("StaffSymbol");
- span_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn")));
+ span_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn")));
- announce_grob(span_, SCM_EOL);
+ announce_grob(span_, SCM_EOL);
+ }
}
void
Staff_symbol_engraver::finalize ()
{
- span_->set_bound (RIGHT,unsmob_grob (get_property ("currentCommandColumn")));
- typeset_grob (span_);
+ if (span_)
+ {
+ span_->set_bound (RIGHT,unsmob_grob (get_property ("currentCommandColumn")));
+ typeset_grob (span_);
+ }
span_ =0;
}
ENTER_DESCRIPTION(Staff_symbol_engraver,
-/* descr */ "create the constellation of five (default)
-staff lines.",
+/* descr */ "create the constellation of five (default) "
+"staff lines.",
/* creats*/ "StaffSymbol",
-/* accepts */ "general-music",
+/* accepts */ "",
/* acks */ "grob-interface",
/* reads */ "",
/* write */ "");