|
From: | Joe Neeman |
Subject: | Re: API for getting various kinds of grobs |
Date: | Tue, 12 Mar 2013 16:27:11 -0700 |
What i would like: specify the reference grob in a property, for example
\override LyricText #'align-to = #'Stem
and then have one callback function that would be smart enough to find
appropriate grob to use and feed it to the method calculating
alignment.
The callback would probably look like this:
MAKE_SCHEME_CALLBACK (Self_alignment_interface, x_aligned, 1)
SCM
Self_alignment_interface::x_aligned (SCM smob)
{
Grob *me = unsmob_grob (smob);
what_to_align_to = me->internal_get_property (ly_symbol2scm ("align-to"))
return general_alignment (me, me->get_grob (what_to_align_to), X_AXIS);
}
The magic lies in writing get_grob. I know that there is a function
called get_object, but i'll probably have to modify it.
[Prev in Thread] | Current Thread | [Next in Thread] |