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"
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 Scalar sz (get_property ("postBreakPadding", 0));
35 if (!sz.empty_b () && sz.isnum_b ())
37 sep_span_p_->padding_f_ = Real(sz);
41 sep_span_p_->padding_f_ = 1.5 * paper_l ()->get_realvar (interline_scm_sym);
44 sep_span_p_->set_bounds (RIGHT, get_staff_info ().command_pcol_l ());
45 typeset_element (sep_span_p_);
50 Separating_line_group_engraver::acknowledge_element (Score_element_info i)
52 Item * it = dynamic_cast <Item *> (i.elem_l_);
53 if (it && !it->parent_l (X_AXIS))
55 bool ib =it->breakable_b ();
56 Single_malt_grouping_item *&p_ref_ (ib ? break_malt_p_
61 p_ref_ = new Single_malt_grouping_item;
63 p_ref_->set_elt_property (breakable_scm_sym, SCM_BOOL_T);
64 announce_element (Score_element_info (p_ref_, 0));
66 p_ref_->add_item (it);
71 Separating_line_group_engraver::do_pre_move_processing ()
75 sep_span_p_->add_spacing_unit (break_malt_p_);
77 typeset_element (break_malt_p_);
82 sep_span_p_->add_spacing_unit (nobreak_malt_p_);
83 typeset_element (nobreak_malt_p_);
90 ADD_THIS_TRANSLATOR( Separating_line_group_engraver);