OLD | NEW |
1 ;;;; This file is part of LilyPond, the GNU music typesetter. | 1 ;;;; This file is part of LilyPond, the GNU music typesetter. |
2 ;;;; | 2 ;;;; |
3 ;;;; Copyright (C) 1998--2012 Jan Nieuwenhuizen <janneke@gnu.org> | 3 ;;;; Copyright (C) 1998--2012 Jan Nieuwenhuizen <janneke@gnu.org> |
4 ;;;; Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 ;;;; Han-Wen Nienhuys <hanwen@xs4all.nl> |
5 ;;;; | 5 ;;;; |
6 ;;;; LilyPond is free software: you can redistribute it and/or modify | 6 ;;;; LilyPond is free software: you can redistribute it and/or modify |
7 ;;;; it under the terms of the GNU General Public License as published by | 7 ;;;; it under the terms of the GNU General Public License as published by |
8 ;;;; the Free Software Foundation, either version 3 of the License, or | 8 ;;;; the Free Software Foundation, either version 3 of the License, or |
9 ;;;; (at your option) any later version. | 9 ;;;; (at your option) any later version. |
10 ;;;; | 10 ;;;; |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 (ly:grob-property parent 'break-visibility all-invisible))) | 351 (ly:grob-property parent 'break-visibility all-invisible))) |
352 (define-public (inherit-y-parent-visibility grob) | 352 (define-public (inherit-y-parent-visibility grob) |
353 (let ((parent (ly:grob-parent grob X))) | 353 (let ((parent (ly:grob-parent grob X))) |
354 (ly:grob-property parent 'break-visibility))) | 354 (ly:grob-property parent 'break-visibility))) |
355 | 355 |
356 | 356 |
357 (define-public spanbar-begin-of-line-invisible #(#t #f #f)) | 357 (define-public spanbar-begin-of-line-invisible #(#t #f #f)) |
358 | 358 |
359 | 359 |
360 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 360 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
361 ;; Bar lines. | 361 ;; neighbor-interface routines |
362 | 362 |
363 ;; | |
364 ;; How should a bar line behave at a break? | |
365 (define bar-glyph-alist | |
366 '((":|:" . (":|" . "|:")) | |
367 (":|.|:" . (":|" . "|:")) | |
368 (":|.:" . (":|" . "|:")) | |
369 ("||:" . ("||" . "|:")) | |
370 ("dashed" . ("dashed" . '())) | |
371 ("|" . ("|" . ())) | |
372 ("|s" . (() . "|")) | |
373 ("|:" . ("|" . "|:")) | |
374 ("|." . ("|." . ())) | |
375 | |
376 ;; hmm... should we end with a bar line here? | |
377 (".|" . ("|" . ".|")) | |
378 (":|" . (":|" . ())) | |
379 ("||" . ("||" . ())) | |
380 (".|." . (".|." . ())) | |
381 ("|.|" . ("|.|" . ())) | |
382 ("" . ("" . "")) | |
383 (":" . (":" . "")) | |
384 ("." . ("." . ())) | |
385 ("'" . ("'" . ())) | |
386 ("empty" . (() . ())) | |
387 ("brace" . (() . "brace")) | |
388 ("bracket" . (() . "bracket")) | |
389 | |
390 ;; segno bar lines | |
391 ("S" . ("||" . "S")) | |
392 ("|S" . ("|" . "S")) | |
393 ("S|" . ("S" . ())) | |
394 (":|S" . (":|" . "S")) | |
395 (":|S." . (":|S" . ())) | |
396 ("S|:" . ("S" . "|:")) | |
397 (".S|:" . ("|" . "S|:")) | |
398 (":|S|:" . (":|" . "S|:")) | |
399 (":|S.|:" . (":|S" . "|:")) | |
400 | |
401 ;; ancient bar lines | |
402 ("kievan" . ("kievan" . "")))) | |
403 | |
404 (define-public (bar-line::calc-glyph-name grob) | |
405 (let* ((glyph (ly:grob-property grob 'glyph)) | |
406 (dir (ly:item-break-dir grob)) | |
407 (result (assoc-get glyph bar-glyph-alist)) | |
408 (glyph-name (if (= dir CENTER) | |
409 glyph | |
410 (if (and result | |
411 (string? (index-cell result dir))) | |
412 (index-cell result dir) | |
413 #f)))) | |
414 glyph-name)) | |
415 | |
416 (define-public (bar-line::calc-break-visibility grob) | |
417 (let* ((glyph (ly:grob-property grob 'glyph)) | |
418 (result (assoc-get glyph bar-glyph-alist))) | |
419 | |
420 (if result | |
421 (vector (string? (car result)) #t (string? (cdr result))) | |
422 all-invisible))) | |
423 | 363 |
424 (define-public (shift-right-at-line-begin g) | 364 (define-public (shift-right-at-line-begin g) |
425 "Shift an item to the right, but only at the start of the line." | 365 "Shift an item to the right, but only at the start of the line." |
426 (if (and (ly:item? g) | 366 (if (and (ly:item? g) |
427 (equal? (ly:item-break-dir g) RIGHT)) | 367 (equal? (ly:item-break-dir g) RIGHT)) |
428 (ly:grob-translate-axis! g 3.5 X))) | 368 (ly:grob-translate-axis! g 3.5 X))) |
429 | 369 |
430 (define-public (pure-from-neighbor-interface::extra-spacing-height-at-beginning-
of-line grob) | 370 (define-public (pure-from-neighbor-interface::extra-spacing-height-at-beginning-
of-line grob) |
431 (if (= 1 (ly:item-break-dir grob)) | 371 (if (= 1 (ly:item-break-dir grob)) |
432 (pure-from-neighbor-interface::extra-spacing-height grob) | 372 (pure-from-neighbor-interface::extra-spacing-height grob) |
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1101 (list))))) | 1041 (list))))) |
1102 | 1042 |
1103 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 1043 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1104 ;; laissez-vibrer tie | 1044 ;; laissez-vibrer tie |
1105 ;; | 1045 ;; |
1106 ;; needed so we can make laissez-vibrer a pure print | 1046 ;; needed so we can make laissez-vibrer a pure print |
1107 ;; | 1047 ;; |
1108 (define-public (laissez-vibrer::print grob) | 1048 (define-public (laissez-vibrer::print grob) |
1109 (ly:tie::print grob)) | 1049 (ly:tie::print grob)) |
1110 | 1050 |
OLD | NEW |