]> git.donarmstrong.com Git - lilypond.git/commitdiff
(Difficult tweaks):
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 17 Oct 2005 00:38:04 +0000 (00:38 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 17 Oct 2005 00:38:04 +0000 (00:38 +0000)
use callbacks.

ChangeLog
Documentation/user/advanced-notation.itely
Documentation/user/basic-notation.itely
Documentation/user/changing-defaults.itely
scm/document-translation.scm

index 1bf3a05b47ddd0db3227389a0ef7c21799589b6b..17763381071dec4e0613abab4b1b3fc820b4d298 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2005-10-17  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * Documentation/user/changing-defaults.itely (Difficult tweaks):
+       use callbacks.
+
        * lily/context-property.cc (execute_general_pushpop_property):
        robustness checks.
 
index 2a8c8c79eca919a0827b3c6211106bb22cf6c445..a201da7a21be7f5186f1979bf1e967ee6c74d631 100644 (file)
@@ -1525,7 +1525,7 @@ tsMarkup =\markup {
 }
 
 {
-  \override Staff.TimeSignature #'print-function = #Text_interface::print
+  \override Staff.TimeSignature #'callbacks #'stencil = #Text_interface::print
   \override Staff.TimeSignature #'text = #tsMarkup
   \time 3/2
   c'2 \bar ":" c'4 c'4.
index bde43e6dcd8878595a96d5cd0d3216d13592ad02..7db71430b6302519473a1948f178bdd801aa3971 100644 (file)
@@ -2987,7 +2987,7 @@ Isolated percents can also be printed. This is done by putting a multi
 measure rest with a different print function,
 
 @lilypond[fragment,verbatim]
-\override MultiMeasureRest #'print-function
+\override MultiMeasureRest #'callbacks #'stencil
   = #Multi_measure_rest::percent
 R1
 @end lilypond
index 97adb3e0c30d2fe00a61b0ec3d1eda25e1893509..a4a03db47982948dc3353abc5f875e106d999416 100644 (file)
@@ -1140,18 +1140,25 @@ does not amount to much.  The initialization file
 
 @example
 (Fingering
-  . ((print-function . ,Text_interface::print)
-     (padding . 0.6)
-     (staff-padding . 0.6)
+  . ((padding . 0.5)
+     (avoid-slur . around)
+     (slur-padding . 0.2)
+     (staff-padding . 0.5)
      (self-alignment-X . 0)
      (self-alignment-Y . 0)
      (script-priority . 100)
-     (font-size . -5)
-     (meta . ((interfaces . (finger-interface font-interface
-                             text-script-interface text-interface
-                             side-position-interface
-                             self-alignment-interface
-                             item-interface))))))
+     (callbacks . ((stencil . ,Text_interface::print)
+                   (direction . ,Script_interface::calc_direction)))
+     (font-encoding . fetaNumber)
+     (font-size . -5)          ; don't overlap when next to heads.
+     (meta . ((class . Item)
+     (interfaces . (finger-interface
+                    font-interface
+                    text-script-interface
+                    text-interface
+                    side-position-interface
+                    self-alignment-interface
+                    item-interface))))))
 @end example
 
 @noindent
@@ -1278,13 +1285,11 @@ in.  These are clones of the original object and inherit all
 properties, including @code{\override}s.
 
 
-[THIS SECTION IS OUT OF DATE. REWRITE ME.] 
-
 In other words, an @code{\override} always affects all pieces of a
 broken spanner.  To change only one part of a spanner at a line break,
 it is necessary to hook into the formatting process.  The
-@code{after-line-breaking-callback} property contains the Scheme procedure
-that is called after the line breaks have been determined, and layout
+@code{after-line-breaking} callback contains the Scheme procedure that
+is called after the line breaks have been determined, and layout
 objects have been split over different systems.
 
 In the following example, we define a procedure
@@ -1304,8 +1309,7 @@ if yes, it sets @code{extra-offset}.
 This procedure is installed into @internalsref{Tie}, so the last part
 of the broken tie is translated up.
 
-@ignore
-@li lypond[quote,verbatim,raggedright]
+@lilypond[quote,verbatim,raggedright]
 #(define (my-callback grob)
   (let* (
          ; have we been split? 
@@ -1320,7 +1324,7 @@ of the broken tie is translated up.
      (ly:grob-set-property! grob 'extra-offset '(-2 . 5)))))
 
 \relative c'' { 
-  \override Tie #'after-line-breaking-callback =
+  \override Tie #'callbacks #'after-line-breaking =
   #my-callback
   c1 ~ \break c2 ~ c
 }
@@ -1328,12 +1332,10 @@ of the broken tie is translated up.
 @end ignore
 
 @noindent
-When applying this trick, the new @code{after-line-breaking-callback}
-should also call the old @code{after-line-breaking-callback}, if there
-is one.  For example, if using this with @code{Slur},
-@code{Slur::after_line_breaking} should also be called.
-
-[END OUT OF DATE]
+When applying this trick, the new @code{after-line-breaking} callback
+should also call the old one @code{after-line-breaking}, if there is
+one.  For example, if using this with @code{Hairpin},
+@code{Hairpin::after_line_breaking} should also be called.
 
 
 @item Some objects cannot be changed with @code{\override} for
index 096de09c49be532c9ca1b9e777ee012db7903649..fdf04014c04ce3cd8f020fd491cdae19683af0fc 100644 (file)
       (string-append
        "@item Set "
        (format "grob-property @code{~a} " (string-join path " "))
-       (format " in @ref{~a} " sym)
+       (format " in @ref{~a} " context-sym)
        (if (not (null? (cddr body)))
           (format " to @code{~a}" (scm->texi value))
           "")
        "\n")))
      ((equal? (object-property sym 'is-grob?) #t) "")
      ((equal? tag 'assign)
-      (string-append
-       "@item Set translator property @code{"
-       (symbol->string (car body))
-       "} to @code{"
-       (scm->texi (cadr body))
-       "}\n")))))
+      (format "@item Set translator property @code{~a} to @code{~a}"
+             context-sym
+             (scm->texi (car args))))
+     )))
+     
 
 (define (context-doc context-desc)
   (let* ((name-sym (cdr (assoc 'context-name context-desc)))