2 spacing-spanner.hh -- declare Spacing spanner
4 source file of the GNU LilyPond music typesetter
6 (c) 2005--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
9 #ifndef SPACING_SPANNER_HH
10 #define SPACING_SPANNER_HH
12 #include "lily-proto.hh"
13 #include "rational.hh"
14 #include "std-vector.hh"
15 #include "grob-interface.hh"
18 TODO: prune to public interface.
24 static void set_distances_for_loose_col (Grob *me, Grob *c, Drul_array<Item *> next_door, Spacing_options const *);
25 static void generate_pair_spacing (Grob *me,
26 Paper_column *l, Paper_column *r,
28 Spacing_options const *options);
29 static void standard_breakable_column_spacing (Grob *me, Item *l, Item *r,
30 Real *fixed, Real *space,
31 Spacing_options const *);
32 static Real default_bar_spacing (Grob *, Grob *, Grob *, Moment);
33 static Real note_spacing (Grob *, Grob *, Grob *, Spacing_options const *, bool *);
34 static Real get_duration_space (Moment dur, Spacing_options const *, bool *);
35 static Rational effective_shortest_duration (Grob *me, vector<Grob*> const &all);
36 static void breakable_column_spacing (Grob *, Item *l, Item *r, Spacing_options const *);
37 static void prune_loose_columns (Grob *, vector<Grob*> *cols, Spacing_options const *);
38 static void set_explicit_neighbor_columns (vector<Grob*> const &cols);
39 static void set_implicit_neighbor_columns (vector<Grob*> const &cols);
40 static void generate_springs (Grob *me, vector<Grob*> const &cols, Spacing_options const *);
41 static void musical_column_spacing (Grob *, Item *, Item *, Spacing_options const *);
42 static vector<Grob*> get_columns (Spanner *me);
44 DECLARE_SCHEME_CALLBACK (set_springs, (SCM));
45 DECLARE_SCHEME_CALLBACK (calc_common_shortest_duration, (SCM));
46 DECLARE_GROB_INTERFACE();
49 #endif /* SPACING_SPANNER_HH */