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 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 Item::get_system () const | 70 Item::get_system () const |
71 { | 71 { |
72 Grob *g = get_parent (X_AXIS); | 72 Grob *g = get_parent (X_AXIS); |
73 return g ? g->get_system () : 0; | 73 return g ? g->get_system () : 0; |
74 } | 74 } |
75 | 75 |
76 void | 76 void |
77 Item::copy_breakable_items () | 77 Item::copy_breakable_items () |
78 { | 78 { |
79 Drul_array<Item *> new_copies; | 79 Drul_array<Item *> new_copies; |
80 for(LEFT_and_RIGHT(d)) | 80 for (LEFT_and_RIGHT (d)) |
81 { | 81 { |
82 Grob *dolly = clone (); | 82 Grob *dolly = clone (); |
83 Item *item = dynamic_cast<Item *> (dolly); | 83 Item *item = dynamic_cast<Item *> (dolly); |
84 get_root_system (this)->typeset_grob (item); | 84 get_root_system (this)->typeset_grob (item); |
85 new_copies[d] = item; | 85 new_copies[d] = item; |
86 } | 86 } |
87 | 87 |
88 broken_to_drul_ = new_copies; | 88 broken_to_drul_ = new_copies; |
89 } | 89 } |
90 | 90 |
(...skipping 15 matching lines...) Expand all Loading... |
106 if (Item::is_non_musical (this)) | 106 if (Item::is_non_musical (this)) |
107 copy_breakable_items (); | 107 copy_breakable_items (); |
108 } | 108 } |
109 | 109 |
110 Grob * | 110 Grob * |
111 Item::find_broken_piece (System *l) const | 111 Item::find_broken_piece (System *l) const |
112 { | 112 { |
113 if (get_system () == l) | 113 if (get_system () == l) |
114 return (Item *) (this); | 114 return (Item *) (this); |
115 | 115 |
116 for(LEFT_and_RIGHT(d)) | 116 for (LEFT_and_RIGHT (d)) |
117 { | 117 { |
118 Grob *s = broken_to_drul_[d]; | 118 Grob *s = broken_to_drul_[d]; |
119 if (s && s->get_system () == l) | 119 if (s && s->get_system () == l) |
120 return s; | 120 return s; |
121 } | 121 } |
122 | 122 |
123 return 0; | 123 return 0; |
124 } | 124 } |
125 | 125 |
126 Item * | 126 Item * |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 int c = get_column ()->get_rank (); | 191 int c = get_column ()->get_rank (); |
192 return Interval_t<int> (c, c); | 192 return Interval_t<int> (c, c); |
193 } | 193 } |
194 | 194 |
195 Interval_t<Moment> | 195 Interval_t<Moment> |
196 spanned_time_interval (Item *l, Item *r) | 196 spanned_time_interval (Item *l, Item *r) |
197 { | 197 { |
198 Drul_array<Item *> bounds (l, r); | 198 Drul_array<Item *> bounds (l, r); |
199 Interval_t<Moment> iv; | 199 Interval_t<Moment> iv; |
200 | 200 |
201 for(LEFT_and_RIGHT(d)) | 201 for (LEFT_and_RIGHT (d)) |
202 { | 202 { |
203 if (bounds[d] && bounds[d]->get_column ()) | 203 if (bounds[d] && bounds[d]->get_column ()) |
204 iv[d] = robust_scm2moment (bounds[d]->get_column ()->get_property ("when
"), | 204 iv[d] = robust_scm2moment (bounds[d]->get_column ()->get_property ("when
"), |
205 iv[d]); | 205 iv[d]); |
206 } | 206 } |
207 | 207 |
208 for(LEFT_and_RIGHT(d)) | 208 for (LEFT_and_RIGHT (d)) |
209 { | 209 { |
210 if (!bounds[d] || !bounds[d]->get_column ()) | 210 if (!bounds[d] || !bounds[d]->get_column ()) |
211 iv[d] = iv[-d]; | 211 iv[d] = iv[-d]; |
212 } | 212 } |
213 | 213 |
214 return iv; | 214 return iv; |
215 } | 215 } |
216 | 216 |
217 void | 217 void |
218 Item::derived_mark () const | 218 Item::derived_mark () const |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 " end-of-line-invisible no yes yes\n" | 287 " end-of-line-invisible no yes yes\n" |
288 " center-invisible yes no yes\n" | 288 " center-invisible yes no yes\n" |
289 "@end example", | 289 "@end example", |
290 | 290 |
291 /* properties */ | 291 /* properties */ |
292 "break-visibility " | 292 "break-visibility " |
293 "extra-spacing-height " | 293 "extra-spacing-height " |
294 "extra-spacing-width " | 294 "extra-spacing-width " |
295 "non-musical " | 295 "non-musical " |
296 ); | 296 ); |
LEFT | RIGHT |