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