LEFT | RIGHT |
1 /* | 1 /* |
2 This file is part of LilyPond, the GNU music typesetter. | 2 This file is part of LilyPond, the GNU music typesetter. |
3 | 3 |
4 Copyright (C) 1997--2012 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 1997--2012 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 |
11 LilyPond is distributed in the hope that it will be useful, | 11 LilyPond is distributed in the hope that it will be useful, |
12 but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 GNU General Public License for more details. | 14 GNU General Public License for more details. |
15 | 15 |
16 You should have received a copy of the GNU General Public License | 16 You should have received a copy of the GNU General Public License |
17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>. | 17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>. |
18 */ | 18 */ |
19 | 19 |
20 #include "bar-line.hh" | 20 #include "bar-line.hh" |
21 #include "paper-column.hh" | 21 #include "paper-column.hh" |
22 | 22 |
23 bool | 23 bool |
24 Bar_line::non_empty_barline (Grob *me) | 24 Bar_line::non_empty_barline (Grob *me) |
25 { | 25 { |
26 return has_interface (me) && !me->extent (me, X_AXIS).is_empty (); | 26 return me->internal_has_interface (ly_symbol2scm ("bar-line-interface")) |
| 27 && !me->extent (me, X_AXIS).is_empty (); |
27 } | 28 } |
28 | |
29 ADD_INTERFACE (Bar_line, | |
30 "Bar line.\n" | |
31 "\n" | |
32 "Print a special bar symbol. It replaces the regular bar" | |
33 " symbol with a special symbol. The argument @var{bartype}" | |
34 " is a string which specifies the kind of bar line to print." | |
35 " Options are @code{|}, @code{:|}, @code{|:}, @code{:|:}, @code{
:|.|:}," | |
36 " @code{:|.:}, @code{.}, @code{||}, @code{|.}, @code{.|}, @code{.
|.}," | |
37 " @code{|.|}, @code{:}, @code{dashed}, @code{'} and @code{S}.\n" | |
38 "\n" | |
39 "These produce, respectively, a normal bar line, a right repeat,
a left repeat," | |
40 " a thick double repeat, a thin-thick-thin double repeat," | |
41 " a thin-thick double repeat, a thick bar, a double bar, a start
bar," | |
42 " an end bar, a thick double bar, a thin-thick-thin bar," | |
43 " a dotted bar, a dashed bar, a tick as bar line and a segno bar.
\n" | |
44 "\n" | |
45 "In addition, there is an option" | |
46 " @code{||:} which is equivalent to @code{|:} except at line" | |
47 " breaks, where it produces a double bar (@code{||}) at the" | |
48 " end of the line and a repeat sign (@code{|:}) at the" | |
49 " beginning of the new line.\n" | |
50 "\n" | |
51 "For segno, @code{S} produces a segno sign except at line breaks,
" | |
52 " where it produces a double bar (@code{||}) at the" | |
53 " end of the line and a segno sign at the beginning of the new li
ne." | |
54 " @code{|S} is equivalent to @code{S} but produces a simple bar l
ine" | |
55 " (@code{|}) instead of a double bar line (@code{||}) at line bre
aks." | |
56 " @code{S|} produces the segno sign at line breaks and starts the
following" | |
57 " line without special bar lines.\n" | |
58 "\n" | |
59 "@code{S|:} and @code{:|S} are used for repeat/segno combinations
that are" | |
60 " separated at line breaks. Alternatively, @code{.S|:} and @code
{:|S.}" | |
61 " may be used which combine repeat signs and segno at the same li
ne in" | |
62 " case of a line break. @code{:|S|:} is a combination of a left
repeat" | |
63 " (@code{:|}), a segno (@code{S}) and a right repeat @code{|:} wh
ich" | |
64 " splits before the segno at line breaks; @code{:|S.|:} splits af
ter" | |
65 " the segno sign.\n" | |
66 "\n" | |
67 "If @var{bartype} is set to @code{empty} then nothing is" | |
68 " printed, but a line break is allowed at that spot.\n" | |
69 "\n" | |
70 "@code{gap} is used for the gaps in dashed bar lines.", | |
71 | |
72 /* properties */ | |
73 "allow-span-bar " | |
74 "gap " | |
75 "kern " | |
76 "thin-kern " | |
77 "hair-thickness " | |
78 "has-span-bar " | |
79 "thick-thickness " | |
80 "glyph " | |
81 "glyph-name " | |
82 "bar-extent " | |
83 ); | |
LEFT | RIGHT |