lilypond-1.4.4
[lilypond.git] / lily / line-group-grav.cc
blob0ae8eca24e9e0817b7d67452bd2197e123abbf74
1 /*
2 staff-gravs.cc -- implement Line_group_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
9 #include "staff-sym.hh"
10 #include "vertical-group-spanner.hh"
11 #include "command-request.hh"
12 #include "bar.hh"
13 #include "debug.hh"
14 #include "line-group-grav.hh"
15 #include "p-col.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 if (!elem.elem_l_->axis_group_l_a_[Y_AXIS])
26 staffline_p_->add_element (elem.elem_l_);
30 void
31 Line_group_engraver::do_removal_processing()
33 staffline_p_->set_bounds(RIGHT,get_staff_info().command_pcol_l ());
34 typeset_element (staffline_p_);
35 staffline_p_ = 0;
38 void
39 Line_group_engraver::do_creation_processing()
41 create_line_spanner ();
42 staffline_p_->set_bounds(LEFT,get_staff_info().command_pcol_l ());
44 // don't broadcast to self.
45 announce_element (Score_elem_info (staffline_p_,0));
48 void
49 Line_group_engraver::create_line_spanner ()
51 staffline_p_ = new Vertical_group_spanner ;
56 IMPLEMENT_IS_TYPE_B1(Line_group_engraver,Engraver);
57 ADD_THIS_TRANSLATOR(Line_group_engraver);