]> git.donarmstrong.com Git - lilypond.git/blob - scm/basic-properties.scm
''
[lilypond.git] / scm / basic-properties.scm
1 ; Definition of backend properties (aka. element properties).
2
3 ;; See documentation of Item::visibility_lambda_
4 (define (begin-of-line-visible d) (if (= d 1) '(#f . #f) '(#t . #t)))
5 (define (end-of-line-visible d) (if (= d -1) '(#f . #f) '(#t . #t)))
6 (define (spanbar-begin-of-line-invisible d) (if (= d -1) '(#t . #t) '(#f . #f)))
7 (define (all-visible d) '(#f . #f))
8 (define (all-invisible d) '(#t . #t))
9 (define (begin-of-line-invisible d) (if (= d 1) '(#t . #t) '(#f . #f)))
10 (define (end-of-line-invisible d) (if (= d -1) '(#t . #t) '(#f . #f)))
11
12
13 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
14 ; Bar lines.
15 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
16
17 ;
18 ; How should a  bar line behave at a break? 
19 ;
20 ;; Why prepend `default-' to every scm identifier?
21 (define (default-break-barline glyph dir)
22    (let ((result (assoc glyph 
23                         '((":|:" . (":|" . "|:"))
24                           ("||:" . ("||" . "|:"))
25                           ("|" . ("|" . ()))
26                           ("||:" . ("||" . "|:"))
27                           ("|s" . (() . "|"))
28                           ("|:" . ("|" . "|:"))
29                           ("|." . ("|." . ()))
30
31                           ;; hmm... should we end with a barline here?
32                           (".|" . ("|" . ".|"))
33                           (":|" . (":|" . ()))
34                           ("||" . ("||" . ()))
35                           (".|." . (".|." . ()))
36                           ("" . ("" . ""))
37                           ("empty" . (() . ()))
38                           ("brace" . (() . "brace"))
39                           ("bracket" . (() . "bracket"))  
40                           )
41                         )))
42
43      (if (equal? result #f)
44          (ly-warn (string-append "Unknown bar glyph: `" glyph "'"))
45          (index-cell (cdr result) dir))
46      )
47    )
48