lilypond-1.3.67
[lilypond.git] / lily / line-group-group-engraver.cc
blobc6e6f7c58dcdc05836325bb70c90dac250f72c9b
1 /*
2 staff-gravs.cc -- implement Line_group_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
9 #include "staff-symbol.hh"
10 #include "command-request.hh"
11 #include "bar.hh"
12 #include "debug.hh"
13 #include "line-group-group-engraver.hh"
14 #include "paper-column.hh"
15 #include "axis-group-interface.hh"
18 Line_group_engraver_group::Line_group_engraver_group()
20 staffline_p_ =0;
24 void
25 Line_group_engraver_group::typeset_element (Score_element *elem)
27 if (!elem->parent_l (Y_AXIS))
28 Axis_group_interface (staffline_p_).add_element (elem);
29 Engraver_group_engraver::typeset_element (elem);
33 void
34 Line_group_engraver_group::do_removal_processing()
36 Engraver_group_engraver::do_removal_processing ();
37 Score_element * it
38 = unsmob_element (get_property (ly_symbol2scm ("currentCommandColumn")));
40 Pointer_group_interface (it, "bounded-by-me").add_element (staffline_p_);
41 staffline_p_->set_bound(RIGHT,it);
42 Engraver_group_engraver::typeset_element (staffline_p_);
43 staffline_p_ = 0;
46 void
47 Line_group_engraver_group::do_creation_processing()
49 create_line_spanner ();
50 Score_element * it
51 = unsmob_element (get_property (ly_symbol2scm ("currentCommandColumn")));
52 staffline_p_->set_bound(LEFT,it);
53 Pointer_group_interface (it, "bounded-by-me").add_element (staffline_p_);
55 Engraver::announce_element (Score_element_info (staffline_p_,0));
58 void
59 Line_group_engraver_group::create_line_spanner ()
61 staffline_p_ = new Spanner (SCM_EOL);
62 Axis_group_interface (staffline_p_).set_interface ();
63 Axis_group_interface (staffline_p_).set_axes (Y_AXIS,Y_AXIS);
69 ADD_THIS_TRANSLATOR(Line_group_engraver_group);