+2005-11-02 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * ly/spanners-init.ly (assertBeamQuant): use make-simple-closure.
+
2005-11-02 Jan Nieuwenhuizen <janneke@gnu.org>
* lily/main.cc (setup_paths)[__MINGW32__]: Do not assume argv0 is
2005-11-02 Han-Wen Nienhuys <hanwen@xs4all.nl>
- * scm/define-grobs.scm: purge self-[XY]-offset varialbes, replace
+ * Documentation/topdocs/NEWS.tely (Top): document new backend design.
+
+ * scm/define-grobs.scm: purge self-[XY]-offset variables, replace
with simple-closure.
* lily/self-aligment-interface.cc (set_align_self): new function
@itemize @bullet
+@item
+Each grob property may also be a ``grob closure.'' This means that it
+is possible to combine functions. For example, the @code{Y-offset} of
+a @code{InstrumentName} grob is defined to be
+
+@verbatim
+,(ly:make-simple-closure
+ `(,+
+ ,(ly:make-simple-closure (list Self_alignment_interface::y_aligned_on_self))
+ ,(ly:make-simple-closure (list Side_position_interface::y_aligned_on_support_refpoints)))
+@end verbatim
+
+@noindent
+During execution, the @code{Y-offset} of an @code{InstrumentName} is computed
+as
+
+@example
+(+ (Self_alignment_interface::y_aligned_on_self @var{grob})
+ (Self_alignment_interface::y_aligned_on_support_refpoints @var{grob}))
+@end example
+
+
+@item
+Calculation of extent and offset of grob is now controlled via the
+@code{X-extent}, @code{Y-extent}, @code{X-offset} and @code{Y-offset}
+properties, for example
+
+@verbatim
+\override TextScript #'Y-offset = #-6
+@end verbatim
+
+@noindent
+hard codes @code{TextScript} grobs to be 6 spaces below their Y-parent
+grobs.
+
@item
Each grob property can be a procedure. If this is the case, it is
assumed to be a routine that calculates said property. This is a
assertBeamQuant =
#(def-music-function (parser location l r) (pair? pair?)
(make-grob-property-override 'Beam 'positions
- (apply ly:make-callback-chain (check-quant-callbacks l r))))
+ (ly:make-simple-closure
+ (ly:make-simple-closure
+ (append
+ (list chain-grob-member-functions `(,cons 0 0))
+ (check-quant-callbacks l r))))))
% for regression testing purposes.
assertBeamSlope =
#(def-music-function (parser location comp) (procedure?)
(make-grob-property-override 'Beam 'positions
- (apply ly:make-callback-chain (check-slope-callbacks comp))))
-
+ (ly:make-simple-closure
+ (ly:make-simple-closure
+ (append
+ (list chain-grob-member-functions `(,cons 0 0))
+ (check-slope-callbacks comp))))))
+