lilypond-1.5.9
[lilypond.git] / lily / staff-gravs.cc
blob55c148f471ec361deb032c117b0be8bfd7325f05
1 /*
2 staff-gravs.cc -- implement Line_group_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
9 #include "staff-sym.hh"
10 #include "staff-gravs.hh"
11 #include "command-request.hh"
12 #include "bar.hh"
13 #include "debug.hh"
14 #include "staffline.hh"
17 Line_group_engraver::Line_group_engraver()
19 staffline_p_ =0;
22 void
23 Line_group_engraver::acknowledge_element(Score_elem_info elem)
25 staffline_p_->add_element(elem.elem_l_);
29 void
30 Line_group_engraver::do_removal_processing()
32 staffline_p_->right_col_l_ = get_staff_info().command_pcol_l();
33 typeset_element(staffline_p_);
34 staffline_p_ = 0;
37 void
38 Line_group_engraver::do_creation_processing()
40 staffline_p_ = new Line_of_staff;
41 staffline_p_->left_col_l_ = get_staff_info().command_pcol_l();
43 // don't broadcast to self.
44 announce_element(Score_elem_info(staffline_p_,0));
48 IMPLEMENT_STATIC_NAME(Line_group_engraver);
49 IMPLEMENT_IS_TYPE_B1(Line_group_engraver,Engraver);
50 ADD_THIS_ENGRAVER(Line_group_engraver);