lilypond-1.3.7
[lilypond.git] / lily / span-score-bar-grav.cc
blob8497cdc7c11f751d300cde661c2037d8bf8dfe27
1 /*
2 span-score-bar-grav.cc -- implement Span_score_bar_engraver,
3 Piano_bar_engraver and Staff_group_bar_engraver
5 source file of the GNU LilyPond music typesetter
7 (c) 1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
8 */
10 #include "span-score-bar.hh"
11 #include "span-score-bar-grav.hh"
14 Span_bar*
15 Span_score_bar_engraver::get_span_bar_p () const
17 Span_bar*s = new Span_score_bar;
18 s->break_priority_i_ = -4;
20 return s;
25 IMPLEMENT_IS_TYPE_B1 (Span_score_bar_engraver, Span_bar_engraver);
26 IMPLEMENT_IS_TYPE_B1 (Piano_bar_engraver, Span_score_bar_engraver);
27 IMPLEMENT_IS_TYPE_B1 (Staff_group_bar_engraver, Span_score_bar_engraver);
29 Span_bar*
30 Piano_bar_engraver::get_span_bar_p () const
32 Span_bar *s= new Piano_brace;
33 s->break_priority_i_ = -4;
34 return s;
37 Span_bar*
38 Staff_group_bar_engraver::get_span_bar_p () const
40 Span_bar *s= new Staff_bracket;
41 s->break_priority_i_ = -4;
42 return s;
45 void
46 Staff_group_bar_engraver::acknowledge_element (Score_elem_info f)
48 Span_bar_engraver::acknowledge_element (f);
49 if (f.elem_l_->is_type_b (Piano_brace::static_name ()))
51 // Piano_brace * brace = (Piano_brace*) f.elem_l_->item ()->bar ();
52 // do something.
56 ADD_THIS_TRANSLATOR (Piano_bar_engraver);
57 ADD_THIS_TRANSLATOR (Staff_group_bar_engraver);
58 ADD_THIS_TRANSLATOR (Span_score_bar_engraver);