]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/score-column.hh
release: 1.0.15
[lilypond.git] / lily / include / score-column.hh
index 4d6fc17af7550c0690c3fdc880046ce2518a8eca..dfe944c5a589ccd7588959ddca8ff9ae24a29e37 100644 (file)
@@ -1,60 +1,57 @@
 /*
-  sccol.hh -- part of GNU LilyPond
+  score-column.hh -- declare Score_column
 
-  (c) 1996,97 Han-Wen Nienhuys
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
-#ifndef SCCOL_HH
-#define SCCOL_HH
+
+#ifndef SCORE_COLUMN_HH
+#define SCORE_COLUMN_HH
+
 #include "lily-proto.hh"
-#include "varray.hh"
+#include "array.hh"
 #include "moment.hh"
-
+#include "p-col.hh"
 
 /**
+  Column with durational info.
+  
+  The columns which contain data have a rhythmical
+  position. Score_column is the type with a rhythmical time attached
+  to it. The calculation of idealspacing is done with data in these
+  columns. (notably: the #durations# field)
 
-    When typesetting hasn't started on PScore yet, the columns which
-    contain data have a rhythmical position. Score_column is the type
-    with a rhythmical time attached to it. The calculation of
-    idealspacing is done with data in these columns. (notably: the
-    #durations# field)
+  */
 
-    */
+class Score_column : public Paper_column {
+  friend class Score;
+  friend class Score_engraver;
 
-class Score_column {
-    friend class Score;
-    friend class Score_walker;
+  bool musical_b_;
+  int break_penalty_i_;
+  Moment when_;
 
-    bool musical_b_;
-    Moment when_;
-    void set_breakable();
 public:
-    /// indirection to column
-    PCol * pcol_l_;
-
-    /// length of notes/rests in this column
-    Array<Moment> durations;
+  int break_penalty_i () { return break_penalty_i_; }
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  SCORE_ELEMENT_CLONE(Score_column);
+  /// length of notes/rests in this column
+  Array<Moment> durations;
     
-    /* *************** */
-
-    Moment when() {  return when_; }
-    Score_column(Moment when);       
-    static int compare(Score_column & c1, Score_column &c2);
-    void add_duration(Moment );
-    void preprocess();
-    bool breakable_b();
-    bool musical_b() { return musical_b_; }
-    bool used_b();
-    void print() const;
-
 
+  Moment when() {  return when_; }
+  Score_column (Moment when);       
+  void add_duration (Moment);
+  void preprocess();
+  bool musical_b() { return musical_b_; }
+  void do_print() const;
 };
 
-#include "compare.hh"
+#endif // SCORE_COLUMN_HH
 
-instantiate_compare(Score_column&, Score_column::compare);
 
-#endif // SCCOL_HH