lilypond-devel
[Top][All Lists]
Advanced

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

Inserting a grob into a Spanner NOT at last position


From: Reinhold Kainhofer
Subject: Inserting a grob into a Spanner NOT at last position
Date: Tue, 16 Mar 2010 15:46:22 +0100
User-agent: KMail/1.13.1 (Linux/2.6.31-20-generic; KDE/4.4.1; i686; ; )

In the Figured_bass_engraver, I have a BassFigureAlignment spanner, where 
Align_interface::add_element is used to append new figures. However, with 
extenders turned on, it happens frequently that a new figure needs to be 
inserted into the spanner at some fixed position (e.g. the beginning). 

AFAICS, Align_interface::add_element always appends the newly inserted grob 
and places it at the bottom. I could not find any way how to insert a grob at 
a specified position (e.g. at the beginning rathen than at the end, or before 
another specified grob).

AFAICS, Align_interface::add_element basically propagates the new grob to 
Pointer_group_interface::add_grob, where it is appended to the Grob_array 
(stored as the 'elements object of the spanner). 

So, how can I insert a grob at some other position?

1) Shall I simply append it using add_element and then try to extract the 
'elements object and manually try to reorder afterwards?

2) Shall I not add any grobs to the spanner, until I know all of the required 
grobs and their order (which means that the objects will be inserted at a 
later time step, when all spanners are finished; would this be a problem, or 
does the current time step not have any effect on the spanner?)

3) Is there any other way to force a given ordering of the grobs inserted into 
a spanner?

Thanks a lot,
Reinhold
-- 
------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org




reply via email to

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