]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/break-algorithm.hh
* Another grand 2003 update.
[lilypond.git] / lily / include / break-algorithm.hh
index 8a25d7b554d2df85207f93897156e645c7646d21..623fc81a4a29fe6ba94b0a178a6410c12f65337b 100644 (file)
@@ -3,12 +3,13 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1996,  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1996--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
 #ifndef BREAK_HH
 #define BREAK_HH
+
 #include "array.hh"
 #include "interval.hh"
 #include "lily-proto.hh"
 
 /** Class representation of an algorithm which decides where to put
   the column, and where to break lines.
-  
-  TODO:  A "parindent", caching of breakpoints
+
+  JUNKME.
   
   */
 class Break_algorithm {
 protected:
-
-  Paper_score *pscore_l_;
-  Real linewidth_f_;
+  Paper_score *pscore_;
+  Real linewidth_;
 
   /// search all pcols which are breakable.
-  Line_of_cols find_breaks() const;
+  Link_array<Grob> find_breaks () const;
 
-  Array<int> find_break_indices() const;
+  Array<int> find_break_indices () const;
     
 
   /// 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 (Line_of_cols) const;
+  bool feasible (Link_array<Grob> const &) const;
     
 
-  Simple_spacer* generate_spacing_problem (Line_of_cols, Interval) const;
+  Simple_spacer* generate_spacing_problem (Link_array<Grob> const &, Interval) const;
 
-  virtual Array<Column_x_positions> do_solve() const=0;
-  virtual void do_set_pscore();
+  virtual Array<Column_x_positions> do_solve () const=0;
 
 public:
-  
-  Simple_spacer* (*get_line_spacer)();
-    
-  Break_algorithm();
+  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;
+  Array<Column_x_positions> solve () const;
 };
 
 #endif // BREAK_HH