]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/break-algorithm.hh
* ly/engraver-init.ly: remove Ledger_line_engraver from Voice
[lilypond.git] / lily / include / break-algorithm.hh
index 99bba1a2c5ba0de0c0d1210fb05c9bbdeff332b0..54385d8af633f1ad175913ff429c2085701d8da6 100644 (file)
@@ -1,60 +1,37 @@
 /*
-  break-algorithm.hh -- declare  Break_algorithm
+  break-algorithm.hh -- declare Break_algorithm
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1996--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1996--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
-
 #ifndef BREAK_HH
 #define BREAK_HH
 
-#include "array.hh"
 #include "interval.hh"
-#include "lily-proto.hh"
 #include "column-x-positions.hh"
 
-
 /** Class representation of an algorithm which decides where to put
-  the column, and where to break lines.
-  
-  */
-class Break_algorithm {
-protected:
-  Paper_score *pscore_l_;
-  Real linewidth_f_;
-
-  /// search all pcols which are breakable.
-  Link_array<Paper_column> find_breaks() const;
-
-  Array<int> find_break_indices() const;
-    
+    the column, and where to break lines.
 
-  /// helper: solve for the columns in #curline#.
-  void solve_line (Column_x_positions*) const;
-
-  /// helper: approximate the energyv
-  void approximate_solve_line (Column_x_positions*) const;
-
-  /// does curline fit on the paper?    
-  bool feasible (Link_array<Paper_column>) const;
-    
-
-  Simple_spacer* generate_spacing_problem (Link_array<Paper_column>, Interval) const;
+    JUNKME.
+*/
+class Break_algorithm
+{
+protected:
+  Paper_score *pscore_;
+  Real linewidth_;
 
-  virtual Array<Column_x_positions> do_solve() const=0;
-  virtual void do_set_pscore();
+  void solve_line (Column_x_positions *) const;
+  bool feasible (vector<Grob*> const &) const;
 
 public:
-  Simple_spacer* (*get_line_spacer)();
-  Break_algorithm();
-  void set_pscore (Paper_score*);
-
-  /// check if the spacing/breaking problem is well-stated
-  void problem_OK() const;
-  void OK() const;
-  Array<Column_x_positions> solve() const;
+  virtual ~Break_algorithm ();
+  Simple_spacer *(*get_line_spacer) ();
+  Break_algorithm ();
+  void set_pscore (Paper_score *);
+  virtual vector<Column_x_positions> solve ();
 };
 
 #endif // BREAK_HH