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 | |
22 #include "all-font-metrics.hh" | |
23 #include "font-interface.hh" | |
24 #include "line-interface.hh" | |
25 #include "lookup.hh" | |
26 #include "output-def.hh" | |
27 #include "paper-column.hh" | 21 #include "paper-column.hh" |
28 #include "staff-symbol.hh" | |
29 #include "staff-symbol-referencer.hh" | |
30 | 22 |
31 bool | 23 bool |
32 Bar_line::non_empty_barline (Grob *me) | 24 Bar_line::non_empty_barline (Grob *me) |
33 { | 25 { |
34 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 (); |
35 } | 28 } |
36 | |
37 ADD_INTERFACE (Bar_line, | |
38 "Bar line.\n" | |
39 "\n" | |
40 "Print a special bar symbol. It replaces the regular bar" | |
41 " symbol with a special symbol. The argument @var{bartype}" | |
42 " is a string which specifies the kind of bar line to print." | |
43 " Options are @code{|}, @code{:|}, @code{|:}, @code{:|:}, @code{
:|.|:}," | |
44 " @code{:|.:}, @code{.}, @code{||}, @code{|.}, @code{.|}, @code{.
|.}," | |
45 " @code{|.|}, @code{:}, @code{dashed}, @code{'} and @code{S}.\n" | |
46 "\n" | |
47 "These produce, respectively, a normal bar line, a right repeat,
a left repeat," | |
48 " a thick double repeat, a thin-thick-thin double repeat," | |
49 " a thin-thick double repeat, a thick bar, a double bar, a start
bar," | |
50 " an end bar, a thick double bar, a thin-thick-thin bar," | |
51 " a dotted bar, a dashed bar, a tick as bar line and a segno bar.
\n" | |
52 "\n" | |
53 "In addition, there is an option" | |
54 " @code{||:} which is equivalent to @code{|:} except at line" | |
55 " breaks, where it produces a double bar (@code{||}) at the" | |
56 " end of the line and a repeat sign (@code{|:}) at the" | |
57 " beginning of the new line.\n" | |
58 "\n" | |
59 "For segno, @code{S} produces a segno sign except at line breaks,
" | |
60 " where it produces a double bar (@code{||}) at the" | |
61 " end of the line and a segno sign at the beginning of the new li
ne." | |
62 " @code{|S} is equivalent to @code{S} but produces a simple bar l
ine" | |
63 " (@code{|}) instead of a double bar line (@code{||}) at line bre
aks." | |
64 " @code{S|} produces the segno sign at line breaks and starts the
following" | |
65 " line without special bar lines.\n" | |
66 "\n" | |
67 "@code{S|:} and @code{:|S} are used for repeat/segno combinations
that are" | |
68 " separated at line breaks. Alternatively, @code{.S|:} and @code
{:|S.}" | |
69 " may be used which combine repeat signs and segno at the same li
ne in" | |
70 " case of a line break. @code{:|S|:} is a combination of a left
repeat" | |
71 " (@code{:|}), a segno (@code{S}) and a right repeat @code{|:} wh
ich" | |
72 " splits before the segno at line breaks; @code{:|S.|:} splits af
ter" | |
73 " the segno sign.\n" | |
74 "\n" | |
75 "If @var{bartype} is set to @code{empty} then nothing is" | |
76 " printed, but a line break is allowed at that spot.\n" | |
77 "\n" | |
78 "@code{gap} is used for the gaps in dashed bar lines.", | |
79 | |
80 /* properties */ | |
81 "allow-span-bar " | |
82 "gap " | |
83 "kern " | |
84 "thin-kern " | |
85 "hair-thickness " | |
86 "has-span-bar " | |
87 "thick-thickness " | |
88 "glyph " | |
89 "glyph-name " | |
90 "bar-extent " | |
91 ); | |
LEFT | RIGHT |