X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fspacing-spanner.hh;h=7d46f78e1ce2b93151378fb37e4febe6f9638bfa;hb=38cb4178d57c3d964f5e4187be34d7372b4a646b;hp=7f678043eee3b7d4a1e82af8f984540a9bfc0b85;hpb=9b40d66187029df3dca86fc5ecc65f64db315a48;p=lilypond.git diff --git a/lily/include/spacing-spanner.hh b/lily/include/spacing-spanner.hh index 7f678043ee..7d46f78e1c 100644 --- a/lily/include/spacing-spanner.hh +++ b/lily/include/spacing-spanner.hh @@ -1,29 +1,49 @@ -/* - spacing-spanner.hh -- declare Spacing_spanner - +/* + spacing-spanner.hh -- declare Spacing spanner + source file of the GNU LilyPond music typesetter - - (c) 1999--2000 Han-Wen Nienhuys - - */ + + (c) 2005--2006 Han-Wen Nienhuys +*/ #ifndef SPACING_SPANNER_HH #define SPACING_SPANNER_HH -#include "spanner.hh" +#include "lily-proto.hh" +#include "rational.hh" +#include "std-vector.hh" +#include "grob-interface.hh" +/* + TODO: prune to public interface. +*/ class Spacing_spanner + { public: - static void set_interface (Score_element*); - static void do_measure (Score_element*,Link_array) ; - - DECLARE_SCHEME_CALLBACK(set_springs, (SCM )); - static Real stem_dir_correction (Score_element*,Score_element*,Score_element*) ; - static Real default_bar_spacing (Score_element*,Score_element*,Score_element*,Moment) ; - static Real note_spacing (Score_element*,Score_element*,Score_element*,Moment) ; - static Real get_duration_space (Score_element*,Moment dur, Moment shortest) ; + static void set_distances_for_loose_col (Grob *me, Grob *c, Drul_array next_door, Spacing_options const *); + static void generate_pair_spacing (Grob *me, + Paper_column *l, Paper_column *r, + Paper_column *nextr, + Spacing_options const *options); + static void standard_breakable_column_spacing (Grob *me, Item *l, Item *r, + Real *fixed, Real *space, + Spacing_options const *); + static Real default_bar_spacing (Grob *, Grob *, Grob *, Moment); + static Real note_spacing (Grob *, Grob *, Grob *, Spacing_options const *, bool *); + static Real get_duration_space (Moment dur, Spacing_options const *, bool *); + static Rational effective_shortest_duration (Grob *me, vector const &all); + static void breakable_column_spacing (Grob *, Item *l, Item *r, Spacing_options const *); + static void prune_loose_columns (Grob *, vector *cols, Spacing_options const *); + static void set_explicit_neighbor_columns (vector const &cols); + static void set_implicit_neighbor_columns (vector const &cols); + static void generate_springs (Grob *me, vector const &cols, Spacing_options const *); + static void musical_column_spacing (Grob *, Item *, Item *, Spacing_options const *); + static vector get_columns (Spanner *me); + + DECLARE_SCHEME_CALLBACK (set_springs, (SCM)); + DECLARE_SCHEME_CALLBACK (calc_common_shortest_duration, (SCM)); + DECLARE_GROB_INTERFACE(); }; #endif /* SPACING_SPANNER_HH */ -