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) 2002--2012 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 2002--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 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 scale_drul (&edge_height, Real (-dir)); | 46 scale_drul (&edge_height, Real (-dir)); |
47 | 47 |
48 Interval empty; | 48 Interval empty; |
49 Offset start; | 49 Offset start; |
50 start[a] = length; | 50 start[a] = length; |
51 | 51 |
52 Drul_array<bool> connect_to_other | 52 Drul_array<bool> connect_to_other |
53 = robust_scm2booldrul (me->get_property ("connect-to-neighbor"), | 53 = robust_scm2booldrul (me->get_property ("connect-to-neighbor"), |
54 Drul_array<bool> (false, false)); | 54 Drul_array<bool> (false, false)); |
55 | 55 |
56 for(LEFT_and_RIGHT(d)) | 56 for (LEFT_and_RIGHT (d)) |
57 { | 57 { |
58 if (connect_to_other[d]) | 58 if (connect_to_other[d]) |
59 { | 59 { |
60 edge_height[d] = 0.0; | 60 edge_height[d] = 0.0; |
61 flare[d] = 0.0; | 61 flare[d] = 0.0; |
62 shorten[d] = 0.0; | 62 shorten[d] = 0.0; |
63 } | 63 } |
64 } | 64 } |
65 | 65 |
66 /* | 66 /* |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 Spanner *me = unsmob_spanner (smob); | 104 Spanner *me = unsmob_spanner (smob); |
105 extract_grob_set (me, "columns", gs); | 105 extract_grob_set (me, "columns", gs); |
106 | 106 |
107 vector<Grob *> enclosed = gs; | 107 vector<Grob *> enclosed = gs; |
108 if (!gs.size ()) | 108 if (!gs.size ()) |
109 { | 109 { |
110 me->suicide (); | 110 me->suicide (); |
111 return SCM_EOL; | 111 return SCM_EOL; |
112 } | 112 } |
113 | 113 |
114 for(LEFT_and_RIGHT(d)) | 114 for (LEFT_and_RIGHT (d)) |
115 { | 115 { |
116 Item *b = me->get_bound (d); | 116 Item *b = me->get_bound (d); |
117 if (b->break_status_dir ()) | 117 if (b->break_status_dir ()) |
118 enclosed.push_back (b); | 118 enclosed.push_back (b); |
119 } | 119 } |
120 | 120 |
121 Stencil b = make_enclosing_bracket (me, me, enclosed, X_AXIS, get_grob_directi
on (me)); | 121 Stencil b = make_enclosing_bracket (me, me, enclosed, X_AXIS, get_grob_directi
on (me)); |
122 return b.smobbed_copy (); | 122 return b.smobbed_copy (); |
123 } | 123 } |
124 | 124 |
125 ADD_INTERFACE (Horizontal_bracket, | 125 ADD_INTERFACE (Horizontal_bracket, |
126 "A horizontal bracket encompassing notes.", | 126 "A horizontal bracket encompassing notes.", |
127 | 127 |
128 /* properties */ | 128 /* properties */ |
129 "bracket-flare " | 129 "bracket-flare " |
130 "columns " | 130 "columns " |
131 "edge-height " | 131 "edge-height " |
132 "shorten-pair " | 132 "shorten-pair " |
133 "connect-to-neighbor " | 133 "connect-to-neighbor " |
134 ); | 134 ); |
135 | 135 |
LEFT | RIGHT |