lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: API for getting various kinds of grobs


From: Janek Warchoł
Subject: Re: API for getting various kinds of grobs
Date: Thu, 14 Mar 2013 00:33:17 +0100

Hi Xavier, Joe,

On Wed, Mar 13, 2013 at 12:05 AM, Xavier Scheuer <address@hidden> wrote:
> I'm not a developer, so my question might be stupid, but
>
> Can't you use existing "break-alignable-interface",
> "break-aligned-interface" and "break-alignment-interface" and
> *expand* a property like "break-align-symbols" to support grobs like
> NoteColumn, NoteHead, Stem, StaffSymbol, XYparent, etc.?
>
> \override LyricText #'break-align-symbols = #'(note-head stem staff-bar clef)

>From Joe's email it seems that this is a valid approach :)


On Wed, Mar 13, 2013 at 12:27 AM, Joe Neeman <address@hidden> wrote:
> The easiest way to define get_grob is to make 'align-to a list of symbols,
> which you interpret as a path from the current grob to the grob you want to
> align it to. For example, if me is NoteHead and 'align-to is '(X-parent,
> stem) then you go from "me" to
> me->get_object("X-parent")->get_object("stem").
>
> The disadvantage of this approach is that you ask users to know about which
> grobs have references to which other grobs; IIRC, this is not in the user
> documentation right now.

Is there any place with such information?  I don't recall seeing
anything like that.  It would be useful.

> Another possible approach is to do something
> similar to how BreakAlignment works. The disadvantages with that are (1)
> it's more work and (2) you have to decide in advance on all valid values for
> 'align-to.

I'll look into it.

thanks,
Janek



reply via email to

[Prev in Thread] Current Thread [Next in Thread]