+2006-06-10 Graham Percival <gpermus@gmail.com>
+
+ * Documentation/user/programming-interfaces.itely: add
+ info from NEWS.
+
+ * python/convertrules.py: add annotatefoo -> annotate-foo
+ rules.
+
2006-06-10 Han-Wen Nienhuys <hanwen@lilypond.org>
* HACKING: trim outdated info.
* input/regression/page-spacing.ly,
input/regression/page-layout-manual-position.ly: idem
-
2006-06-09 Han-Wen Nienhuys <hanwen@lilypond.org>
* lily/line-spanner.cc: cleanup property list.
* Building complicated functions::
* Markup programmer interface::
* Contexts for programmers::
+* Scheme procedures as properties::
@end menu
(set! (ly:grob-property grob 'transparent) #t)))
@end example
+
+@node Scheme procedures as properties
+@section Scheme procedures as properties
+
+Properties (like thickness, direction, etc.) can be set at fixed values
+with \override, e.g.
+
+@example
+\override Stem #'thickness = #2.0
+@end example
+
+Properties can also be set to a Scheme procedure,
+
+@lilypond[fragment,verbatim,quote,relative=2]
+\override Stem #'thickness = #(lambda (grob)
+ (if (= UP (ly:grob-property grob 'direction))
+ 2.0
+ 7.0))
+c b a g b a g b
+@end lilypond
+
+Procedures may also be combined like that with
+"grob closure". Here is a setting from
+@code{AccidentalSuggestion},
+
+@example
+(X-offset . ,(ly:make-simple-closure
+ `(,+
+ ,(ly:make-simple-closure (list ly:self-alignment-interface::centered-on-x-parent))
+ ,(ly:make-simple-closure (list ly:self-alignment-interface::x-aligned-on-self)))))
+@end example
+
+
return str
conversions.append (((2, 9, 6), conv, """\context Foo \applyOutput #bla -> \applyOutput #'Foo #bla """))
+
+
+def conv (str):
+ str = re.sub ('annotatepage', 'annotate-page', str)
+ str = re.sub ('annotateheaders', 'annotate-headers', str)
+ str = re.sub ('annotatesystems', 'annotate-systems', str)
+ return str
+
+conversions.append (((2, 9, 9), conv, """annotatefoo -> annotate-foo"""))
+
+