DECLARE_SCHEME_CALLBACK (centered_on_note_columns, (SCM element));
DECLARE_SCHEME_CALLBACK (centered_on_x_parent, (SCM element));
DECLARE_SCHEME_CALLBACK (centered_on_y_parent, (SCM element));
- DECLARE_SCHEME_CALLBACK (x_centered_on_y_parent, (SCM element));
DECLARE_SCHEME_CALLBACK (aligned_on_x_parent, (SCM element));
DECLARE_SCHEME_CALLBACK (aligned_on_y_parent, (SCM element));
};
{
Side_position_interface::add_support (numbers_[i], mmrest_);
numbers_[i]->set_parent (mmrest_, Y_AXIS);
+ numbers_[i]->set_parent (mmrest_, X_AXIS);
}
start_measure_
percent_counter_->set_bound (LEFT, col);
Side_position_interface::add_support (percent_counter_, percent_);
percent_counter_->set_parent (percent_, Y_AXIS);
+ percent_counter_->set_parent (percent_, X_AXIS);
}
else
percent_counter_ = 0;
return centered_on_object (unsmob_grob (smob)->get_parent (Y_AXIS), Y_AXIS);
}
-MAKE_SCHEME_CALLBACK (Self_alignment_interface, x_centered_on_y_parent, 1);
-SCM
-Self_alignment_interface::x_centered_on_y_parent (SCM smob)
-{
- return centered_on_object (unsmob_grob (smob)->get_parent (Y_AXIS), X_AXIS);
-}
-
MAKE_SCHEME_CALLBACK (Self_alignment_interface, aligned_on_x_parent, 1);
SCM
Self_alignment_interface::aligned_on_x_parent (SCM smob)
/*
Set the items that this spanner spans. If D == LEFT, we also set the
X-axis parent of THIS to S.
+
+ For example, when a slur crosses a line break, it's broken into two
+ pieces. The second piece shouldn't be positioned relative to the
+ original NoteColumn, but rather to the PaperColumn after the break.
*/
void
Spanner::set_bound (Direction d, Grob *s)
We check for System to prevent the column -> line_of_score
-> column -> line_of_score -> etc situation */
if (d == LEFT && !dynamic_cast<System *> (this))
- set_parent (i, X_AXIS);
+ /*
+ If the X-parent is a spanner, it will be split across linebreaks, too,
+ so we shouldn't have to overwrite it with the bound. Also, we need
+ original parent for alignment.
+ This happens e.g. for MultiMeasureRestNumbers and PercentRepeatCounters.
+ */
+ if (!dynamic_cast <Spanner *> (this->get_parent (X_AXIS)))
+ set_parent (i, X_AXIS);
/*
Signal that this column needs to be kept alive. They need to be
(X-offset . ,(ly:make-simple-closure
`(,+
,(ly:make-simple-closure
- (list ly:self-alignment-interface::centered-on-y-parent))
+ (list ly:self-alignment-interface::centered-on-x-parent))
,(ly:make-simple-closure
(list ly:self-alignment-interface::x-aligned-on-self)))))
(Y-offset . ,side-position-interface::y-aligned-side)
,(ly:make-simple-closure
(list ly:self-alignment-interface::x-aligned-on-self))
,(ly:make-simple-closure
- (list ly:self-alignment-interface::x-centered-on-y-parent)))))
+ (list ly:self-alignment-interface::centered-on-x-parent)))))
(Y-offset . ,side-position-interface::y-aligned-side)
(vertical-skylines . ,grob::unpure-vertical-skylines-from-stencil)
(Y-extent . ,grob::always-Y-extent-from-stencil)
(X-offset . ,(ly:make-simple-closure
`(,+
,(ly:make-simple-closure
- (list ly:self-alignment-interface::x-centered-on-y-parent))
+ (list ly:self-alignment-interface::centered-on-x-parent))
,(ly:make-simple-closure
(list ly:self-alignment-interface::x-aligned-on-self)))))
(Y-offset . ,side-position-interface::y-aligned-side)
(X-offset . ,(ly:make-simple-closure
`(,+
,(ly:make-simple-closure
- (list ly:self-alignment-interface::x-centered-on-y-parent))
+ (list ly:self-alignment-interface::centered-on-x-parent))
,(ly:make-simple-closure
(list ly:self-alignment-interface::x-aligned-on-self)))))
(Y-offset . ,side-position-interface::y-aligned-side)