From: James Lowe Date: Tue, 24 Dec 2013 06:32:16 +0000 (+0000) Subject: Doc: Extending addition about calling stencil func X-Git-Tag: release/2.19.0-1~24 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b5e0e268262c7bde54dc22564ec97e8797d558c4;p=lilypond.git Doc: Extending addition about calling stencil func Issue 3669 Came out of: http://lists.gnu.org/archive/html/lilypond-user/2013-11/msg00587.html Text based on Keith OHara's suggestions Indicate that it is possible to call the stencil function in a user's own override of the stencil property --- diff --git a/Documentation/extending/programming-interface.itely b/Documentation/extending/programming-interface.itely index 6b16fdafbc..945a44aefe 100644 --- a/Documentation/extending/programming-interface.itely +++ b/Documentation/extending/programming-interface.itely @@ -1251,6 +1251,19 @@ Properties that typically use callbacks include The procedure always takes a single argument, being the grob. +That procedure may access the usual value of the property, by first +calling the function that is the usual callback for that property, which +can by found in the Internals Reference or the file 'define-grobs.scm': + +@example +\relative c'' @{ + \override Flag #'X-offset = #(lambda (flag) + (let ((default (ly:flag::calc-x-offset flag))) + (* default 4.0))) + c4. d8 a4. g8 +@} +@end example + If routines with multiple arguments must be called, the current grob can be inserted with a grob closure. Here is a setting from @code{AccidentalSuggestion},