]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/spacing-spanner.hh
remove skyline max-slope
[lilypond.git] / lily / include / spacing-spanner.hh
index 60ad275958953414b83d9a1f07c179b9fde1a693..3dace37510894ae0154fe1c0c2b908a78f0c762f 100644 (file)
@@ -3,29 +3,16 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 2005--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #ifndef SPACING_SPANNER_HH
 #define SPACING_SPANNER_HH
 
 #include "lily-proto.hh"
-#include "lily-guile.hh"
 #include "rational.hh"
-
-struct Spacing_options
-{
-  bool packed_;
-  bool stretch_uniformly_;
-  bool float_nonmusical_columns_;
-  Rational global_shortest_;
-  Real increment_;
-  Real shortest_duration_space_;
-
-  void init ();
-  void init_from_grob (Grob *me);
-  Real get_duration_space (Moment d, bool *) const;
-};
+#include "std-vector.hh"
+#include "grob-interface.hh"
 
 /*
   TODO: prune to public interface.
@@ -43,16 +30,18 @@ public:
   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 find_shortest (Grob *, Link_array<Grob> const &);
-  static Rational effective_shortest_duration (Grob *me, Link_array<Grob> const &all);
+  static Rational effective_shortest_duration (Grob *me, vector<Grob*> const &all);
   static void breakable_column_spacing (Grob *, Item *l, Item *r, Spacing_options const *);
-  static void prune_loose_columns (Grob *, Link_array<Grob> *cols, Spacing_options const *);
-  static void set_explicit_neighbor_columns (Link_array<Grob> const &cols);
-  static void set_implicit_neighbor_columns (Link_array<Grob> const &cols);
-  static void generate_springs (Grob *me, Link_array<Grob> const &cols, Spacing_options const *);
+  static void prune_loose_columns (Grob *, vector<Grob*> *cols, Spacing_options const *);
+  static void set_explicit_neighbor_columns (vector<Grob*> const &cols);
+  static void set_implicit_neighbor_columns (vector<Grob*> const &cols);
+  static void generate_springs (Grob *me, vector<Grob*> const &cols, Spacing_options const *);
   static void musical_column_spacing (Grob *, Item *, Item *, Spacing_options const *);
+  static vector<Grob*> get_columns (Spanner *me);
+
   DECLARE_SCHEME_CALLBACK (set_springs, (SCM));
-  static bool has_interface (Grob *);
+  DECLARE_SCHEME_CALLBACK (calc_common_shortest_duration, (SCM));
+  DECLARE_GROB_INTERFACE();
 };
 
 #endif /* SPACING_SPANNER_HH */