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--2015 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 1997--2015 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 interfaces_ = scm_cdr (scm_assq (ly_symbol2scm ("interfaces"), meta)); | 68 interfaces_ = scm_cdr (scm_assq (ly_symbol2scm ("interfaces"), meta)); |
69 | 69 |
70 SCM object_cbs = scm_assq (ly_symbol2scm ("object-callbacks"), meta); | 70 SCM object_cbs = scm_assq (ly_symbol2scm ("object-callbacks"), meta); |
71 if (scm_is_pair (object_cbs)) | 71 if (scm_is_pair (object_cbs)) |
72 { | 72 { |
73 for (SCM s = scm_cdr (object_cbs); scm_is_pair (s); s = scm_cdr (s)) | 73 for (SCM s = scm_cdr (object_cbs); scm_is_pair (s); s = scm_cdr (s)) |
74 set_object (scm_caar (s), scm_cdar (s)); | 74 set_object (scm_caar (s), scm_cdar (s)); |
75 } | 75 } |
76 } | 76 } |
77 | 77 |
78 if (get_property_data ("X-extent") == SCM_EOL) | 78 if (scm_is_null (get_property_data ("X-extent"))) |
79 set_property ("X-extent", Grob::stencil_width_proc); | 79 set_property ("X-extent", Grob::stencil_width_proc); |
80 if (get_property_data ("Y-extent") == SCM_EOL) | 80 if (scm_is_null (get_property_data ("Y-extent"))) |
81 set_property ("Y-extent", | 81 set_property ("Y-extent", |
82 Unpure_pure_container::make_smob (Grob::stencil_height_proc, | 82 Unpure_pure_container::make_smob (Grob::stencil_height_proc, |
83 Grob::pure_stencil_height_pr
oc)); | 83 Grob::pure_stencil_height_pr
oc)); |
84 if (get_property_data ("vertical-skylines") == SCM_EOL) | 84 if (scm_is_null (get_property_data ("vertical-skylines"))) |
85 set_property ("vertical-skylines", | 85 set_property ("vertical-skylines", |
86 Unpure_pure_container::make_smob (Grob::simple_vertical_skylin
es_from_extents_proc, | 86 Unpure_pure_container::make_smob (Grob::simple_vertical_skylin
es_from_extents_proc, |
87 Grob::pure_simple_vertical_s
kylines_from_extents_proc)); | 87 Grob::pure_simple_vertical_s
kylines_from_extents_proc)); |
88 if (get_property_data ("horizontal-skylines") == SCM_EOL) | 88 if (scm_is_null (get_property_data ("horizontal-skylines"))) |
89 set_property ("horizontal-skylines", | 89 set_property ("horizontal-skylines", |
90 Unpure_pure_container::make_smob (Grob::simple_horizontal_skyl
ines_from_extents_proc, | 90 Unpure_pure_container::make_smob (Grob::simple_horizontal_skyl
ines_from_extents_proc, |
91 Grob::pure_simple_horizontal
_skylines_from_extents_proc)); | 91 Grob::pure_simple_horizontal
_skylines_from_extents_proc)); |
92 } | 92 } |
93 | 93 |
94 Grob::Grob (Grob const &s) | 94 Grob::Grob (Grob const &s) |
95 : Smob<Grob> () | 95 : Smob<Grob> () |
96 { | 96 { |
97 original_ = (Grob *) & s; | 97 original_ = (Grob *) & s; |
98 | 98 |
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1003 vector_sort (vec, direct_less); | 1003 vector_sort (vec, direct_less); |
1004 | 1004 |
1005 // Since the output is a sorted copy of the input with some elements | 1005 // Since the output is a sorted copy of the input with some elements |
1006 // removed, we can fill in the vector in-place if we do it starting | 1006 // removed, we can fill in the vector in-place if we do it starting |
1007 // from the front. | 1007 // from the front. |
1008 for (vsize i = 0; i < vec.size (); i++) | 1008 for (vsize i = 0; i < vec.size (); i++) |
1009 grobs[i] = *vec[i]; | 1009 grobs[i] = *vec[i]; |
1010 grobs.erase (grobs.begin () + vec.size (), grobs.end ()); | 1010 grobs.erase (grobs.begin () + vec.size (), grobs.end ()); |
1011 return; | 1011 return; |
1012 } | 1012 } |
LEFT | RIGHT |