]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/spacing-spanner.hh
9193a187d476324cc4fa5332239d7078efc1d596
[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--2007 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 #include "spring.hh"
17
18 class Spacing_spanner
19 {
20 private:
21   static void set_distances_for_loose_col (Grob *me, Grob *c, Drul_array<Item *> next_door, Spacing_options const *);
22   static void generate_pair_spacing (Grob *me,
23                                      Paper_column *l, Paper_column *r,
24                                      Paper_column *nextr,
25                                      Spacing_options const *options);
26   static Real default_bar_spacing (Grob *, Grob *, Grob *, Moment);
27   static Rational effective_shortest_duration (Grob *me, vector<Grob*> const &all);
28   static void breakable_column_spacing (Grob *, Item *l, Item *r, Spacing_options const *);
29   static void prune_loose_columns (Grob *, vector<Grob*> *cols, Spacing_options  *);
30   static void set_explicit_neighbor_columns (vector<Grob*> const &cols);
31   static void set_implicit_neighbor_columns (vector<Grob*> const &cols);
32   static void generate_springs (Grob *me, vector<Grob*> const &cols, Spacing_options const *);
33   static void musical_column_spacing (Grob *, Item *, Item *, Spacing_options const *);
34   static bool fills_measure (Grob *, Item *, Item *);
35 public:
36   static vector<Grob*> get_columns (Grob *me);
37   static Real note_spacing (Grob *, Grob *, Grob *, Spacing_options const *);
38   static Spring standard_breakable_column_spacing (Grob *me, Item *l, Item *r, Spacing_options const *);
39   
40   DECLARE_SCHEME_CALLBACK (set_springs, (SCM));
41   DECLARE_SCHEME_CALLBACK (calc_common_shortest_duration, (SCM));
42   DECLARE_GROB_INTERFACE();
43 };
44
45 #endif /* SPACING_SPANNER_HH */