2 axis-group-engraver.cc -- implement Axis_group_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
9 #include "axis-group-engraver.hh"
10 #include "axis-group-spanner.hh"
13 Axis_group_engraver::Axis_group_engraver ()
19 Axis_group_engraver::do_creation_processing ()
21 staffline_p_ = get_spanner_p ();
22 staffline_p_->set_axes (Y_AXIS, Y_AXIS);
23 staffline_p_->set_bounds(LEFT,get_staff_info().command_pcol_l ());
24 announce_element (Score_element_info (staffline_p_, 0));
28 Axis_group_engraver::get_spanner_p () const
30 return new Axis_group_spanner;
33 Axis_group_engraver::do_removal_processing ()
35 staffline_p_->set_bounds(RIGHT,get_staff_info().command_pcol_l ());
36 typeset_element (staffline_p_);
41 Axis_group_engraver::acknowledge_element (Score_element_info i)
43 if (!i.elem_l_->parent_l (Y_AXIS))
45 elts_.push (i.elem_l_);
50 Axis_group_engraver::process_acknowledged ()
52 for (int i=0; i < elts_.size (); i++)
54 if (!elts_[i]->parent_l (Y_AXIS))
55 staffline_p_->add_element (elts_[i]);
60 ADD_THIS_TRANSLATOR(Axis_group_engraver);