On Aug 19, 2011, at 9:51 AM, Keith OHara wrote: > > You mean your new 'bound-alignment-interfaces. I didn't follow issue 620, > but looking now I don't see how it helps. We would want to find the left > extent of the note-heads in the main note column, excluding suspended > note-heads. (Actually, I think that is the x-reference point for the > NoteColumn) > >
Imagine that bound interfaces were not a list but rather a lazy alist of interfaces and callbacks. For example: `((clef-interface . ,my-clef-interface-callback) (key-signature-interface . ,(ly:simple-closure ,my-key-signature-callback-that-needs-an-extra-argument 1)) bar-line-interface) Lazy alist because it can also contain non-pairs, in which case a default extent callback along a given axis is used as the callback. The axis group interface recurses through this list, applying the callback to grobs that contain interfaces in the alist to get the extent of that grob according to the callback. So, now, say that you want to align to a note column a particular way for piano-pedal-brackets. The bound-alignment-interfaces alist would look like: `((note-column-interface . ,my-note-column-callback-specific-to-piano-pedal-brackets)) And my-note-column-callback would be something to the effect of: #(define (my-note-column-callback-specific-to-piano-pedal-brackets grob) exclude-all-left-noteheads-from-extent) This seems swiss-army-knife tweakable: it generalizes the problem of finding different extents for the same grob depending on the grob that needs to be aligned by rolling all extent-finding callbacks into an alist (not unlike the concept of grob properties in the first place). Cheers, MS _______________________________________________ lilypond-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-devel
