lilypond-0.1.57
[lilypond.git] / hdr / scorecolumn.hh
blobe961d0492016418b425631ef34a4ba235030aebd
1 /*
2 sccol.hh -- part of LilyPond
4 (c) 1996,97 Han-Wen Nienhuys
5 */
7 #ifndef SCCOL_HH
8 #define SCCOL_HH
9 #include "proto.hh"
10 #include "varray.hh"
11 #include "moment.hh"
14 /**
16 When typesetting hasn't started on PScore yet, the columns which
17 contain data have a rhythmical position. Score_column is the type
18 with a rhythmical time attached to it. The calculation of
19 idealspacing is done with data in these columns. (notably: the
20 #durations# field)
24 class Score_column {
25 friend class Score;
26 friend class Score_walker;
28 bool musical_b_;
29 Moment when_;
30 void set_breakable();
31 public:
32 /// indirection to column
33 PCol * pcol_l_;
35 /// length of notes/rests in this column
36 Array<Moment> durations;
38 /* *************** */
40 Moment when() { return when_; }
41 Score_column(Moment when);
42 static int compare(Score_column & c1, Score_column &c2);
43 void add_duration(Moment );
44 void preprocess();
45 bool breakable_b();
46 bool musical_b() { return musical_b_; }
47 bool used_b();
48 void print() const;
53 instantiate_compare(Score_column&, Score_column::compare);
55 #endif // SCCOL_HH