2 separating-line-group-grav.cc -- implement Separating_line_group_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1998 Han-Wen Nienhuys <hanwen@cs.ruu.nl>
10 #include "separating-line-group-grav.hh"
11 #include "separating-group-spanner.hh"
12 #include "single-malt-grouping-item.hh"
15 Separating_line_group_engraver::Separating_line_group_engraver ()
23 Separating_line_group_engraver::do_creation_processing ()
25 sep_span_p_
= new Separating_group_spanner
;
26 announce_element ( Score_elem_info (sep_span_p_
, 0));
27 sep_span_p_
->set_bounds (LEFT
, get_staff_info ().command_pcol_l ());
31 Separating_line_group_engraver::do_removal_processing ()
33 sep_span_p_
->set_bounds (RIGHT
, get_staff_info ().command_pcol_l ());
34 typeset_element (sep_span_p_
);
39 Separating_line_group_engraver::acknowledge_element (Score_elem_info i
)
41 Item
* it
= i
.elem_l_
->item ();
42 if (it
&& !it
->axis_group_l_a_
[X_AXIS
])
44 Single_malt_grouping_item
*&p_ref_ (it
->breakable_b_
?
45 break_malt_p_
: nobreak_malt_p_
);
49 p_ref_
= new Single_malt_grouping_item
;
50 p_ref_
->breakable_b_
= it
->breakable_b_
;
51 announce_element (Score_elem_info (p_ref_
, 0));
58 Separating_line_group_engraver::do_pre_move_processing ()
62 sep_span_p_
->add_spacing_unit (break_malt_p_
);
64 typeset_element (break_malt_p_
);
69 sep_span_p_
->add_spacing_unit (nobreak_malt_p_
);
70 typeset_element (nobreak_malt_p_
);
76 IMPLEMENT_IS_TYPE_B1 (Separating_line_group_engraver
, Line_group_engraver
);
77 ADD_THIS_TRANSLATOR( Separating_line_group_engraver
);