dir_ = CENTER;
to_position_l_ = 0;
set_elt_property (transparent_scm_sym, SCM_BOOL_T);
-
+ staff_support_b_ = true;
axis_ = Y_AXIS;
}
+
void
G_staff_side_item::do_pre_processing ()
{
if (!dir_)
- set_default_direction ();
+ dir_ = get_default_direction ();
if (axis_ == X_AXIS)
position_self ();
}
-void
-G_staff_side_item::set_default_direction ()
+Direction
+G_staff_side_item::get_default_direction () const
{
- dir_ = DOWN;
+ return DOWN;
}
void
G_staff_side_item::position_self ()
{
+
Interval dim;
Dimension_cache *common = 0;
if (support_l_arr_.size ())
dim = Interval(0,0);
common = dim_cache_[axis_].parent_l_;
}
- Interval sym_dim = to_position_l_->extent (axis_);
+
+
+ Interval sym_dim
+ = to_position_l_
+ ? to_position_l_->extent (axis_)
+ : Interval(0,0);
+
Real off = dim_cache_[axis_].relative_coordinate (common);
- SCM pad = remove_elt_property (padding_scm_sym);
+ SCM pad = remove_elt_property (padding_scm_sym);
if (pad != SCM_BOOL_F)
{
- off -= gh_scm2double (SCM_CDR(pad)) * dir_;
+ off += gh_scm2double (SCM_CDR(pad)) * dir_;
}
- dim_cache_[axis_].set_offset (dim[dir_] - sym_dim[-dir_] - off);
+ dim_cache_[axis_].set_offset (dim[dir_] - sym_dim[-dir_] + off);
}
void
void
G_staff_side_item::do_add_processing ()
{
- if (axis_ == Y_AXIS && staff_symbol_l ())
+ if (staff_support_b_
+ && axis_ == Y_AXIS && staff_symbol_l ())
{
add_support (staff_symbol_l ());
}