2 staff-side.cc -- implement Staff_side
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
10 #include "paper-def.hh"
12 #include "staff-side.hh"
13 #include "staff-sym.hh"
17 Staff_side::Staff_side()
20 sym_int_ = Interval (0,0);
22 inside_staff_b_ = false;
27 Staff_side::support_height() const
30 for (int i=0; i < support_l_arr_.size(); i++)
32 Axis_group_element *common =
33 common_group (support_l_arr_[i], Y_AXIS);
35 Real y = support_l_arr_[i]->relative_coordinate (common, Y_AXIS)
36 -relative_coordinate (common,Y_AXIS);
38 y_int.unite (y + support_l_arr_[i]->height());
44 y_int = Interval (0,0);
50 Staff_side::add_support (Score_elem*i)
52 support_l_arr_.push (i);
57 Staff_side::get_position_f () const
61 warning (_("Staff_side::get_position_f(): "
62 "somebody forgot to set my vertical direction, returning -20"));
68 Real inter_f = paper()-> internote_f ();
70 Interval v= support_height();
71 y = v[dir_] + 2 * dir_ * inter_f; // ugh
77 Staff_side::symbol_height() const
79 return Interval (0,0);
83 Staff_side::do_post_processing()
85 sym_int_ = symbol_height();
86 y_ = get_position_f();
88 y_ += - sym_int_[-dir_];
92 Staff_side::do_substitute_dependency (Score_elem*o, Score_elem*n)
94 support_l_arr_.unordered_substitute (o,n);
98 IMPLEMENT_IS_TYPE_B1(Staff_side, Score_elem);