[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Get context from a Grob
From: |
Carl Sorensen |
Subject: |
Get context from a Grob |
Date: |
Fri, 21 Oct 2016 14:39:57 +0000 |
After way too much calendar time (I have very little time for working on
LilyPond -- either development or music) I have come up with an architecture
that I think will work well with the dot-column problem.
I want to move the dot-column calculation to a Scheme procedure. This will
facilitate users creating their own algorithm for allocating dots if they don't
like either of the two procedures I will provide (one is Gould, the other is
what was wanted by the lists in our discussion about it).
In order to do this, I need a property that holds the procedure used to format
the dot column. When I did a similar thing with fretboards, I made a context
property and used that for the procedure. I thought I could do this here.
However, when I'm formatting the dot column, I'm not in an engraver. I'm in a
Scheme callback (Dot_column::calc_positioning_done). As far as I can see, I
only have a Grob, not a Grob_info available. So I don't see a way to get a
pointer to
the context.
Is there any way to get the context from a Grob in C++?
If there isn't a way to do this, I can create a grob property, and use that.
But I think it would be cleaner to use a context property.
Thanks in advance for any help.
Carl
- Get context from a Grob,
Carl Sorensen <=