2 spacing-spanner.hh -- declare Spacing spanner
4 source file of the GNU LilyPond music typesetter
6 (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
10 #ifndef SPACING_SPANNER_HH
11 #define SPACING_SPANNER_HH
13 #include "lily-proto.hh"
14 #include "lily-guile.hh"
15 #include "rational.hh"
17 struct Spacing_options
20 bool stretch_uniformly_;
21 bool float_nonmusical_columns_;
23 Rational global_shortest_;
30 TODO: prune to public interface.
35 static void generate_pair_spacing (Grob *me,
36 Paper_column *l, Paper_column *r,
38 Spacing_options const *options);
39 static void standard_breakable_column_spacing (Grob *me, Item *l, Item *r,
40 Real *fixed, Real *space,
41 Spacing_options const*);
42 static Real default_bar_spacing (Grob *, Grob *, Grob *, Moment);
43 static Real note_spacing (Grob *, Grob *, Grob *, Spacing_options const*, bool *);
44 static Real get_duration_space (Grob *, Moment dur, Rational shortest, bool *);
45 static Rational find_shortest (Grob *, Link_array<Grob> const &);
46 static Rational effective_shortest_duration (Grob *me, Link_array<Grob> const &all);
47 static void breakable_column_spacing (Grob *, Item *l, Item *r, Spacing_options const*);
48 static void prune_loose_columns (Grob *, Link_array<Grob> *cols, Spacing_options const*);
49 static void set_explicit_neighbor_columns (Link_array<Grob> const &cols);
50 static void set_implicit_neighbor_columns (Link_array<Grob> const &cols);
51 static void generate_springs (Grob *me, Link_array<Grob> const &cols, Spacing_options const*);
52 static void musical_column_spacing (Grob *, Item *, Item *, Spacing_options const*);
53 DECLARE_SCHEME_CALLBACK (set_springs, (SCM));
54 static bool has_interface (Grob *);
57 #endif /* SPACING_SPANNER_HH */