OLD | NEW |
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--2010 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 1997--2010 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 Grob::discretionary_processing () | 184 Grob::discretionary_processing () |
185 { | 185 { |
186 } | 186 } |
187 | 187 |
188 System * | 188 System * |
189 Grob::get_system () const | 189 Grob::get_system () const |
190 { | 190 { |
191 return 0; | 191 return 0; |
192 } | 192 } |
193 | 193 |
| 194 /* This version of get_system is more reliable than this->get_system () |
| 195 before line-breaking has been done, at which point there is only |
| 196 one system in the whole score and we can find it just by following |
| 197 parent pointers. */ |
| 198 System * |
| 199 Grob::get_system(Grob *me) |
| 200 { |
| 201 Grob *p = me->get_parent (X_AXIS); |
| 202 return p ? get_system (p) : dynamic_cast<System *>(me); |
| 203 } |
194 | 204 |
195 void | 205 void |
196 Grob::handle_broken_dependencies () | 206 Grob::handle_broken_dependencies () |
197 { | 207 { |
198 Spanner *sp = dynamic_cast<Spanner *> (this); | 208 Spanner *sp = dynamic_cast<Spanner *> (this); |
199 if (original () && sp) | 209 if (original () && sp) |
200 return; | 210 return; |
201 | 211 |
202 if (sp) | 212 if (sp) |
203 /* THIS, SP is the original spanner. We use a special function | 213 /* THIS, SP is the original spanner. We use a special function |
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
777 if (Align_interface::has_interface (commony)) | 787 if (Align_interface::has_interface (commony)) |
778 return true; | 788 return true; |
779 | 789 |
780 for (Grob *g = this; g && g != commony; g = g->get_parent (Y_AXIS)) | 790 for (Grob *g = this; g && g != commony; g = g->get_parent (Y_AXIS)) |
781 if (Align_interface::has_interface (g)) | 791 if (Align_interface::has_interface (g)) |
782 return true; | 792 return true; |
783 | 793 |
784 return false; | 794 return false; |
785 } | 795 } |
786 | 796 |
OLD | NEW |