]> git.donarmstrong.com Git - lilypond.git/commitdiff
* input/test/broken-spanner-adjustment.ly: new file.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 28 Jul 2002 10:37:28 +0000 (10:37 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 28 Jul 2002 10:37:28 +0000 (10:37 +0000)
ChangeLog
input/test/broken-spanner-adjustment.ly [new file with mode: 0644]
lily/grob-scheme.cc

index 8c08071bc5b8f28ead949a1f564da485f8300038..41f707536c863ab2a9c31473fe271a840ba201e2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2002-07-28  Han-Wen  <hanwen@cs.uu.nl>
+
+       * input/test/broken-spanner-adjustment.ly: new file.
+
 2002-07-27  Mats Bengtsson  <mats.bengtsson@s3.kth.se>
 
        * scripts/lilypond-book.py: Handle printfilename also together
diff --git a/input/test/broken-spanner-adjustment.ly b/input/test/broken-spanner-adjustment.ly
new file mode 100644 (file)
index 0000000..cd9f206
--- /dev/null
@@ -0,0 +1,31 @@
+\header {
+
+        texidoc = "Broken spanners can be adjusted individually, but
+this requires complicated scheme code.
+  "
+
+}
+
+#(define (my-callback grob)
+  (let* (
+      (o (get-original grob))
+      (b (if (ly-grob? o) (get-broken-into o) '() ))
+      )
+
+    ;; Call the equivalent of Tie::after_line_breaking
+    ;; if you're using this for other grob-types.
+    
+    (if (and  (>= (length b) 2) (eq? (car (last-pair b)) grob))
+       (ly-set-grob-property! grob 'extra-offset '(4 . -2))
+       )
+  ))
+
+#(debug-enable 'backtrace)
+
+\score {\notes { 
+    \property Voice.Tie \override #'after-line-breaking-callback =
+       #my-callback
+    c1\break ~ c2 ~ c
+}
+    \paper { linewidth= 5.0 \cm }
+    }
index 443938e7631594d141b41d1183e1f3abd0bd79f2..0e42044ba7d5f4599a4a38af48d056ce2e7eb4db 100644 (file)
@@ -136,6 +136,11 @@ Return the original Grob of @var{grob}
 
 
 /* ly prefix? spanner in name? */
+/*
+  TODO: maybe we should return a vector -- random access is more
+  logical for this list?
+ */
+
 LY_DEFINE (get_broken_into,
          "get-broken-into", 1, 0, 0, (SCM spanner),
           "