Citat Han-Wen Nienhuys <[EMAIL PROTECTED]>:

> origin_trans_l
> will give you the path of the translators, i.e. Engraver, Thread,
> Voice, Staff (if this == Staff)

Okay, traverse upwards with daddy_trans_l until I reach the Staff, I see.
My question was more like: How do I know when I reach the staff?  I.e. Will the 
following (untested) code be too slow - testing aliasses on all levels? It has 
to be done for each and every accidental...

while ((!mytranslator.is_alias_b("Staff")) && mytranslator->daddy_trans_l_)
  mycontext = mycontext->daddy_trans_l_;

The good thing about doing so, ofcourse, would be that we could allow for the 
very nice and understandable accidental definitions a'la

\property Score.autoAccidentals = #'((measure-same-octave 0 Voice) (measure-
same-octave 0 Staff))

To typeset the union of the accidenals of the old engraver in voice context and 
the old engraver in staff context.
I think I go for it and hope that it doesn't slow down lilypond too much.

-Rune

_______________________________________________
Lilypond-devel mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to