]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/spacing-spanner.hh
add 2007 to (c) year.
[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 Real get_duration_space (Moment dur, Spacing_options const *, bool *);
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 *, bool *);
38   static void standard_breakable_column_spacing (Grob *me, Item *l, Item *r,
39                                                  Real *fixed, Real *space,
40                                                  Spacing_options const *);
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 */