]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/spacing-spanner.hh
o * lily/spacing-engraver.cc (stop_translation_timestep): directly
[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 Han-Wen Nienhuys <hanwen@xs4all.nl>
7
8 */
9
10 #ifndef SPACING_SPANNER_HH
11 #define SPACING_SPANNER_HH
12
13 #include "lily-proto.hh"
14 #include "lily-guile.hh"
15 #include "rational.hh"
16
17 struct Spacing_options
18 {
19   bool packed_;
20   bool uniform_;
21   Rational global_shortest_;
22   
23   void init (Grob *me);
24 };
25
26 class Spacing_spanner
27 {
28 public:
29   static void standard_breakable_column_spacing (Grob *me, Item *l, Item *r,
30                                                  Real *fixed, Real *space, Spacing_options const*);
31
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 (Grob *, Moment dur, Rational shortest, bool *);
35   static Rational find_shortest (Grob *, Link_array<Grob> const &);
36   static Rational effective_shortest_duration (Grob *me, Link_array<Grob> const &all);
37   static void breakable_column_spacing (Grob *, Item *l, Item *r, Spacing_options const*);
38   static void prune_loose_columns (Grob *, Link_array<Grob> *cols, Spacing_options const*);
39   static void set_explicit_neighbor_columns (Link_array<Grob> const &cols);
40   static void set_implicit_neighbor_columns (Link_array<Grob> const &cols);
41   static void do_measure (Grob *me, Link_array<Grob> *cols, Spacing_options const*);
42   static void musical_column_spacing (Grob *, Item *, Item *, Real, Spacing_options const*);
43   DECLARE_SCHEME_CALLBACK (set_springs, (SCM));
44   static bool has_interface (Grob *);
45 };
46
47 #endif /* SPACING_SPANNER_HH */