2 span-bar.cc -- implement Span_bar
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
10 #include "span-bar.hh"
13 #include "paper-def.hh"
14 #include "molecule.hh"
15 #include "vertical-align-elem.hh"
21 spanning_l_arr_.push(b);
28 Span_bar::do_substitute_dependency(Score_elem*o, Score_elem*n)
31 if (o->is_type_b(Bar::static_name() ))
32 bold = (Bar*)o->item();
38 if (n && n->is_type_b(Bar::static_name() )) {
43 spanning_l_arr_.substitute( bold , b);
48 Span_bar::set(Vertical_align_element *a)
55 Span_bar::do_pre_processing()
57 if ( spanning_l_arr_.size () < 1) {
58 transparent_b_ = true;
61 type_str_ = spanning_l_arr_[0]->type_str_;
70 Span_bar::brew_molecule_p()const
73 for (int i=0; i < spanning_l_arr_.size(); i++)
74 y.unite( spanning_l_arr_[i]->height() );
75 Symbol s = paper()->lookup_l()->bar(type_str_, y.length());
76 Molecule*output = new Molecule(Atom(s));
77 output->translate_y ( y[-1] );
82 IMPLEMENT_STATIC_NAME(Span_bar);
83 IMPLEMENT_IS_TYPE_B1(Span_bar,Bar);