Han-Wen Nienhuys <hanwenn <at> gmail.com> writes: > I think it is a much clearer abstraction to decide that each property > can only be evaluated once, and that everything should be driven by > callbacks. In fact, one thing I would suggest looking at is removing > {before,after}_line_breaking which breaks this model somewhat. >
Should that apply to properties that describe positioning of objects? Often LilyPond needs tentative positions for objects. For example, when setting note-spacing constraints, the separation of staves is taken to be large enough that items do not interfere between staves. The widths of text items are ignored, based on their extra-spacing-* properties. Rests avoiding beams have a tentative position. Some repeated accidentals on tied notes exist, but may disappear. The note-spacing code uses skylines, which depend on positions for the enclosed objects, and wants tentative positions appropriate to this phase of layout. One way to organize these phases of layout is by registering callbacks to be performed (or maybe in future reset) between phases: before/after-line-breaking. The alternative organizational method in the code today is religious observance: for it is written, On the day of Note-Spacing, thou shalt avert thine eyes from the stems, for stems keep the company of beams, and beams are impure, thus to seek knowledge of the tip of a stem would be impure. _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel