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) 1996--2012 Han-Wen Nienhuys | 4 Copyright (C) 1996--2012 Han-Wen Nienhuys |
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 friend class Spanner; | 62 friend class Spanner; |
63 friend class System; | 63 friend class System; |
64 friend SCM ly_grob_properties (SCM); | 64 friend SCM ly_grob_properties (SCM); |
65 friend SCM ly_grob_basic_properties (SCM); | 65 friend SCM ly_grob_basic_properties (SCM); |
66 | 66 |
67 /* standard callbacks */ | 67 /* standard callbacks */ |
68 DECLARE_SCHEME_CALLBACK (x_parent_positioning, (SCM)); | 68 DECLARE_SCHEME_CALLBACK (x_parent_positioning, (SCM)); |
69 DECLARE_SCHEME_CALLBACK (y_parent_positioning, (SCM)); | 69 DECLARE_SCHEME_CALLBACK (y_parent_positioning, (SCM)); |
70 DECLARE_SCHEME_CALLBACK (stencil_height, (SCM smob)); | 70 DECLARE_SCHEME_CALLBACK (stencil_height, (SCM smob)); |
71 DECLARE_SCHEME_CALLBACK (stencil_width, (SCM smob)); | 71 DECLARE_SCHEME_CALLBACK (stencil_width, (SCM smob)); |
| 72 DECLARE_SCHEME_CALLBACK (simple_vertical_skylines_from_stencil, (SCM smob)); |
72 DECLARE_SCHEME_CALLBACK (vertical_skylines_from_stencil, (SCM smob)); | 73 DECLARE_SCHEME_CALLBACK (vertical_skylines_from_stencil, (SCM smob)); |
73 DECLARE_SCHEME_CALLBACK (vertical_skylines_from_element_stencils, (SCM smob)); | 74 DECLARE_SCHEME_CALLBACK (vertical_skylines_from_element_stencils, (SCM smob)); |
| 75 DECLARE_SCHEME_CALLBACK (simple_horizontal_skylines_from_stencil, (SCM smob)); |
| 76 DECLARE_SCHEME_CALLBACK (horizontal_skylines_from_stencil, (SCM smob)); |
| 77 DECLARE_SCHEME_CALLBACK (horizontal_skylines_from_element_stencils, (SCM smob)
); |
74 | 78 |
75 /* R/O access */ | 79 /* R/O access */ |
76 Output_def *layout () const { return layout_; } | 80 Output_def *layout () const { return layout_; } |
77 Grob *original () const { return original_; } | 81 Grob *original () const { return original_; } |
78 SCM interfaces () const { return interfaces_; } | 82 SCM interfaces () const { return interfaces_; } |
79 | 83 |
80 /* life & death */ | 84 /* life & death */ |
81 Grob (SCM basic_props); | 85 Grob (SCM basic_props); |
82 Grob (Grob const &); | 86 Grob (Grob const &); |
83 virtual Grob *clone () const; | 87 virtual Grob *clone () const; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 virtual Interval pure_height (Grob *refpoint, int start_col, int end_col); | 140 virtual Interval pure_height (Grob *refpoint, int start_col, int end_col); |
137 Interval maybe_pure_extent (Grob *refpoint, Axis, bool pure, int start, int en
d); | 141 Interval maybe_pure_extent (Grob *refpoint, Axis, bool pure, int start, int en
d); |
138 | 142 |
139 /* refpoints */ | 143 /* refpoints */ |
140 Grob *common_refpoint (Grob const *s, Axis a) const; | 144 Grob *common_refpoint (Grob const *s, Axis a) const; |
141 void set_parent (Grob *e, Axis); | 145 void set_parent (Grob *e, Axis); |
142 Grob *get_parent (Axis a) const; | 146 Grob *get_parent (Axis a) const; |
143 void fixup_refpoint (); | 147 void fixup_refpoint (); |
144 | 148 |
145 /* vertical ordering */ | 149 /* vertical ordering */ |
| 150 static bool internal_vertical_less (Grob *g1, Grob *g2, bool pure); |
146 static Grob *get_root_vertical_alignment (Grob *g); | 151 static Grob *get_root_vertical_alignment (Grob *g); |
147 static Grob *get_vertical_axis_group (Grob *g); | 152 static Grob *get_vertical_axis_group (Grob *g); |
148 static bool vertical_less (Grob *g1, Grob *g2); | 153 static bool vertical_less (Grob *g1, Grob *g2); |
149 static bool pure_vertical_less (Grob *g1, Grob *g2); | 154 static bool pure_vertical_less (Grob *g1, Grob *g2); |
150 static bool internal_vertical_less (Grob *g1, Grob *g2, bool pure); | |
151 static int get_vertical_axis_group_index (Grob *g); | 155 static int get_vertical_axis_group_index (Grob *g); |
152 | 156 |
| 157 /* skylines */ |
153 virtual Interval_t<int> spanned_rank_interval () const; | 158 virtual Interval_t<int> spanned_rank_interval () const; |
154 virtual bool pure_is_visible (int start, int end) const; | 159 virtual bool pure_is_visible (int start, int end) const; |
155 bool check_cross_staff (Grob *common); | 160 bool check_cross_staff (Grob *common); |
156 static bool less (Grob *g1, Grob *g2); | 161 static bool less (Grob *g1, Grob *g2); |
| 162 static SCM internal_simple_skylines_from_stencil (SCM, Axis); |
| 163 static SCM internal_skylines_from_element_stencils (SCM, Axis); |
157 }; | 164 }; |
158 | 165 |
159 /* smob utilities */ | 166 /* smob utilities */ |
160 DECLARE_UNSMOB (Grob, grob); | 167 DECLARE_UNSMOB (Grob, grob); |
161 Spanner *unsmob_spanner (SCM); | 168 Spanner *unsmob_spanner (SCM); |
162 Item *unsmob_item (SCM); | 169 Item *unsmob_item (SCM); |
163 | 170 |
164 /* refpoints */ | 171 /* refpoints */ |
165 Grob *common_refpoint_of_list (SCM elt_list, Grob *, Axis a); | 172 Grob *common_refpoint_of_list (SCM elt_list, Grob *, Axis a); |
166 Grob *common_refpoint_of_array (vector<Grob *> const &, Grob *, Axis a); | 173 Grob *common_refpoint_of_array (vector<Grob *> const &, Grob *, Axis a); |
167 System *get_root_system (Grob *me); | 174 System *get_root_system (Grob *me); |
168 | 175 |
169 /* extents */ | 176 /* extents */ |
170 Interval robust_relative_extent (Grob *, Grob *, Axis); | 177 Interval robust_relative_extent (Grob *, Grob *, Axis); |
171 | 178 |
172 /* offset/extent callbacks. */ | 179 /* offset/extent callbacks. */ |
173 void add_offset_callback (Grob *g, SCM proc, Axis a); | 180 void add_offset_callback (Grob *g, SCM proc, Axis a); |
174 void chain_offset_callback (Grob *g, SCM proc, Axis a); | 181 void chain_offset_callback (Grob *g, SCM proc, Axis a); |
175 void chain_callback (Grob *g, SCM proc, SCM sym); | 182 void chain_callback (Grob *g, SCM proc, SCM sym); |
176 SCM axis_offset_symbol (Axis a); | 183 SCM axis_offset_symbol (Axis a); |
177 SCM axis_parent_positioning (Axis a); | 184 SCM axis_parent_positioning (Axis a); |
178 | 185 |
179 SCM call_pure_function (SCM unpure, SCM args, int start, int end); | 186 SCM call_pure_function (SCM unpure, SCM args, int start, int end); |
180 | 187 |
181 void set_nested_property (Grob *, SCM property_path, SCM value); | 188 void set_nested_property (Grob *, SCM property_path, SCM value); |
182 | 189 |
183 #endif /* GROB_HH */ | 190 #endif /* GROB_HH */ |
LEFT | RIGHT |