]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/spacing-spanner.hh
Merge branch 'jneeman' of git+ssh://jneem@git.sv.gnu.org/srv/git/lilypond into jneeman
[lilypond.git] / lily / include / spacing-spanner.hh
1 /*
2   spacing-spanner.hh -- declare Spacing spanner
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 2005--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
8
9 #ifndef SPACING_SPANNER_HH
10 #define SPACING_SPANNER_HH
11
12 #include "lily-proto.hh"
13 #include "rational.hh"
14 #include "std-vector.hh"
15 #include "grob-interface.hh"
16
17 /*
18   TODO: prune to public interface.
19 */
20 class Spacing_spanner
21 {
22 public:
23   static void generate_pair_spacing (Grob *me,
24                                      Paper_column *l, Paper_column *r,
25                                      Paper_column *nextr,
26                                      Spacing_options const *options);
27   static void standard_breakable_column_spacing (Grob *me, Item *l, Item *r,
28                                                  Real *fixed, Real *space,
29                                                  Spacing_options const *);
30   static Real default_bar_spacing (Grob *, Grob *, Grob *, Moment);
31   static Real note_spacing (Grob *, Grob *, Grob *, Spacing_options const *, bool *);
32   static Real get_duration_space (Moment dur, Spacing_options const *, bool *);
33   static Rational effective_shortest_duration (Grob *me, vector<Grob*> const &all);
34   static void breakable_column_spacing (Grob *, Item *l, Item *r, Spacing_options const *);
35   static void prune_loose_columns (Grob *, vector<Grob*> *cols, Spacing_options const *);
36   static void set_explicit_neighbor_columns (vector<Grob*> const &cols);
37   static void set_implicit_neighbor_columns (vector<Grob*> const &cols);
38   static void generate_springs (Grob *me, vector<Grob*> const &cols, Spacing_options const *);
39   static void musical_column_spacing (Grob *, Item *, Item *, Spacing_options const *);
40   static vector<Grob*> get_columns (Spanner *me);
41
42   DECLARE_SCHEME_CALLBACK (set_springs, (SCM));
43   DECLARE_SCHEME_CALLBACK (calc_common_shortest_duration, (SCM));
44   DECLARE_GROB_INTERFACE();
45 };
46
47 #endif /* SPACING_SPANNER_HH */