2 vertical-align-item.cc -- implement Vertical_align_elem
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
9 #include "vertical-align-elem.hh"
10 #include "interval.hh"
13 Vertical_align_element::add(Score_elem*el_l)
15 assert( ! contains_b(el_l));
16 elem_l_arr_.push(el_l);
21 Vertical_align_element::do_substitute_dependency(Score_elem*o,Score_elem*n)
24 while((i = elem_l_arr_.find_i(o))>=0)
31 Vertical_align_element::do_post_processing()
34 for (int i=0; i < elem_l_arr_.size(); i++ ) {
35 Interval y = elem_l_arr_[i]->height() ;
43 for ( int i=0 ; i < elem_l_arr_.size(); i++) {
44 elem_l_arr_[i]->translate_y( - dims[i][1] - where_f);
45 where_f += dims[i].length();
50 Vertical_align_element::contains_b(Score_elem const *e)const
52 return elem_l_arr_.find_l(e);
55 Vertical_align_element::Vertical_align_element()
57 transparent_b_ = true;
61 IMPLEMENT_STATIC_NAME(Vertical_align_element);
62 IMPLEMENT_IS_TYPE_B1(Vertical_align_element, Score_elem);