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) 2000--2012 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 2000--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 10 matching lines...) Expand all Loading... |
21 #define AXIS_GROUP_INTERFACE_HH | 21 #define AXIS_GROUP_INTERFACE_HH |
22 | 22 |
23 #include "std-vector.hh" | 23 #include "std-vector.hh" |
24 #include "lily-proto.hh" | 24 #include "lily-proto.hh" |
25 #include "grob-interface.hh" | 25 #include "grob-interface.hh" |
26 #include "skyline.hh" | 26 #include "skyline.hh" |
27 | 27 |
28 class Axis_group_interface | 28 class Axis_group_interface |
29 { | 29 { |
30 static Real default_outside_staff_padding_; | 30 static Real default_outside_staff_padding_; |
31 public : | 31 public |
32 static SCM generic_group_extent (Grob *me, Axis a); | 32 : |
33 static Real get_default_outside_staff_padding (); | 33 static SCM generic_group_extent (Grob *me, Axis a); |
34 static Interval generic_bound_extent (Grob *me, Grob *common, Axis a); | 34 static Real get_default_outside_staff_padding (); |
35 static Interval pure_group_height (Grob *me, int start, int end); | 35 static Interval generic_bound_extent (Grob *me, Grob *common, Axis a); |
36 DECLARE_SCHEME_CALLBACK (width, (SCM smob)); | 36 static Interval pure_group_height (Grob *me, int start, int end); |
37 DECLARE_SCHEME_CALLBACK (calc_x_common, (SCM smob)); | 37 DECLARE_SCHEME_CALLBACK (width, (SCM smob)); |
38 DECLARE_SCHEME_CALLBACK (calc_y_common, (SCM smob)); | 38 DECLARE_SCHEME_CALLBACK (calc_x_common, (SCM smob)); |
39 DECLARE_SCHEME_CALLBACK (height, (SCM smob)); | 39 DECLARE_SCHEME_CALLBACK (calc_y_common, (SCM smob)); |
40 DECLARE_SCHEME_CALLBACK (pure_height, (SCM smob, SCM start, SCM end)); | 40 DECLARE_SCHEME_CALLBACK (height, (SCM smob)); |
41 DECLARE_SCHEME_CALLBACK (calc_skylines, (SCM smob)); | 41 DECLARE_SCHEME_CALLBACK (pure_height, (SCM smob, SCM start, SCM end)); |
42 DECLARE_SCHEME_CALLBACK (combine_skylines, (SCM smob)); | 42 DECLARE_SCHEME_CALLBACK (calc_skylines, (SCM smob)); |
43 DECLARE_SCHEME_CALLBACK (print, (SCM smob)); | 43 DECLARE_SCHEME_CALLBACK (combine_skylines, (SCM smob)); |
44 DECLARE_SCHEME_CALLBACK (adjacent_pure_heights, (SCM)); | 44 DECLARE_SCHEME_CALLBACK (print, (SCM smob)); |
45 DECLARE_SCHEME_CALLBACK (calc_staff_staff_spacing, (SCM)); | 45 DECLARE_SCHEME_CALLBACK (adjacent_pure_heights, (SCM)); |
46 DECLARE_SCHEME_CALLBACK (calc_pure_staff_staff_spacing, (SCM, SCM, SCM)); | 46 DECLARE_SCHEME_CALLBACK (calc_staff_staff_spacing, (SCM)); |
47 DECLARE_SCHEME_CALLBACK (calc_pure_relevant_grobs, (SCM)); | 47 DECLARE_SCHEME_CALLBACK (calc_pure_staff_staff_spacing, (SCM, SCM, SCM)); |
48 DECLARE_SCHEME_CALLBACK (calc_pure_relevant_items, (SCM)); | 48 DECLARE_SCHEME_CALLBACK (calc_pure_relevant_grobs, (SCM)); |
49 DECLARE_SCHEME_CALLBACK (calc_pure_relevant_spanners, (SCM)); | 49 DECLARE_SCHEME_CALLBACK (calc_pure_relevant_items, (SCM)); |
50 DECLARE_SCHEME_CALLBACK (calc_pure_y_common, (SCM)); | 50 DECLARE_SCHEME_CALLBACK (calc_pure_relevant_spanners, (SCM)); |
51 static SCM internal_calc_pure_relevant_grobs (Grob *, string); | 51 DECLARE_SCHEME_CALLBACK (calc_pure_y_common, (SCM)); |
52 static Interval relative_group_extent (vector<Grob *> const &list, | 52 static SCM internal_calc_pure_relevant_grobs (Grob *, string); |
53 Grob *common, Axis); | 53 static Interval relative_group_extent (vector<Grob *> const &list, |
54 static Interval relative_maybe_bound_group_extent (vector<Grob *> const &lis
t, | 54 Grob *common, Axis); |
55 Grob *common, Axis, bool)
; | 55 static Interval relative_maybe_bound_group_extent (vector<Grob *> const &list, |
56 static Interval relative_pure_height (Grob *me, int start, int end); | 56 Grob *common, Axis, bool); |
57 static Interval combine_pure_heights (Grob *me, SCM, int, int); | 57 static Interval relative_pure_height (Grob *me, int start, int end); |
58 static Interval sum_partial_pure_heights (Grob *me, int, int); | 58 static Interval combine_pure_heights (Grob *me, SCM, int, int); |
59 static Interval begin_of_line_pure_height (Grob *me, int); | 59 static Interval sum_partial_pure_heights (Grob *me, int, int); |
60 static Interval rest_of_line_pure_height (Grob *me, int, int); | 60 static Interval begin_of_line_pure_height (Grob *me, int); |
61 static Interval part_of_line_pure_height (Grob *me, bool begin, int, int); | 61 static Interval rest_of_line_pure_height (Grob *me, int, int); |
| 62 static Interval part_of_line_pure_height (Grob *me, bool begin, int, int); |
62 | 63 |
63 static bool has_outside_staff_parent (Grob *me); | 64 static Grob *outside_staff_ancestor (Grob *me); |
64 static Skyline_pair skyline_spacing (Grob *me, vector<Grob *> elements); | 65 static Skyline_pair skyline_spacing (Grob *me, vector<Grob *> elements); |
65 static void add_element (Grob *me, Grob *); | 66 static void add_element (Grob *me, Grob *); |
66 static void set_axes (Grob *, Axis, Axis); | 67 static void set_axes (Grob *, Axis, Axis); |
67 static bool has_axis (Grob *, Axis); | 68 static bool has_axis (Grob *, Axis); |
68 static void get_children (Grob *, vector<Grob *> *); | 69 static void get_children (Grob *, vector<Grob *> *); |
69 static Interval staff_extent (Grob *me, Grob *ref, Axis, Grob *staff, Axis); | 70 static Interval staff_extent (Grob *me, Grob *ref, Axis, Grob *staff, Axis); |
70 static SCM calc_common (Grob *, Axis); | 71 static SCM calc_common (Grob *, Axis); |
71 static Real minimum_distance (Grob *, Grob *, Axis); | 72 static Real minimum_distance (Grob *, Grob *, Axis); |
72 static SCM calc_maybe_pure_staff_staff_spacing (Grob *, bool, int, int); | 73 static SCM calc_maybe_pure_staff_staff_spacing (Grob *, bool, int, int); |
73 DECLARE_GROB_INTERFACE (); | 74 DECLARE_GROB_INTERFACE (); |
74 }; | 75 }; |
75 | 76 |
76 #endif /* AXIS_GROUP_INTERFACE_HH */ | 77 #endif /* AXIS_GROUP_INTERFACE_HH */ |
77 | 78 |
LEFT | RIGHT |