2 separating-line-group-grav.cc -- implement Separating_line_group_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1998--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #include "separating-line-group-engraver.hh"
11 #include "separating-group-spanner.hh"
12 #include "single-malt-grouping-item.hh"
13 #include "paper-column.hh"
14 #include "paper-def.hh"
16 Separating_line_group_engraver::Separating_line_group_engraver ()
24 Separating_line_group_engraver::do_creation_processing ()
26 sep_span_p_
= new Separating_group_spanner
;
27 announce_element (Score_element_info (sep_span_p_
, 0));
28 sep_span_p_
->set_bounds (LEFT
, get_staff_info ().command_pcol_l ());
32 Separating_line_group_engraver::do_removal_processing ()
34 sep_span_p_
->set_bounds (RIGHT
, get_staff_info ().command_pcol_l ());
35 typeset_element (sep_span_p_
);
40 Separating_line_group_engraver::acknowledge_element (Score_element_info i
)
42 Item
* it
= dynamic_cast <Item
*> (i
.elem_l_
);
43 if (it
&& !it
->parent_l (X_AXIS
))
45 bool ib
=it
->breakable_b ();
46 Single_malt_grouping_item
*&p_ref_ (ib
? break_malt_p_
51 p_ref_
= new Single_malt_grouping_item
;
53 p_ref_
->set_elt_property ("breakable", SCM_BOOL_T
);
54 announce_element (Score_element_info (p_ref_
, 0));
56 p_ref_
->add_item (it
);
61 Separating_line_group_engraver::do_pre_move_processing ()
65 sep_span_p_
->add_spacing_unit (break_malt_p_
);
67 typeset_element (break_malt_p_
);
72 sep_span_p_
->add_spacing_unit (nobreak_malt_p_
);
73 typeset_element (nobreak_malt_p_
);
80 ADD_THIS_TRANSLATOR( Separating_line_group_engraver
);