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: Joe Neeman
Subject: Re: API for getting various kinds of grobs
Date: Wed, 13 Mar 2013 16:49:29 -0700




On Wed, Mar 13, 2013 at 4:33 PM, Janek Warchoł <address@hidden> wrote:

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.

Grep for ly:grob? and ly:grob-array? in scm/define-grob-properties.scm. Although they're documented in the same place as properties, the properties with type ly:grob? and ly:grob-array? should actually be part of the object alist, not the property alist (ie. they are accessible with get_object, not get_property). But I'm not sure if the list in scm/define-grob-properties.scm is complete, since the sanity checks in the regression tests only check that things in the /property/ alists are documented. So you may also need to grep the source for set_object and extract_grob_set.

Cheers,
Joe


reply via email to

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